Public report of netease-kit/nim-uikit-android, published 16 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, 16 November 2026, 18:24 UTC · Survey ID cd_90db6140b50644ff84684bd411cadc30
netease-kit/nim-uikit-android
Measured 16 November 2026, 18:23 UTC, at code version f4c9978
First survey, so nothing to compare with yet
CAI scoreAdequate
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 large codebase: 121,980 lines of product code in 10 projects, tests not counted · Estimated rebuild effort: about 0.8 person-years · Weakest lens: Production Readiness, 42.6
Findings by how serious they are
1 critical1529 serious483 minor
16 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
16 November 2026, 18:23 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 ▸
45of 45 dimensions measured by tools.
2005of 2013 findings point to an exact file and line, so you can open each one in the code. The other 8 concern the repository as a whole, such as missing documentation.
45dimensions across 5 lenses, read from 121,980 lines of product code in 10 projects.
netease-kit/nim-uikit-android falls short of our standard for production because we found no working pipeline that builds or tests changes to the code and no automated security scanning of the code, its secrets or its dependencies. It scores 51.4 out of 100 and is rated Adequate, and its one critical finding is a leaked password or key.
Production Readiness, at 42.6, is the weakest lens and counts most in the score. The best first step for the work it takes is improving the documentation, worth about 5.6 points. Adding an automated build and test pipeline would lift Production Readiness itself, worth about 5.7 points. Raising Production Readiness to 70 would lift the score to about 57.5.
One password or key is open to anyone who can read the repository. Replacing the exposed password or key would close this risk.
The product code is 121,980 lines, about €120,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 Production Readiness rose from 42.6 to 70, the lowest score rated Strong, the score would rise from 51.4 to about 57.5.
Code composition: what the lines of code are
Product code 100%Tests 0%
Rebuild cost: about €120,000 · Estimate
Cost to rebuild
€39,000 to €190,000, for 643 to 2,040 hours of work, about 0.8 person-years for 1 to 2 engineers
Difficulty of the problem
Standard, 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 51. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
Size
Large: 121,980 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 Documentation finding(s) in Documentation Quality — start with README.md.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts.
Raises the score by about 5.6 points · Low effort · ADR Quality
3
Add a CI workflow that builds and runs the test suite on every push/PR.
Raises the score by about 5.7 points · Medium effort · CI/CD gates
Diagnosis: what the measurements show together
Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.
Where the investment is most exposed · Value at risk
This code would cost about €120,000 to build again, about 0.8 person-years of work. Its weakest lens is Production Readiness, at 42.6 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 1 Documentation finding(s) in Documentation Quality. Of all the actions in this report, it raises the score most for the work it takes: about 5.6 points for low effort, because it clears the 1 Documentation Quality 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 5.8 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 5% to 12% on every change. The history of the code shows how much it changes: about 20,064 lines over the last 90 days, which is about 81,371 lines a year. At that pace, the extra work comes to an estimated 11.1 to 66.5 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.
218 modules, with 640 dependencies between them. 12 loops run through 36 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 178 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.
kit.chatkit.ui.model uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.chatkit.ui.model, while a change to kit.chatkit.ui.model can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.chatkit.ui.model uses a module listed above it, which is the healthy direction.
kit.common.ui.activities uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.common.ui.activities, while a change to kit.common.ui.activities can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.common.ui.activities uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.interfaces uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.interfaces, while a change to kit.contactkit.ui.interfaces can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.interfaces uses a module listed above it, which is the healthy direction.
9→15 kit.contactkit.ui.interfaces uses kit.contactkit.ui.viewpart of a loop✕
Connections
1 pair of types, where a type in kit.contactkit.ui.interfaces uses a type in kit.contactkit.ui.view.
kit.contactkit.ui.interfaces uses kit.contactkit.ui.view, so a change to kit.contactkit.ui.view can break kit.contactkit.ui.interfaces, while a change to kit.contactkit.ui.interfaces can't break kit.contactkit.ui.view.
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.
9→24 kit.contactkit.ui.interfaces uses kit.contactkit.uipart of a loop✕
Connections
1 pair of types, where a type in kit.contactkit.ui.interfaces uses a type in kit.contactkit.ui.
kit.contactkit.ui.interfaces uses kit.contactkit.ui, so a change to kit.contactkit.ui can break kit.contactkit.ui.interfaces, while a change to kit.contactkit.ui.interfaces can't break kit.contactkit.ui.
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.
kit.conversationkit.local.ui.model uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.conversationkit.local.ui.model, while a change to kit.conversationkit.local.ui.model can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.conversationkit.local.ui.model uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui.model uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.conversationkit.ui.model, while a change to kit.conversationkit.ui.model can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.conversationkit.ui.model uses a module listed above it, which is the healthy direction.
27 pairs of types, where a type in kit.chatkit.ui.page.viewmodel uses a type in kit.common.ui.viewmodel. Showing 25 of them; the rest are in namespace-graph.json in this report's bundle.
kit.chatkit.ui.page.viewmodel uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.chatkit.ui.page.viewmodel, while a change to kit.chatkit.ui.page.viewmodel can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.page.viewmodel uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.viewmodel uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.page.viewmodel, while a change to kit.chatkit.ui.page.viewmodel can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.page.viewmodel uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.view.message uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.view.message, while a change to kit.chatkit.ui.view.message can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.view.message uses a module listed above it, which is the healthy direction.
13→18 kit.chatkit.ui.view.message uses kit.chatkit.ui.interfacespart of a loop✕
Connections
4 pairs of types, where a type in kit.chatkit.ui.view.message uses a type in kit.chatkit.ui.interfaces.
kit.chatkit.ui.view.message uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.view.message, while a change to kit.chatkit.ui.view.message can't break kit.chatkit.ui.interfaces.
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.
13→25 kit.chatkit.ui.view.message uses kit.chatkit.uipart of a loop✕
Connections
2 pairs of types, where a type in kit.chatkit.ui.view.message uses a type in kit.chatkit.ui.
kit.chatkit.ui.view.message uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.view.message, while a change to kit.chatkit.ui.view.message can't break kit.chatkit.ui.
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.
kit.contactkit.ui.robot uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.contactkit.ui.robot, while a change to kit.contactkit.ui.robot can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.contactkit.ui.robot uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.robot uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.contactkit.ui.robot, while a change to kit.contactkit.ui.robot can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.contactkit.ui.robot uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.robot uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.robot, while a change to kit.contactkit.ui.robot can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.robot uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.robot uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.robot, while a change to kit.contactkit.ui.robot can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.robot uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.robot uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.contactkit.ui.robot, while a change to kit.contactkit.ui.robot can't break kit.common.ui.activities.
Position
Below the diagonal: kit.contactkit.ui.robot uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.view uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.view, while a change to kit.contactkit.ui.view can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.view uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.view uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.view, while a change to kit.contactkit.ui.view can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.view uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.view uses kit.contactkit.ui.interfaces, so a change to kit.contactkit.ui.interfaces can break kit.contactkit.ui.view, while a change to kit.contactkit.ui.view can't break kit.contactkit.ui.interfaces.
Position
Below the diagonal: kit.contactkit.ui.view uses a module listed above it, which is the healthy direction.
15→24 kit.contactkit.ui.view uses kit.contactkit.uipart of a loop✕
Connections
2 pairs of types, where a type in kit.contactkit.ui.view uses a type in kit.contactkit.ui.
kit.contactkit.ui.view uses kit.contactkit.ui, so a change to kit.contactkit.ui can break kit.contactkit.ui.view, while a change to kit.contactkit.ui.view can't break kit.contactkit.ui.
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.
kit.conversationkit.local.ui uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.conversationkit.local.ui, while a change to kit.conversationkit.local.ui can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.conversationkit.local.ui uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.conversationkit.local.ui, while a change to kit.conversationkit.local.ui can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.conversationkit.local.ui uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui uses kit.conversationkit.local.ui.model, so a change to kit.conversationkit.local.ui.model can break kit.conversationkit.local.ui, while a change to kit.conversationkit.local.ui can't break kit.conversationkit.local.ui.model.
Position
Below the diagonal: kit.conversationkit.local.ui uses a module listed above it, which is the healthy direction.
16→20 kit.conversationkit.local.ui uses kit.conversationkit.local.ui.pagepart of a loop✕
Connections
1 pair of types, where a type in kit.conversationkit.local.ui uses a type in kit.conversationkit.local.ui.page.
kit.conversationkit.local.ui uses kit.conversationkit.local.ui.page, so a change to kit.conversationkit.local.ui.page can break kit.conversationkit.local.ui, while a change to kit.conversationkit.local.ui can't break kit.conversationkit.local.ui.page.
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.
kit.conversationkit.ui.page uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.common.ui.action.
Position
Below the diagonal: kit.conversationkit.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui.page uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.conversationkit.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui.page uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.conversationkit.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui.page uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.conversationkit.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui.page uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.common.ui.activities.
Position
Below the diagonal: kit.conversationkit.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui.page uses kit.conversationkit.ui.model, so a change to kit.conversationkit.ui.model can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.conversationkit.ui.model.
Position
Below the diagonal: kit.conversationkit.ui.page uses a module listed above it, which is the healthy direction.
17→21 kit.conversationkit.ui.page uses kit.conversationkit.uipart of a loop✕
Connections
2 pairs of types, where a type in kit.conversationkit.ui.page uses a type in kit.conversationkit.ui.
kit.conversationkit.ui.page uses kit.conversationkit.ui, so a change to kit.conversationkit.ui can break kit.conversationkit.ui.page, while a change to kit.conversationkit.ui.page can't break kit.conversationkit.ui.
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.
kit.chatkit.ui.interfaces uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.chatkit.ui.interfaces, while a change to kit.chatkit.ui.interfaces can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.chatkit.ui.interfaces uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.interfaces uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.interfaces, while a change to kit.chatkit.ui.interfaces can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.interfaces uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.interfaces uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.interfaces, while a change to kit.chatkit.ui.interfaces can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.interfaces uses a module listed above it, which is the healthy direction.
18→22 kit.chatkit.ui.interfaces uses kit.chatkit.ui.builderpart of a loop✕
Connections
1 pair of types, where a type in kit.chatkit.ui.interfaces uses a type in kit.chatkit.ui.builder.
kit.chatkit.ui.interfaces uses kit.chatkit.ui.builder, so a change to kit.chatkit.ui.builder can break kit.chatkit.ui.interfaces, while a change to kit.chatkit.ui.interfaces can't break kit.chatkit.ui.builder.
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.
18→25 kit.chatkit.ui.interfaces uses kit.chatkit.uipart of a loop✕
Connections
2 pairs of types, where a type in kit.chatkit.ui.interfaces uses a type in kit.chatkit.ui.
kit.chatkit.ui.interfaces uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.interfaces, while a change to kit.chatkit.ui.interfaces can't break kit.chatkit.ui.
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.
kit.contactkit.ui.view.viewholder uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.view.viewholder, while a change to kit.contactkit.ui.view.viewholder can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.view.viewholder uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.view.viewholder uses kit.contactkit.ui.interfaces, so a change to kit.contactkit.ui.interfaces can break kit.contactkit.ui.view.viewholder, while a change to kit.contactkit.ui.view.viewholder can't break kit.contactkit.ui.interfaces.
Position
Below the diagonal: kit.contactkit.ui.view.viewholder uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.view.viewholder uses kit.contactkit.ui.view, so a change to kit.contactkit.ui.view can break kit.contactkit.ui.view.viewholder, while a change to kit.contactkit.ui.view.viewholder can't break kit.contactkit.ui.view.
Position
Below the diagonal: kit.contactkit.ui.view.viewholder uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui.page uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.conversationkit.local.ui.page, while a change to kit.conversationkit.local.ui.page can't break kit.common.ui.action.
Position
Below the diagonal: kit.conversationkit.local.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui.page uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.conversationkit.local.ui.page, while a change to kit.conversationkit.local.ui.page can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.conversationkit.local.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui.page uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.conversationkit.local.ui.page, while a change to kit.conversationkit.local.ui.page can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.conversationkit.local.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui.page uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.conversationkit.local.ui.page, while a change to kit.conversationkit.local.ui.page can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.conversationkit.local.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui.page uses kit.conversationkit.local.ui.model, so a change to kit.conversationkit.local.ui.model can break kit.conversationkit.local.ui.page, while a change to kit.conversationkit.local.ui.page can't break kit.conversationkit.local.ui.model.
Position
Below the diagonal: kit.conversationkit.local.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.local.ui.page uses kit.conversationkit.local.ui, so a change to kit.conversationkit.local.ui can break kit.conversationkit.local.ui.page, while a change to kit.conversationkit.local.ui.page can't break kit.conversationkit.local.ui.
Position
Below the diagonal: kit.conversationkit.local.ui.page uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.conversationkit.ui, while a change to kit.conversationkit.ui can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.conversationkit.ui uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.conversationkit.ui, while a change to kit.conversationkit.ui can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.conversationkit.ui uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui uses kit.conversationkit.ui.model, so a change to kit.conversationkit.ui.model can break kit.conversationkit.ui, while a change to kit.conversationkit.ui can't break kit.conversationkit.ui.model.
Position
Below the diagonal: kit.conversationkit.ui uses a module listed above it, which is the healthy direction.
kit.conversationkit.ui uses kit.conversationkit.ui.page, so a change to kit.conversationkit.ui.page can break kit.conversationkit.ui, while a change to kit.conversationkit.ui can't break kit.conversationkit.ui.page.
Position
Below the diagonal: kit.conversationkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.builder uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.builder, while a change to kit.chatkit.ui.builder can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.builder uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.builder uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.builder, while a change to kit.chatkit.ui.builder can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.builder uses a module listed above it, which is the healthy direction.
22→25 kit.chatkit.ui.builder uses kit.chatkit.uipart of a loop✕
Connections
2 pairs of types, where a type in kit.chatkit.ui.builder uses a type in kit.chatkit.ui.
kit.chatkit.ui.builder uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.builder, while a change to kit.chatkit.ui.builder can't break kit.chatkit.ui.
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.
kit.chatkit.ui.view.message.viewholder uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.chatkit.ui.view.message.viewholder, while a change to kit.chatkit.ui.view.message.viewholder can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.chatkit.ui.view.message.viewholder uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.view.message.viewholder uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.view.message.viewholder, while a change to kit.chatkit.ui.view.message.viewholder can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.view.message.viewholder uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.view.message.viewholder uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.view.message.viewholder, while a change to kit.chatkit.ui.view.message.viewholder can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.view.message.viewholder uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.view.message.viewholder uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.view.message.viewholder, while a change to kit.chatkit.ui.view.message.viewholder can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.view.message.viewholder uses a module listed above it, which is the healthy direction.
23→25 kit.chatkit.ui.view.message.viewholder uses kit.chatkit.uipart of a loop✕
Connections
1 pair of types, where a type in kit.chatkit.ui.view.message.viewholder uses a type in kit.chatkit.ui.
kit.chatkit.ui.view.message.viewholder uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.view.message.viewholder, while a change to kit.chatkit.ui.view.message.viewholder can't break kit.chatkit.ui.
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.
kit.contactkit.ui uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui, while a change to kit.contactkit.ui can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui uses a module listed above it, which is the healthy direction.
kit.contactkit.ui uses kit.contactkit.ui.view, so a change to kit.contactkit.ui.view can break kit.contactkit.ui, while a change to kit.contactkit.ui can't break kit.contactkit.ui.view.
Position
Below the diagonal: kit.contactkit.ui uses a module listed above it, which is the healthy direction.
kit.contactkit.ui uses kit.contactkit.ui.view.viewholder, so a change to kit.contactkit.ui.view.viewholder can break kit.contactkit.ui, while a change to kit.contactkit.ui can't break kit.contactkit.ui.view.viewholder.
Position
Below the diagonal: kit.contactkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.chatkit.ui, while a change to kit.chatkit.ui can't break kit.common.ui.action.
Position
Below the diagonal: kit.chatkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui, while a change to kit.chatkit.ui can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui, while a change to kit.chatkit.ui can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui, while a change to kit.chatkit.ui can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui uses kit.chatkit.ui.builder, so a change to kit.chatkit.ui.builder can break kit.chatkit.ui, while a change to kit.chatkit.ui can't break kit.chatkit.ui.builder.
Position
Below the diagonal: kit.chatkit.ui uses a module listed above it, which is the healthy direction.
kit.chatkit.ui uses kit.chatkit.ui.view.message.viewholder, so a change to kit.chatkit.ui.view.message.viewholder can break kit.chatkit.ui, while a change to kit.chatkit.ui can't break kit.chatkit.ui.view.message.viewholder.
Position
Below the diagonal: kit.chatkit.ui uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.common.ui.activities.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.contactkit.ui.view, so a change to kit.contactkit.ui.view can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.contactkit.ui.view.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.contactkit.ui.view.viewholder, so a change to kit.contactkit.ui.view.viewholder can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.contactkit.ui.view.viewholder.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.verify uses kit.contactkit.ui, so a change to kit.contactkit.ui can break kit.contactkit.ui.verify, while a change to kit.contactkit.ui.verify can't break kit.contactkit.ui.
Position
Below the diagonal: kit.contactkit.ui.verify uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.common.ui.action.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.chatkit.ui.page.viewmodel, so a change to kit.chatkit.ui.page.viewmodel can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.chatkit.ui.page.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.common uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.common, while a change to kit.chatkit.ui.common can't break kit.chatkit.ui.
Position
Below the diagonal: kit.chatkit.ui.common uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.common.ui.action.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.chatkit.ui.builder, so a change to kit.chatkit.ui.builder can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.chatkit.ui.builder.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.view uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.fun.view, while a change to kit.chatkit.ui.fun.view can't break kit.chatkit.ui.
Position
Below the diagonal: kit.chatkit.ui.fun.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.common.ui.action.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.chatkit.ui.builder, so a change to kit.chatkit.ui.builder can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.chatkit.ui.builder.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.view uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.normal.view, while a change to kit.chatkit.ui.normal.view can't break kit.chatkit.ui.
Position
Below the diagonal: kit.chatkit.ui.normal.view uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.adapter uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.chatkit.ui.page.adapter, while a change to kit.chatkit.ui.page.adapter can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.chatkit.ui.page.adapter uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.adapter uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.page.adapter, while a change to kit.chatkit.ui.page.adapter can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.page.adapter uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.adapter uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.page.adapter, while a change to kit.chatkit.ui.page.adapter can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.page.adapter uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.adapter uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.page.adapter, while a change to kit.chatkit.ui.page.adapter can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.page.adapter uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.adapter uses kit.chatkit.ui.view.message.viewholder, so a change to kit.chatkit.ui.view.message.viewholder can break kit.chatkit.ui.page.adapter, while a change to kit.chatkit.ui.page.adapter can't break kit.chatkit.ui.view.message.viewholder.
Position
Below the diagonal: kit.chatkit.ui.page.adapter uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.adapter uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.page.adapter, while a change to kit.chatkit.ui.page.adapter can't break kit.chatkit.ui.
Position
Below the diagonal: kit.chatkit.ui.page.adapter uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.common.ui.activities.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.contactkit.ui.interfaces, so a change to kit.contactkit.ui.interfaces can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.contactkit.ui.interfaces.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.contactkit.ui.view, so a change to kit.contactkit.ui.view can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.contactkit.ui.view.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.contactkit.ui, so a change to kit.contactkit.ui can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.contactkit.ui.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.contact uses kit.contactkit.ui.verify, so a change to kit.contactkit.ui.verify can break kit.contactkit.ui.contact, while a change to kit.contactkit.ui.contact can't break kit.contactkit.ui.verify.
Position
Below the diagonal: kit.contactkit.ui.contact uses a module listed above it, which is the healthy direction.
app.im.main uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break app.im.main, while a change to app.im.main can't break kit.common.ui.widgets.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.common.ui.activities, so a change to kit.common.ui.activities can break app.im.main, while a change to app.im.main can't break kit.common.ui.activities.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.conversationkit.ui.page, so a change to kit.conversationkit.ui.page can break app.im.main, while a change to app.im.main can't break kit.conversationkit.ui.page.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break app.im.main, while a change to app.im.main can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.conversationkit.local.ui.page, so a change to kit.conversationkit.local.ui.page can break app.im.main, while a change to app.im.main can't break kit.conversationkit.local.ui.page.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.conversationkit.ui, so a change to kit.conversationkit.ui can break app.im.main, while a change to app.im.main can't break kit.conversationkit.ui.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.chatkit.ui.builder, so a change to kit.chatkit.ui.builder can break app.im.main, while a change to app.im.main can't break kit.chatkit.ui.builder.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
app.im.main uses kit.contactkit.ui.contact, so a change to kit.contactkit.ui.contact can break app.im.main, while a change to app.im.main can't break kit.contactkit.ui.contact.
Position
Below the diagonal: app.im.main uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.chatkit.ui.page.viewmodel, so a change to kit.chatkit.ui.page.viewmodel can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.chatkit.ui.page.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.chatkit.ui.builder, so a change to kit.chatkit.ui.builder can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.chatkit.ui.builder.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.chatkit.ui.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page.fragment uses kit.chatkit.ui.page.adapter, so a change to kit.chatkit.ui.page.adapter can break kit.chatkit.ui.page.fragment, while a change to kit.chatkit.ui.page.fragment can't break kit.chatkit.ui.page.adapter.
Position
Below the diagonal: kit.chatkit.ui.page.fragment uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.contactkit.ui.selector, while a change to kit.contactkit.ui.selector can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.contactkit.ui.selector uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.selector, while a change to kit.contactkit.ui.selector can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.selector uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.selector, while a change to kit.contactkit.ui.selector can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.selector uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.contactkit.ui.selector, while a change to kit.contactkit.ui.selector can't break kit.common.ui.activities.
Position
Below the diagonal: kit.contactkit.ui.selector uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector uses kit.contactkit.ui.view, so a change to kit.contactkit.ui.view can break kit.contactkit.ui.selector, while a change to kit.contactkit.ui.selector can't break kit.contactkit.ui.view.
Position
Below the diagonal: kit.contactkit.ui.selector uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector uses kit.contactkit.ui.contact, so a change to kit.contactkit.ui.contact can break kit.contactkit.ui.selector, while a change to kit.contactkit.ui.selector can't break kit.contactkit.ui.contact.
Position
Below the diagonal: kit.contactkit.ui.selector uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.chatkit.ui.page.viewmodel, so a change to kit.chatkit.ui.page.viewmodel can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.chatkit.ui.page.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.chatkit.ui.fun.view, so a change to kit.chatkit.ui.fun.view can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.chatkit.ui.fun.view.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.fun.page.fragment uses kit.chatkit.ui.page.fragment, so a change to kit.chatkit.ui.page.fragment can break kit.chatkit.ui.fun.page.fragment, while a change to kit.chatkit.ui.fun.page.fragment can't break kit.chatkit.ui.page.fragment.
Position
Below the diagonal: kit.chatkit.ui.fun.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.common.ui.viewholder, so a change to kit.common.ui.viewholder can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.common.ui.viewholder.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.chatkit.ui.page.viewmodel, so a change to kit.chatkit.ui.page.viewmodel can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.chatkit.ui.page.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.chatkit.ui.view.message, so a change to kit.chatkit.ui.view.message can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.chatkit.ui.view.message.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.chatkit.ui.normal.view, so a change to kit.chatkit.ui.normal.view can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.chatkit.ui.normal.view.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.normal.page.fragment uses kit.chatkit.ui.page.fragment, so a change to kit.chatkit.ui.page.fragment can break kit.chatkit.ui.normal.page.fragment, while a change to kit.chatkit.ui.normal.page.fragment can't break kit.chatkit.ui.page.fragment.
Position
Below the diagonal: kit.chatkit.ui.normal.page.fragment uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.common.ui.action, so a change to kit.common.ui.action can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.common.ui.action.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.chatkit.ui.model, so a change to kit.chatkit.ui.model can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.chatkit.ui.model.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.common.ui.activities.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.chatkit.ui.page.viewmodel, so a change to kit.chatkit.ui.page.viewmodel can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.chatkit.ui.page.viewmodel.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.chatkit.ui.interfaces, so a change to kit.chatkit.ui.interfaces can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.chatkit.ui.interfaces.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.chatkit.ui, so a change to kit.chatkit.ui can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.chatkit.ui.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.chatkit.ui.page.adapter, so a change to kit.chatkit.ui.page.adapter can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.chatkit.ui.page.adapter.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.chatkit.ui.page uses kit.chatkit.ui.page.fragment, so a change to kit.chatkit.ui.page.fragment can break kit.chatkit.ui.page, while a change to kit.chatkit.ui.page can't break kit.chatkit.ui.page.fragment.
Position
Below the diagonal: kit.chatkit.ui.page uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward uses kit.common.ui.dialog, so a change to kit.common.ui.dialog can break kit.contactkit.ui.selector.forward, while a change to kit.contactkit.ui.selector.forward can't break kit.common.ui.dialog.
Position
Below the diagonal: kit.contactkit.ui.selector.forward uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.contactkit.ui.selector.forward, while a change to kit.contactkit.ui.selector.forward can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.contactkit.ui.selector.forward uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.selector.forward, while a change to kit.contactkit.ui.selector.forward can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.selector.forward uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.selector.forward, while a change to kit.contactkit.ui.selector.forward can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.selector.forward uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward uses kit.contactkit.ui.selector, so a change to kit.contactkit.ui.selector can break kit.contactkit.ui.selector.forward, while a change to kit.contactkit.ui.selector.forward can't break kit.contactkit.ui.selector.
Position
Below the diagonal: kit.contactkit.ui.selector.forward uses a module listed above it, which is the healthy direction.
38→39 kit.contactkit.ui.selector.forward uses kit.contactkit.ui.selector.forward.adapterpart of a loop✕
Connections
4 pairs of types, where a type in kit.contactkit.ui.selector.forward uses a type in kit.contactkit.ui.selector.forward.adapter.
kit.contactkit.ui.selector.forward uses kit.contactkit.ui.selector.forward.adapter, so a change to kit.contactkit.ui.selector.forward.adapter can break kit.contactkit.ui.selector.forward, while a change to kit.contactkit.ui.selector.forward can't break kit.contactkit.ui.selector.forward.adapter.
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.
kit.contactkit.ui.selector.forward.adapter uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.selector.forward.adapter, while a change to kit.contactkit.ui.selector.forward.adapter can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.selector.forward.adapter uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward.adapter uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.selector.forward.adapter, while a change to kit.contactkit.ui.selector.forward.adapter can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.selector.forward.adapter uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward.adapter uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.contactkit.ui.selector.forward.adapter, while a change to kit.contactkit.ui.selector.forward.adapter can't break kit.common.ui.activities.
Position
Below the diagonal: kit.contactkit.ui.selector.forward.adapter uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward.adapter uses kit.contactkit.ui.selector, so a change to kit.contactkit.ui.selector can break kit.contactkit.ui.selector.forward.adapter, while a change to kit.contactkit.ui.selector.forward.adapter can't break kit.contactkit.ui.selector.
Position
Below the diagonal: kit.contactkit.ui.selector.forward.adapter uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.forward.adapter uses kit.contactkit.ui.selector.forward, so a change to kit.contactkit.ui.selector.forward can break kit.contactkit.ui.selector.forward.adapter, while a change to kit.contactkit.ui.selector.forward.adapter can't break kit.contactkit.ui.selector.forward.
Position
Below the diagonal: kit.contactkit.ui.selector.forward.adapter uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.ai uses kit.common.ui.viewmodel, so a change to kit.common.ui.viewmodel can break kit.contactkit.ui.selector.ai, while a change to kit.contactkit.ui.selector.ai can't break kit.common.ui.viewmodel.
Position
Below the diagonal: kit.contactkit.ui.selector.ai uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.ai uses kit.common.ui.widgets, so a change to kit.common.ui.widgets can break kit.contactkit.ui.selector.ai, while a change to kit.contactkit.ui.selector.ai can't break kit.common.ui.widgets.
Position
Below the diagonal: kit.contactkit.ui.selector.ai uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.ai uses kit.contactkit.ui.model, so a change to kit.contactkit.ui.model can break kit.contactkit.ui.selector.ai, while a change to kit.contactkit.ui.selector.ai can't break kit.contactkit.ui.model.
Position
Below the diagonal: kit.contactkit.ui.selector.ai uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.ai uses kit.common.ui.activities, so a change to kit.common.ui.activities can break kit.contactkit.ui.selector.ai, while a change to kit.contactkit.ui.selector.ai can't break kit.common.ui.activities.
Position
Below the diagonal: kit.contactkit.ui.selector.ai uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.ai uses kit.contactkit.ui.selector, so a change to kit.contactkit.ui.selector can break kit.contactkit.ui.selector.ai, while a change to kit.contactkit.ui.selector.ai can't break kit.contactkit.ui.selector.
Position
Below the diagonal: kit.contactkit.ui.selector.ai uses a module listed above it, which is the healthy direction.
kit.contactkit.ui.selector.ai uses kit.contactkit.ui.selector.forward.adapter, so a change to kit.contactkit.ui.selector.forward.adapter can break kit.contactkit.ui.selector.ai, while a change to kit.contactkit.ui.selector.ai can't break kit.contactkit.ui.selector.forward.adapter.
Position
Below the diagonal: kit.contactkit.ui.selector.ai uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 53.6 · Adequate · gated by D4, X5 ·
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
A07:2025 — Authentication Failures
2
High / Critical
A05:2025 — Injection
1
Medium
Roadmap
Top priorities: Add a CI workflow that builds and runs the test suite on every push/PR; Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing; Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md.
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
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.
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
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 — 1
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 — 1529
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 — 483
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 16
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 45 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, 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 — 45 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, 2005 of 2013 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 (.java) 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 (.java) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: the analyzer environment could not run it. 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 — a Gradle build resolved 138 artifact(s) across its subprojects (47 behind a shipped release, reported), but the currency signal was not established over the whole graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
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.
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 an ADMISSION gap, not an environment fault: it declares a published package (teamkit-ui/build.gradle.kts), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
AXR1 Runtime accessibility — 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. Boot via AndroidApp (app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: ei.agconnect:agconnect-core:1.7.2.300.
> Could not get resource 'https://developer.huawei.com/repo/com/huawei/agconnect/agconnect-core/1.7.2.300/agconnect-core-1.7.2.300.pom'.
> C…; runtime evidence skipped (launch chosen because app/build.gradle.kts applies the Android application plugin and gradlew builds it).
C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — 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 retention 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 retention controls.
C5 Data-Subject Rights — 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 data-subject rights 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 data-subject rights controls.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
S1 Web-Security Posture — not measured this run — 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. 191 further occurrence(s) are not listed individually; the score already reflects all 231.
X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
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.
D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
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.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
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.
50 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was ChatBaseMessageViewHolder.setStatus at 36. A further 4 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 LanguageSelectActivity.langCodeToString at 17 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/LanguageSelectActivity.java (LanguageSelectActivity.langCodeToString at 17), app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/TranslationSettingActivity.java (TranslationSettingActivity.getLanguageDisplayName at 17), aisearchkit/src/main/java/com/netease/yunxin/kit/aisearchkit/page/AISearchViewModel.java (AISearchViewModel.getAIResultMsg at 16). 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.
+ 45 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 30 down to 30 or less in Cyclomatic Complexity — start with ChatBaseMessageViewHolder.setStatus (cyclomatic 36). — Refactoring it lifts Cyclomatic Complexity from 7.1 to about 7.3/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.
+ 155 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 60 down to 60 or less in Cognitive Complexity — start with ChatBaseMessageViewHolder.setStatus (cognitive 75). — Refactoring it lifts Cognitive Complexity from 6.3 to about 6.5/10.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.3 / 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 30 TooManyMethods finding(s) in God Classes — start with MessageBottomLayout.java (2), ChatBaseViewModel.java, ChatBaseFragment.java. — One of this dimension's main actionable groups (30 warning-level).
Resolve the 27 ClassTooLong finding(s) in God Classes — start with MessageBottomLayout.java (2), ConversationViewModel.java (2), ChatBaseFragment.java. — One of this dimension's main actionable groups (27 warning-level).
Resolve the 25 FileTooLong finding(s) in God Classes — start with MessageBottomLayout.java (2), ConversationViewModel.java (2), ChatBaseFragment.java. — One of this dimension's main actionable groups (25 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.
748 duplicated block group(s) detected. 26.1 % of the production lines (31,806 of 121,980) are in a reported copy. A further 434 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 285 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 63 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with FunChatSearchImageActivity.java (4), FunCollectionAudioViewHolder.java (4), FunChatTeamFragment.java (3). — One of this dimension's main actionable groups (63 warning-level).
Resolve the 52 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with FunChatView.java (3), FunChatBotSubSessionChatFragment.java (2), FunChatFragment.java (2). — One of this dimension's main actionable groups (52 warning-level).
Resolve the 52 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with FunChatSearchFileAdapter.java (4), MessageHelper.java (2), ChatNotificationMessageViewHolder.java (2). — One of this dimension's main actionable groups (52 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.2 / 10Stronggated by 1 serious finding✓ 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.
10 production modules (Gradle), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 1 module(s) off the main sequence, with abstractness counted on 9 of the 10 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
Off the main sequence: :chatkit-ui
What to do
Resolve the 1 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (1 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 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with TeamKitTeamMemberCache.java, BotSubSessionListAdapter.java, TeamManagerViewModel.java. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D10 · Test Quality10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
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 29 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 10 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. A further 21 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.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 2 Hotspot finding(s) in Churn × Complexity Hotspots — start with ChatTextMessageViewHolder.java, MessageOperateUtils.java. — One of this dimension's main actionable groups (2 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 Factor10.0 / 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.
No source file's living knowledge is concentrated in a single author. Counted over 519 of the 901 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
7 deducted task-comment markers across 121980 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 4 TodoComment finding(s) in Explicit Debt — start with ChatMessageAudioControl.java (2), BaseUserInfoActivity.java, ActionsPanelAdapter.java. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 3 HackComment finding(s) in Explicit Debt — start with TextLayoutUtils.java (3). — One of this dimension's main actionable groups (3 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.
0 of 1 documentation facets pass in full; short on: F2 example. 1 document(s) read across 1 unit(s).
Documentation: no build, run or usage exampleREADME.md:1
What to do
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.kts. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
4 naming inconsistencies among 264 declarations measured against a convention their peers follow.
`getContentDataID` spells `ID` where 51 names in the project spell it `Id` · ×2conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:205
`isReceivedMessageFromAi` spells `Ai` where 55 names in the project spell it `AI`chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:746
`fromSessionID` spells `ID` where 203 names in the project spell it `Id`chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1320
What to do
Resolve the 2 `getContentDataID` spells `ID` where 51 names in the project spell it… finding(s) in Naming Consistency — start with ConversationAdapter.java, ConversationView.java. — One of this dimension's main actionable groups (2 recommendation-level).
Resolve the 1 `isReceivedMessageFromAi` spells `Ai` where 55 names in the project… finding(s) in Naming Consistency — start with MessageHelper.java. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 `fromSessionID` spells `ID` where 203 names in the project spell it `Id` finding(s) in Naming Consistency — start with MessageHelper.java. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.
5 of 10 build units (Gradle) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion · ×5chatkit-ui/build.gradle.kts:1
What to do
Resolve the 5 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with build.gradle.kts (5). — One of this dimension's main actionable groups (5 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.
23 % of calls cross a namespace and 1 % 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).
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.
418 of 519 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java. Counted over 519 of the 901 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
Most significant orphaned file · ×3chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1
Concentrated knowledge decay
What to do
Resolve the 415 Orphaned file finding(s) in Knowledge Freshness — start with MessageBottomLayout.java (2), ConversationViewModel.java (2), ConversationAdapter.java (2). — One of this dimension's main actionable groups (415 recommendation-level).
Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with ChatBaseFragment.java, ChatBaseViewModel.java, MessageHelper.java. — One of this dimension's main actionable groups (3 recommendation-level).
Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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 2 platform declaration(s) and 121 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
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 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.
`IChatView` declares 49 abstract methods: `addMessageListForward`, `addTopView`, `appendMessage`, `appendMessageList`, `appendMessageList`, `clearMessageList`, `clearReplyMessage`, `deleteMessage`, `deleteMessages`, `getChatBodyBottomLayout`, `getChatBodyTopLayout`, `getMessageList`, `getMessageListView`, `getRootView`, `getTitleBar`, `hideCurrentInput`, `hideRichInputPanel`, `isMultiSelect`, `notifyUserInfoChanged`, `revokeMessage`, `searchMessagePosition`, `searchMessagePositionByTime`, `setAitManager`, `setChatConfig`, `setInputMute`, `setItemClickListener`, `setLayoutCustom`, `setLoadHandler`, `setMessageBackground`, `setMessageBackgroundRes`, `setMessageProxy`, `setMessageReader`, `setMessageViewHolderFactory`, `setMultiSelectEnable`, `setNetWorkState`, `setReeditMessage`, `setReeditRichMessage`, `setReplyMessage`, `setTitleBarVisible`, `setTypeState`, and 9 more. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 49 declarations carry 46 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 46 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/interfaces/IChatView.java:23
`IMessageData` declares 21 abstract methods: `addMessageListForward`, `addPinMessage`, `appendMessage`, `appendMessageList`, `appendMessageList`, `clearMessageList`, `deleteMessage`, `deleteMessage`, `hasMoreForwardMessages`, `hasMoreNewerMessages`, `removePinMessage`, `revokeMessage`, `setHasMoreForwardMessages`, `setHasMoreNewerMessages`, `setMessageMode`, `setMultiSelect`, `updateMessage`, `updateMessage`, `updateMessage`, `updateMessageStatus`, `updateMultiSelectMessage`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 21 declarations carry 17 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 17 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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. — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/interfaces/IMessageData.java:14
`IMessageProxy` declares 21 abstract methods: `audioCall`, `captureVideo`, `getConversationId`, `getConversationType`, `hasPermission`, `onAIHelperClick`, `onActionClick`, `onCustomAction`, `onMultiActionClick`, `onTranslateAction`, `onTypeStateChange`, `pickMedia`, `sendAudio`, `sendCustomMessage`, `sendFile`, `sendImageMessage`, `sendLocationLaunch`, `sendRichTextMessage`, `sendTextMessage`, `takePicture`, `videoCall`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants 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. — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/interfaces/IMessageProxy.java:14
What to do
Split fat interfaces into focused role-interfaces so clients depend only on what they use.
Other · Code Health — Unreviewed-generation residue in this repository's Java: methods whose whole body only throws a "not implemented" or bare unsupported-operation exception, or returns a default value (or nothing) under a TODO/FIXME marker, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
`getSuffixPlayer` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it. — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:262
What to do
Finish or delete the methods that still throw "not implemented" or return a placeholder under a TODO, and replace placeholder text before shipping.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's Java: methods that only throw a "not implemented" exception, methods that take inputs and return a constant or do nothing, dead `if (false)` branches, and skeleton classes most of whose methods are holes.
Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.
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.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
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.
Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
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.
Do you agree with this assessment?
P1 · CI/CD gates0.0 / 10Critical✓ 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.
No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
What to do
Add a CI workflow that builds and runs the test suite on every push/PR.
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) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
`aisearchkit/build.gradle.kts` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — aisearchkit/build.gradle.kts:34
What to do
Run what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
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 `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 (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.
Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.
Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.
Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×14) — conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameDialog.java:249, common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/DateFormatUtils.java:38, common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:225, …
`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. (×2) — common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/CustomGestureDetector.kt:81, common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/CustomGestureDetector.kt:89
`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. — common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:214
`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. (×6) — common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:380, common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:807, common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:392, …
What to do
Swallowed exception (empty catch)
Do you agree with this assessment?
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.
Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether Java packages are null-marked and not undermined by heavy nullness suppression — a package under `@NullMarked` (or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, or a NullAway/Checker Framework configuration naming it) makes an unannotated reference exclude null, and `@SuppressWarnings("NullAway")`, `("nullness")`, `("null")` and `castToNonNull(…)` are what silence it.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
0/186 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
What to do
Declare the default where Java declares it: `@NullMarked` (org.jspecify.annotations) in each package's `package-info.java`, or once in `module-info.java`, and run NullAway (Error Prone) or the Checker Framework so the declaration is enforced. Then annotate the real exceptions `@Nullable` and resolve the suppressions rather than adding to them: a `@SuppressWarnings("NullAway")` or `castToNonNull(x)` on a value the checker could show to be null is a `NullPointerException` waiting for the path that makes it true — where the value genuinely cannot be null, say something the checker can see instead (a null check, `Objects.requireNonNull`, a non-null field initialised in the constructor).
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Unscored — 3 check(s) recorded observations but carry no score
These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.
X10 Duplicated predicate — 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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 5 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention 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 retention 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.
C5 Data-Subject Rights — Not assessed: these data-subject rights 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 data-subject rights 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.
P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 63 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — Not applicable: this repository's Java imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's Kotlin imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No class in this Java code is a Spring, JSR-330 or CDI singleton bean. No class in this Kotlin code is a Spring, JSR-330 or CDI singleton bean. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads.
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — the Android app did not build — `./gradlew :app:assembleDebug` exited 1: ei.agconnect:agconnect-core:1.7.2.300.
> Could not get resource 'https://developer.huawei.com/repo/com/huawei/agconnect/agconnect-core/1.7.2.300/agconnect-core-1.7.2.300.pom'.
> C…; runtime evidence skipped (launch chosen because app/build.gradle.kts applies the Android application plugin and gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .java suite was found but not re-run
D12 Dependency Hygiene — Not scored — a Gradle build resolved 138 artifact(s) across its subprojects (47 behind a shipped release, reported), but the currency signal was not established over the whole graph, so this dimension's own question is only partly answered. 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.
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. Aggregate roots were found in only one source directory (kit), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only — this repository's production source is .java, .kt, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D25 ADR Conformance — no ADRs to check
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
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) — 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.
D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
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
DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 5 domain event(s); its domain events are published by services or handlers — no domain entity raises one; no aggregate is declared and no domain structure surrounds the state-guarding types: not claimed as DDD
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
M4 Documentation accuracy — Not applicable: the 1 current-state document(s) make no claim of a kind M4 checks.
P12 CI test-gate honesty — no CI workflow found
P2 Observability — This repository's JVM source (9 module(s), 890 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM source, so there is no service whose uptime a failing dependency could take down
P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
P9 Domain vs controller coverage — coverage 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
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X12 Unreachable branch — X12 reached only 3% of this repository's production lines — java (118,389 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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 Java was read, and it logs through none that an assembled message defeats: java.util.logging's level methods, log4j 1, commons-logging, JBoss Logging and Flogger take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J or log4j 2 (`org.slf4j.Logger`, `org.apache.logging.log4j.Logger`, Lombok's `@Slf4j`) 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.
Duplicated block (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:811— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:811-818 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:878-885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:886` calls `add` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:819` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:56— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:56-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:56-63 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:78— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:78-85 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:70-77 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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 (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:203— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:203-210 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:189-196 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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 (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:233— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:233-240 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:234-241 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:241` calls `isEmpty` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:242` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:36— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:36-43 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java:36-43 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:85— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:85-92 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:85-92 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:170— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:170-177 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:160-167 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:52— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:52-59 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:76-83 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:52` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1560— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1560-1567 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1608-1615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1560` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:264— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:264-271 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:310-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:512— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:512-519 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:546-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:512` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1002— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1002-1009 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1021-1028 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1002` it begins part-way through the construct above it, so those exact lines 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundFrameLayout.java:42— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundFrameLayout.java:42-49 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundTextView.java:39-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:117— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:117-124 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectorFragment.java:84-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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:117` it begins part-way through the construct above it, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:123— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:123-130 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:120-127 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java` 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:117` calls `setVisibility` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:122` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:114— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:114-121 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java:96-103 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java` as WHOLE FILES: this scan already matched 7 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.
Duplicated block (8 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:84— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:84-91 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/viewmodel/SelectorViewModel.java:84-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. 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:299— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:299-306 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:276-283 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:299` it does not close everything it opens, so those 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, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:295` calls `setConversationFactory` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:272` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:533— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:533-540 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:522-529 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:146— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:146-153 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:289-296 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamMemberSelectActivity.java:67— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamMemberSelectActivity.java:67-74 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamMemberSelectActivity.java:60-67 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:51-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java:51-58 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java` 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.
Duplicated block (8 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:127— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:127-134 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:127-134 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:296— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:296-303 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:296-303 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:656— app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:656-665 | app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:678-688 — both copies are in the same file, so extract the 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:168— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:168-177 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:202-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:168` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:182— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:182-191 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:181-190 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:263— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:263-272 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:263-272 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:263` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:345— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:345-354 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:337-346 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:194— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:194-203 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:193-202 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:305— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:305-314 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:297-306 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:305` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:757— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:757-766 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:762-771 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:67— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:67-76 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java:67-76 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java` 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.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:229— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:229-238 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:198-207 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:229` it begins part-way through the construct above it, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:196` calls `setVisibility` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:227` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:245— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:245-254 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:219-228 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:339— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:339-348 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:201-210 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:339` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:40— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:40-49 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java:40-49 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java` 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:40` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:46— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:46-55 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:46-55 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAIMessageViewHolder.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAIMessageViewHolder.java:51-60 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:123-132 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAIMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:122` calls `showReceiveUIStyle` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAIMessageViewHolder.java:50` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:347— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:347-356 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2255-2264 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:347` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:97— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:97-106 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java:111-120 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java` as WHOLE FILES: this scan already matched 4 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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:116— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:116-125 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:413-422 — both copies are in the same file, so extract the 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java:172— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java:172-181 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java:191-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java: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.
Duplicated block (10 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:50— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:50-59 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/team/TeamListActivity.java:27-36 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:50` it does not close everything it opens, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunContactBottomConfirmDialog.java:31— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunContactBottomConfirmDialog.java:31-40 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/dialog/BaseTeamIdentifyDialog.java:42-51 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotCreateActivity.java:16— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotCreateActivity.java:16-25 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotEditActivity.java:16-25 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotCreateActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotEditActivity.java` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the 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 (10 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/page/BaseSearchActivity.java:127— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/page/BaseSearchActivity.java:127-136 | locationkit/src/main/java/com/netease/yunxin/kit/locationkit/LocationPageActivity.java:203-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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/page/BaseSearchActivity.java:127` it does not close everything it opens, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:76— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:76-85 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectorFragment.java:123-132 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:76` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:135— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:135-144 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectorFragment.java:104-113 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java: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 (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1801— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1801-1808 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1831-1837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1801` it begins part-way through the construct above it, so those 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:81— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:81-87 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionActivity.java:73-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java: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 (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:317— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:317-323 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:309-315 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:317` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:64— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:64-70 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java:64-70 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:98— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:98-104 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java:88-94 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java` 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java: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 (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:170— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:170-176 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:145-151 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:170` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:391— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:391-397 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:273-279 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:391` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:305— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:305-311 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:566-572 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:371— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:371-377 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:64-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:371` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:217— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:217-223 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:269-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:217` it does not close everything it opens, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:225` calls `setData`, `setValue` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:276` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:272— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:272-278 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/CollectionViewModel.java:102-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.
Duplicated block (7 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:24— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:24-30 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotListActivity.java:23-29 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunRecentForwardAdapter.java:33— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunRecentForwardAdapter.java:33-39 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/RecentForwardAdapter.java:32-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `holder` to `BaseSelectableViewHolder<FunForwardRecentSelectorViewHolderBinding>` in one and `BaseSelectableViewHolder<ForwardRecentSelectorViewHolderBinding>` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunRecentForwardAdapter.java:40` calls `setCornerRadius`, `dp2px` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/RecentForwardAdapter.java:39` 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 × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:103— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:103-109 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:102-108 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java: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. 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:691— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:691-697 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:404-410 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:700— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:700-706 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:413-419 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:156— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:156-162 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:219-225 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java` as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java: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. Note first that the copies are not typed on the same thing: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:80— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:80-86 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:142-148 — both copies are in the same file, so extract the 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatTeamActivity.java:33— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatTeamActivity.java:33-39 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatTeamActivity.java:45-51 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatPinFactory.java:19— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatPinFactory.java:19-25 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/CollectionViewHolderBaseFactory.java:19-25 — 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 (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:57— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:57-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatBotSubSessionChatActivity.java:57-63 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatBotSubSessionChatActivity.java` 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.
Duplicated block (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:413— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:413-419 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:399-405 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:127— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:127-133 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:126-132 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:148— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:148-154 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:147-153 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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.
Duplicated block (7 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:164— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:164-170 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:163-169 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:49— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:49-57 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:355-363 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:213— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:213-221 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:376-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.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:368— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:368-376 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:432-440 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:368` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:77— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:77-85 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java:84-92 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java` as WHOLE FILES: this scan already matched 3 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:65— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:65-73 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:66-74 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:65` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:276— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:276-284 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:265-273 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java` as WHOLE FILES: this scan already matched 9 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 (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:309— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:309-317 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:309-317 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:321` calls `d` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:321` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:264— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:264-272 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:263-271 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:206— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:206-214 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:207-215 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:275— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:275-283 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:254-262 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:245— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:245-253 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:290-300 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:245` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:130— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:130-138 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:891-899 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java: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 (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:261— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:261-269 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:291-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `callback` to `FetchCallback<V2NIMTopic>` in one and `FetchCallback<Void>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:330— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:330-338 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/CollectionViewModel.java:169-177 — 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 (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:142— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:142-150 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:164-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionFlowLayout.java:34— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionFlowLayout.java:34-42 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionGroupView.java:113-121 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:378— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:378-386 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:414-422 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java: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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:377— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:377-385 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:400-409 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:377` it begins part-way through the construct above it, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:21— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:21-29 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIContactSelectorActivity.java:20-28 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:21` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:48— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:48-56 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java: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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:90— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:90-98 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:88-96 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:90` it begins part-way through the construct above it, so those 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:109— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:109-117 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:128-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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java: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 (9 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:213— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:213-221 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:267-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:223— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:223-231 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:277-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. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:223` it does not close everything it opens, so those 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 `data` to `V2NIMConversationResult` in one and `V2NIMLocalConversationResult` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:172— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:172-180 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:191-199 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java` as WHOLE FILES: this scan already matched 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigActivity.java:72— app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigActivity.java:72-83 | app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigParseActivity.java:39-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigActivity.java:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:464— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:464-475 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1513-1524 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java: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 (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:235— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:235-246 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:235-246 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:330— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:330-341 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:322-333 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:330` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:119— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:119-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:114-125 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:117` calls `ViewModelProvider`, `get`, `setMode` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:113` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:172— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:172-183 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:192-203 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java: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.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:567— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:567-578 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:580-591 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:691— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:691-702 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:696-707 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:546— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:546-557 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:402-413 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:561— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:561-572 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:417-428 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:631— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:631-642 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:486-497 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:85— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:85-96 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java:79-90 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java: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.
Duplicated block (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:38— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:38-49 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java:39-50 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:38` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:216— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:216-227 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:184-195 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:196` calls `setVisibility` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:228` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:237— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:237-248 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:141-152 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:44— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:44-55 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:41-52 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:43` calls `setVisibility` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:40` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:165— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:165-176 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:170-181 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java: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 (12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:803— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:803-814 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:820-831 — both copies are in the same file, so extract the 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:815` calls `refreshConversationReadTime` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:832` 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:129— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:129-140 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:145-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java: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 (12 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:131— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:131-142 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:187-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java: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.
Duplicated block (12 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:53— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:53-64 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/JoinTeamViewModel.java:51-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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `param` to `UserWithFriend` in one and `V2NIMTeam` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunSelectedListAdapter.java:31— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunSelectedListAdapter.java:31-42 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/SelectedListAdapter.java:30-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `holder` to `SelectedViewHolder<FunFriendSelectedViewHolderBinding>` in one and `SelectedViewHolder<FriendSelectedViewHolderBinding>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:41— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:41-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamListViewHolder.java:38-49 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:41` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:40` calls `setCornerRadius` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamListViewHolder.java:36` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:56— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:56-67 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java:56-67 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java` as WHOLE FILES: this scan already matched 7 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:87— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:87-98 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:87-98 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java` as WHOLE FILES: this scan already matched 7 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java: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. 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:44— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:44-54 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:44-54 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:169— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:169-179 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:163-173 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java` as WHOLE FILES: this scan already matched 9 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 (11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:132— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:132-143 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:136-146 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:132` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:219— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:219-229 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:273-283 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:219` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:89— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:89-99 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:79-89 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:89` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:175— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:175-185 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:205-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. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java: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 (11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:35— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:35-45 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:34-44 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java` as WHOLE FILES: this scan already matched 7 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:133— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:133-143 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java:133-143 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java` 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 (11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatForwardActivity.java:31— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatForwardActivity.java:31-41 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionDetailActivity.java:32-42 — 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 (11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:96— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:96-106 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchViewModel.java:118-128 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:236— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:236-246 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:284-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:235` calls `d`, `getServerExtension` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:283` 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 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotInfoActivity.java:23— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotInfoActivity.java:23-33 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotInfoActivity.java:19-29 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotInfoActivity.java:23` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:41— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:41-51 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotListActivity.java:40-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:41` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotListActivity.java:36` calls `setImageResource` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:36` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:27— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:27-37 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ForwardSelectorActivity.java:26-36 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:38` calls `changeStatusBarColor` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ForwardSelectorActivity.java:37` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:218— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:218-228 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:147-157 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:88— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:88-98 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:127-137 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java: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 (11 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:125— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:125-135 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java:133-143 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java: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 (11 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:77— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:77-87 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java:77-87 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java` as WHOLE FILES: this scan already matched 7 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:149— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:149-159 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java:156-166 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:161` calls `getConversationType`, `getType` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java:168` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:81— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:81-91 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:81-91 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupAddViewModel.java:216— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupAddViewModel.java:216-226 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:389-399 — 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupAddViewModel.java:216` it does not close everything it opens, so those 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 `callback` to `SubmitCallback` in one and `FetchCallback<Void>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (11 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:301— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:301-311 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:235-245 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java` as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:301` it does not close everything it opens, so those 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:326— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:326-336 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:257-267 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java` as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:326` it does not close everything it opens, so those 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:118— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:118-128 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamSettingMemberAdapter.java:40-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:118` it does not close everything it opens, so those exact lines 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:110— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:110-120 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamSettingMemberAdapter.java:39-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:110` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:837— app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:837-842 | app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:870-875 — both copies are in the same file, so extract the 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:889— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:889-894 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:917-922 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:889` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:266— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:266-271 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:175-181 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:266` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:218— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:218-223 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:204-209 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:218` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:81— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:81-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:111-116 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:118` calls `replaceEmoticons`, `getContext` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:87` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:89— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:89-94 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:104-109 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java` as WHOLE FILES: this scan already matched 8 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. If that is what happened, the fix is to keep one copy and have the 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:89` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:642— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:642-647 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:909-914 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:229— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:229-234 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:278-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:235` calls `d`, `getServerExtension` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:284` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:232— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:232-237 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:391-396 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:232` it does not close everything it opens, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:231` calls `d` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:390` 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 × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:267— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:267-272 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:283-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:267` it does not close everything it opens, so those 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:266` calls `d` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:282` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (6 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:152— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:152-157 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupSettingActivity.java:324-329 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:648— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:648-653 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:623-628 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:648` it does not close everything it opens, so those exact lines 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:122— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:122-127 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:87-92 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java` as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:122` it does not close everything it opens, so those 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:36— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:36-41 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:35-40 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:227— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:227-232 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:227-232 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (6 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:72— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:72-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java:72-77 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:41— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:41-46 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:41-46 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: the declarations holding them bind `parent` to `ViewGroup` in one and `android.view.ViewGroup` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:161— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:161-166 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:162-167 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:322— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:322-327 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:332-337 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:404— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:404-409 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:414-419 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:500— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:500-505 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:513-518 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (6 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:59— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:59-64 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java:60-65 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (6 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/FunSearchMessageViewHolder.java:63— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/FunSearchMessageViewHolder.java:63-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/SearchMessageViewHolder.java:69-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:71— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:71-76 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:70-75 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (6 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundFrameLayout.java:51— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundFrameLayout.java:51-56 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundTextView.java:48-53 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
TooManyMethods: ChatBaseViewModel chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:100— TooManyMethods — 98 methods. The bar is 30 methods; this is 68 over it, 3.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatBaseFragment chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:142— TooManyMethods — 96 methods. The bar is 30 methods; this is 66 over it, 3.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: MessageHelper chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:97— TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.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: CropImageView common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:35— TooManyMethods — 81 methods. The bar is 30 methods; this is 51 over it, 2.70× 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: ConversationGroupViewModel conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:44— TooManyMethods — 73 methods. The bar is 30 methods; this is 43 over it, 2.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:55— TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. Most of these members implement interfaces.IChatView (46 of 62 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: FunChatView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:55— TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. Most of these members implement interfaces.IChatView (46 of 62 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
TooManyMethods: ChatMessageListView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ChatMessageListView.java:43— TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.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: MessageBottomLayout chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:70— 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: MessageBottomLayout chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:73— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: PhotoView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:32— TooManyMethods — 57 methods. The bar is 30 methods; this is 27 over it, 1.90× 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: ChatMessageBean chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:38— 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: ScaleAttache common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleAttache.kt:29— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× 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: ChatBotSubSessionViewModel chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:67— TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ActivityBuilder common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:432— 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: ContactSelectorViewModel contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:51— 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: ChatBotSubSessionListViewModel chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:59— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ConversationBaseFragment conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:67— TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatMessageAdapter chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:48— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatBaseMessageViewHolder chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:54— TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: CropOverlayView common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:25— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ScaleImageView common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleImageView.kt:18— TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ConversationAdapter conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:28— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.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: ConversationView conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:30— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ContactListView contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/ContactListView.java:37— TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.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.
Duplicated block (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:88— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:88-102 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java:95-109 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java` as WHOLE FILES: this scan already matched 3 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:288— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:288-302 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:277-291 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java` as WHOLE FILES: this scan already matched 9 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 (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchDateActivity.java:28— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchDateActivity.java:28-42 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateActivity.java:24-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchDateActivity.java:28` it does not close everything it opens, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchDateActivity.java:27` calls `changeStatusBarColor` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateActivity.java:23` 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:654— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:654-668 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:659-673 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionBaseViewHolder.java:136— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionBaseViewHolder.java:136-150 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionBaseViewHolder.java:137-151 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionBaseViewHolder.java` 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatPinActivity.java:61— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatPinActivity.java:61-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionActivity.java:54-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatReaderBaseActivity.java:84— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatReaderBaseActivity.java:84-98 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/VerifyBaseActivity.java:72-86 — 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 (15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2866— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2866-2880 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2913-2927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2866` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:726— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:726-740 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:757-771 — both copies are in the same file, so extract the 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 (15 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:49— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:49-63 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:65-79 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:49` 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:348— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:348-362 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:352-366 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAISelectedAdapter.java:33— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAISelectedAdapter.java:33-47 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AISelectedAdapter.java:31-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAISelectedAdapter.java:33` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `holder` to `BaseSelectableViewHolder<FunAiSelectedSelectorViewHolderBinding>` in one and `BaseSelectableViewHolder<ContactAiSelectedSelectorViewHolderBinding>` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAISelectedAdapter.java:32` calls `setCornerRadius`, `dp2px` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AISelectedAdapter.java:30` 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 × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:50— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:50-64 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:30-44 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:50` it does not close everything it opens, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:30— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:30-44 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:30-44 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:30` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:47— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:47-61 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotListViewModel.java:40-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialog.java:37— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialog.java:37-51 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseSelectedDialog.java:38-52 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialog.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseSelectedDialog.java` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:141— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:141-155 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseForwardSelectorActivity.java:267-281 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java: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 (15 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:190— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:190-204 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:209-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:190` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:80— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:80-94 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:90-104 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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. Note first that the copies are not typed on the same thing: `ConversationConstant` names `com.netease.yunxin.kit.conversationkit.local.ui.common.ConversationConstant` in one and `com.netease.yunxin.kit.conversationkit.ui.common.ConversationConstant` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:202— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:202-216 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:154-168 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (15 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:132— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:132-146 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java:139-153 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (15 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:66— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:66-80 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/viewmodel/SelectorViewModel.java:66-80 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java: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. Note first that the copies are not typed on the same thing: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:121— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:121-135 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:123-137 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java: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 (15 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:470— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:470-484 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:455-469 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:470` 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/FunReaderViewHolder.java:30— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/FunReaderViewHolder.java:30-44 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/ReadUserViewHolder.java:30-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:849— app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:849-861 | app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:883-895 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:849` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:475— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:475-487 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:532-544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:475` it begins part-way through the construct above it, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:42— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:42-54 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatBotSubSessionChatActivity.java:42-54 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatBotSubSessionChatActivity.java` 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:42` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:51-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:55-67 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:158— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:158-170 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:160-172 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:50— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:50-62 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:50-62 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:106— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:106-118 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:105-117 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:106` 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:105` calls `i` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:104` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:610— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:610-622 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:465-477 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:610` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1101— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1101-1113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:1028-1040 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1101` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:55— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:55-67 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java:52-64 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:55` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:51-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:51-63 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:143— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:143-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:142-154 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 100 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:83— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:83-95 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:83-95 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java` as WHOLE FILES: this scan already matched 5 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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1057— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1057-1069 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1077-1089 — both copies are in the same file, so extract the 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:370— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:370-382 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:374-386 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:107— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:107-119 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java:107-119 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `IndexPinyinBean` names `com.netease.yunxin.kit.common.ui.widgets.indexbar.bean.IndexPinyinBean` in one and `com.netease.yunxin.kit.contactkit.ui.indexbar.bean.IndexPinyinBean` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:93— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:93-105 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/page/BaseSearchActivity.java:234-246 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:91` calls `setTextColor`, `getResources`, `getColor` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/page/BaseSearchActivity.java:232` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:68— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:68-80 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:65-77 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java` 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:97— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:97-109 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java:97-109 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java: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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (13 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:74— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:74-86 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:62-74 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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 (13 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:36— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:36-48 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:36-48 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java` as WHOLE FILES: this scan already matched 7 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (13 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:735— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:735-747 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:813-825 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:735` it does not close everything it opens, so those 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:84— localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:84-96 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:62-74 — before extracting anything, compare `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java` as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java: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 (13 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamSettingMemberAdapter.java:57— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamSettingMemberAdapter.java:57-69 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamSettingMemberAdapter.java:56-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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:601— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:601-613 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:649-661 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:601` 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:600` calls `getAitBlockFromMsg` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:648` 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.
ClassTooLong: ChatBaseFragment chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:142— ClassTooLong — 2079 significant lines (blank, comment-only and punctuation-only lines excluded), 96 methods. The bar is 400 significant lines; this is 1679 over it, 5.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.
ClassTooLong: ChatBaseViewModel chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:100— ClassTooLong — 1313 significant lines (blank, comment-only and punctuation-only lines excluded), 98 methods. The bar is 400 significant lines; this is 913 over it, 3.28× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MessageHelper chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:97— ClassTooLong — 1066 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 666 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CropImageView common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:35— ClassTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded), 81 methods. The bar is 400 significant lines; this is 514 over it, 2.29× 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: PhotoView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:32— ClassTooLong — 831 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 431 over it, 2.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ConversationGroupViewModel conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:44— ClassTooLong — 810 significant lines (blank, comment-only and punctuation-only lines excluded), 73 methods. The bar is 400 significant lines; this is 410 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.
ClassTooLong: MessageBottomLayout chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:73— ClassTooLong — 703 significant lines (blank, comment-only and punctuation-only lines excluded), 57 methods. The bar is 400 significant lines; this is 303 over it, 1.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: ChatBaseMessageViewHolder chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:54— ClassTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 299 over it, 1.75× 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: ChatBotSubSessionViewModel chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:67— ClassTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 281 over it, 1.70× 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: MessageBottomLayout chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:70— ClassTooLong — 669 significant lines (blank, comment-only and punctuation-only lines excluded), 66 methods. The bar is 400 significant lines; this is 269 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ContactSelectorViewModel contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:51— ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 235 over it, 1.59× 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: MainActivity app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:112— ClassTooLong — 601 significant lines (blank, comment-only and punctuation-only lines excluded), 24 methods. The bar is 400 significant lines; this is 201 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ChatBotSubSessionListViewModel chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:59— ClassTooLong — 595 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 195 over it, 1.49× 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: ConversationBaseFragment conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:67— ClassTooLong — 586 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 186 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CropOverlayView common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:25— ClassTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 159 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: MessageOperateUtils chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:67— ClassTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 147 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ConversationViewModel localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:78— ClassTooLong — 545 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 145 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: ScaleAttache common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleAttache.kt:29— ClassTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. The bar is 400 significant lines; this is 118 over it, 1.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: BitmapUtils common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:33— ClassTooLong — 496 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 96 over it, 1.24× 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: ConversationViewModel conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:78— ClassTooLong — 486 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 86 over it, 1.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: CustomDatePicker common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:22— ClassTooLong — 485 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 85 over it, 1.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: TeamUserManager chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:44— ClassTooLong — 473 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 73 over it, 1.18× 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: FunChatView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:55— ClassTooLong — 468 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 400 significant lines; this is 68 over it, 1.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.
ClassTooLong: ChatUtils chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:65— ClassTooLong — 468 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. The bar is 400 significant lines; this is 68 over it, 1.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.
ClassTooLong: ChatView chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:55— ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 67 over it, 1.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.
FileTooLong: fragment/ChatBaseFragment.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java— FileTooLong — 2213 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ChatBaseFragment (142-3091). The bar is 500 significant lines; this is 1713 over it, 4.43× 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: viewmodel/ChatBaseViewModel.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java— FileTooLong — 1404 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ChatBaseViewModel (100-2046). The bar is 500 significant lines; this is 904 over it, 2.81× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: common/MessageHelper.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java— FileTooLong — 1154 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MessageHelper (97-1965). The bar is 500 significant lines; this is 654 over it, 2.31× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: crop/CropImageView.java common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java— FileTooLong — 939 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: CropImageView (35-1984). The bar is 500 significant lines; this is 439 over it, 1.88× 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: media/PhotoView.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java— FileTooLong — 855 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: PhotoView (32-1480). The bar is 500 significant lines; this is 355 over it, 1.71× 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: viewmodel/ConversationGroupViewModel.java conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java— FileTooLong — 847 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ConversationGroupViewModel (44-1205). The bar is 500 significant lines; this is 347 over it, 1.69× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: view/MessageBottomLayout.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java— FileTooLong — 763 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MessageBottomLayout (73-1131). The bar is 500 significant lines; this is 263 over it, 1.53× 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: viewholder/ChatBaseMessageViewHolder.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java— FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ChatBaseMessageViewHolder (54-1198). The bar is 500 significant lines; this is 245 over it, 1.49× 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: viewmodel/ChatBotSubSessionViewModel.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java— FileTooLong — 740 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ChatBotSubSessionViewModel (67-987). The bar is 500 significant lines; this is 240 over it, 1.48× 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: view/MessageBottomLayout.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java— FileTooLong — 730 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MessageBottomLayout (70-1052). The bar is 500 significant lines; this is 230 over it, 1.46× 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: main/MainActivity.java app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java— FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: MainActivity (112-968). The bar is 500 significant lines; this is 205 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: forward/ContactSelectorViewModel.java contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java— FileTooLong — 677 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ContactSelectorViewModel (51-1055). The bar is 500 significant lines; this is 177 over it, 1.35× 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: viewmodel/ChatBotSubSessionListViewModel.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java— FileTooLong — 647 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: ChatBotSubSessionListViewModel (59-901). The bar is 500 significant lines; this is 147 over it, 1.29× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: page/ConversationBaseFragment.java conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java— FileTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ConversationBaseFragment (67-953). The bar is 500 significant lines; this is 141 over it, 1.28× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: viewmodel/ConversationViewModel.java localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java— FileTooLong — 615 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: ConversationViewModel (78-885). The bar is 500 significant lines; this is 115 over it, 1.23× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: common/MessageOperateUtils.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java— FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: MessageOperateUtils (67-821). The bar is 500 significant lines; this is 106 over it, 1.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: crop/CropOverlayView.java common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java— FileTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: CropOverlayView (25-1019). The bar is 500 significant lines; this is 74 over it, 1.15× 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: activity/BaseTeamSettingActivity.java teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java— FileTooLong — 564 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: BaseTeamSettingActivity (71-744). The bar is 500 significant lines; this is 64 over it, 1.13× 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: viewmodel/ConversationViewModel.java conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java— FileTooLong — 556 significant lines (blank, comment-only and punctuation-only lines excluded), about 87% of them inside a single declaration: ConversationViewModel (78-804). The bar is 500 significant lines; this is 56 over it, 1.11× 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: scaleimage/ScaleAttache.kt common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleAttache.kt— FileTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: ScaleAttache (29-854). The bar is 500 significant lines; this is 38 over it, 1.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: common/ChatUtils.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java— FileTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: ChatUtils (65-757). The bar is 500 significant lines; this is 24 over it, 1.05× 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: crop/BitmapUtils.java common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java— FileTooLong — 519 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: BitmapUtils (33-856). The bar is 500 significant lines; this is 19 over it, 1.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
FileTooLong: view/FunChatView.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java— FileTooLong — 515 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: FunChatView (55-767). The bar is 500 significant lines; this is 15 over it, 1.03× 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: view/ChatView.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java— FileTooLong — 514 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ChatView (55-772). The bar is 500 significant lines; this is 14 over it, 1.03× 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: cache/TeamUserManager.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java— FileTooLong — 508 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: TeamUserManager (44-872). The bar is 500 significant lines; this is 8 over it, 1.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.
D4 · Code Duplication· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×25
Members sharing a duplicated core (4 members, 50+ identical tokens) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:804— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:804-822 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:871-909 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:91-109 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java:91-109 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:215— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:215-363 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:272-283 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:309-350 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:328-339 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatP2PActivity.java:43— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatP2PActivity.java:43-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatTeamActivity.java:32-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatP2PActivity.java:42-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatTeamActivity.java:44-70 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:67— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:67-111 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:73-127 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:67-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:71-125 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:132— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:132-165 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:133-170 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:126-159 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:118-155 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:57— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:57-82 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:76-105 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:58-82 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:72-101 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:122— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:122-131 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:240-249 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:121-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:225-234 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:296— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:296-317 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:381-401 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:295-316 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:373-393 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:256— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:256-269 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:142-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:221-234 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:144-157 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:37— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:37-135 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatRichTextPinViewHolder.java:37-57 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java:38-132 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatRichTextPinViewHolder.java:37-79 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:109— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:109-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:103-114 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:109-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:103-114 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java:27— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java:27-40 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatImagePinViewHolder.java:25-38 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionImageViewHolder.java:26-39 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatImagePinViewHolder.java:25-38 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java:42— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java:42-73 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatLocationPinViewHolder.java:42-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionLocationViewHolder.java:41-72 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatLocationPinViewHolder.java:41-75 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:58— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:58-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:64-74 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:57-67 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:64-74 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:168— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:168-178 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:140-150 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:168-178 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:137-147 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:127— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:127-149 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:160-183 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:105-127 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:138-161 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:47— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:47-64 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ConversationTopAdapter.java:54-72 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java:47-64 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/ConversationTopAdapter.java:54-72 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:157— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:157-169 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:137-149 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:175-191 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:137-149 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:75— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:75-119 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:80-125 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:102-159 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:80-125 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:26— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:26-48 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java:26-48 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationHeaderViewHolder.java:35-61 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java:26-48 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationP2PViewHolder.java:27— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationP2PViewHolder.java:27-55 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationP2PViewHolder.java:26-54 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationP2PViewHolder.java:37-76 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationP2PViewHolder.java:26-54 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTopViewHolder.java:25— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTopViewHolder.java:25-40 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTopViewHolder.java:24-42 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationTopViewHolder.java:37-56 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationTopViewHolder.java:24-42 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:83— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:83-98 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:106-121 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:83-98 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:106-121 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:620— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:620-629 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:632-641 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:586-595 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:598-607 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:42— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:42-132 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamSettingMemberAdapter.java:35-53 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:40-124 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamSettingMemberAdapter.java:34-52 — 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 (9 corresponding lines) · ×23
Edited copy of a member (9 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:35— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:35-43 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java:35-43 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundFrameLayout.java:41— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundFrameLayout.java:41-49 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/RoundTextView.java:38-46 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:264— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:264-272 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:287-295 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:50— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:50-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java:50-58 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:203— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:203-215 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:217-225 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:113— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:113-121 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java:95-103 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamMemberSelectActivity.java:66— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamMemberSelectActivity.java:66-74 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamMemberSelectActivity.java:59-67 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:77— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:77-85 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:69-77 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:40— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:40-49 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:56-64 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:202— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:202-210 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:188-196 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:169— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:169-177 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:159-167 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:413— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:413-423 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:330-338 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:95— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:95-103 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:112-120 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:55— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:55-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:55-63 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (9 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2720— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2720-2728 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2730-2738 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1133— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1133-1141 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1150-1158 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:336— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:336-344 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:335-343 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:148— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:148-157 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateNicknameActivity.java:139-147 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:424— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:424-437 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/RecordView.java:105-113 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:251— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:251-259 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:236-244 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/BaseTeamProfileActivity.java:47— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/BaseTeamProfileActivity.java:47-55 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:51-60 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:93— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:93-101 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:146-154 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:274— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:274-285 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:257-265 — 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 (5 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/mine/EditUserInfoActivity.java:49— app/src/main/java/com/netease/yunxin/app/im/main/mine/EditUserInfoActivity.java:49-53 | app/src/main/java/com/netease/yunxin/app/im/main/mine/MineInfoActivity.java:58-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:79— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:79-83 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:400-404 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java` as WHOLE FILES: this scan already matched 4 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.
Duplicated block (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:143— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:143-147 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:142-146 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java: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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:242— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:242-246 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:297-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. 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:65— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:65-69 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotListViewModel.java:58-62 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java: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.
Duplicated block (5 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:204— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:204-208 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:235-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:204` it does not close everything it opens, so those exact lines 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:105— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:105-109 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameDialog.java:135-139 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:144— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:144-148 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupSettingActivity.java:316-320 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupSettingActivity.java:315` calls `setVisibility` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:143` 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 (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:173— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:173-177 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:159-163 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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 (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:73— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:73-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:73-77 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `itemView` to `View` in one and `android.view.View` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:171— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:171-175 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:171-175 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:106— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:106-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:105-109 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:71— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:71-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:71-75 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:132— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:132-136 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:127-131 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1055— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1055-1059 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:980-984 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:976` calls `clearFocus` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1050` 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 × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatForwardActivity.java:23— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatForwardActivity.java:23-27 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionDetailActivity.java:24-28 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatReadStateViewModel.java:52— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatReadStateViewModel.java:52-56 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchViewModel.java:136-140 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:189— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:189-193 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:119-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (5 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:179— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:179-183 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java:179-183 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java` as WHOLE FILES: this scan already matched 7 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. 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (5 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:165— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:165-169 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:166-170 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java` as WHOLE FILES: this scan already matched 7 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. 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (5 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:139— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:139-143 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:133-137 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java` as WHOLE FILES: this scan already matched 9 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:131` calls `updateInputHintInfo` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:136` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (5 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:235— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:235-239 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:261-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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:235` it does not close everything it opens, so those 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, `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:241` calls `putExtra` and `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:266` 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 × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:125— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:125-129 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:147-151 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:130` calls `notifyItemChanged` and `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:152` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication· Edited copy of a member (13 corresponding lines) · ×22
Edited copy of a member (13 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:961— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:961-978 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:980-992 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunSelectedListDialogAdapter.java:29— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunSelectedListDialogAdapter.java:29-41 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/SelectedListDialogAdapter.java:28-43 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:206— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:206-218 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:220-232 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunRecentForwardAdapter.java:32— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunRecentForwardAdapter.java:32-45 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/RecentForwardAdapter.java:31-43 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:170— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:170-182 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:184-196 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:217— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:217-229 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:271-283 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/BaseAddFriendActivity.java:95— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/BaseAddFriendActivity.java:95-108 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/BaseTeamSearchActivity.java:92-104 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/BaseAddFriendActivity.java:120— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/BaseAddFriendActivity.java:120-132 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/addfriend/FunAddFriendActivity.java:39-51 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:149— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:149-165 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:177-189 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:155— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:155-167 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java: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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:101— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:101-113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:116-128 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:75— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:75-88 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:138-150 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:121— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:121-135 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:86-98 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:504— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:504-516 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:524-537 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:44— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:44-56 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java:45-57 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:50— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:50-62 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:49-61 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:76— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:76-88 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java: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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:320— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:320-333 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:320-332 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1233— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1233-1245 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1336-1351 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:129— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:129-141 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/blacklist/FunBlackListActivity.java:62-74 — 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) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/PushConfigViewModel.java:46— app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/PushConfigViewModel.java:46-58 | app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigViewModel.java:21-33 — 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) app/src/main/java/com/netease/yunxin/app/im/utils/DataUtils.java:237— app/src/main/java/com/netease/yunxin/app/im/utils/DataUtils.java:237-250 | app/src/main/java/com/netease/yunxin/app/im/utils/DataUtils.java:264-276 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (14 corresponding lines) · ×19
Edited copy of a member (14 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:137— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:137-150 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:56-76 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:599— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:599-613 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:648-661 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTeamViewHolder.java:24— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTeamViewHolder.java:24-37 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationTeamViewHolder.java:24-38 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:377— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:377-390 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:413-426 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunContactSelectorActivity.java:41— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunContactSelectorActivity.java:41-57 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ContactSelectorActivity.java:21-34 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1000— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1000-1013 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:839-852 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunUserInfoActivity.java:60— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunUserInfoActivity.java:60-73 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:164-177 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:60— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:60-73 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:61-74 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java:175— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java:175-188 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/WatchImageVideoViewModel.java:194-207 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1485— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1485-1498 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1506-1519 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:194— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:194-207 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:193-207 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotInfoActivity.java:20— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotInfoActivity.java:20-33 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotInfoActivity.java:16-29 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:208— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:208-221 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:246-260 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:272— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:272-286 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:288-301 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:171— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:171-184 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:173-186 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:790— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:790-803 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:868-884 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatMsgCache.java:58— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatMsgCache.java:58-71 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:554-567 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2740— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2740-2753 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2755-2768 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:86— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:86-99 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:102-115 — 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 (8 corresponding lines) · ×18
Edited copy of a member (8 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:690— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:690-697 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:403-410 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:699— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:699-706 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:412-419 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:317— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:317-324 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:326-333 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:63— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:63-70 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java:63-70 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:151— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:151-158 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:173-180 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:198— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:198-208 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:272-279 — 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) app/src/main/java/com/netease/yunxin/app/im/main/mine/TypeSelectActivity.java:37— app/src/main/java/com/netease/yunxin/app/im/main/mine/TypeSelectActivity.java:37-44 | app/src/main/java/com/netease/yunxin/app/im/welcome/ServerActivity.java:27-35 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1255— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1255-1263 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1277-1284 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageSearchUtils.java:196— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageSearchUtils.java:196-203 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:197-204 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyAdapter.java:37— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyAdapter.java:37-44 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/adapter/ContactAdapter.java:46-54 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerListActivity.java:42— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerListActivity.java:42-49 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamManagerListActivity.java:41-48 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:761— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:761-769 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1788-1795 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatReaderActivity.java:32— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatReaderActivity.java:32-41 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatReaderActivity.java:31-38 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatRichTextPinViewHolder.java:27— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatRichTextPinViewHolder.java:27-34 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatRichTextPinViewHolder.java:27-34 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:39— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:39-46 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java: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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:133— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:133-140 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:134-142 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:113— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:113-120 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateNicknameActivity.java:106-113 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitManager.java:443— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitManager.java:443-450 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:404-414 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×16
Edited copy of a member (11 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:367— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:367-377 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:60-70 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1495— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1495-1505 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1895-1905 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:127— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:127-138 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:889-899 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:294— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:294-305 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:295-305 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:258— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:258-268 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:261-271 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:91— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:91-101 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatPinActivity.java:79-89 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamInfoActivity.java:29— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamInfoActivity.java:29-39 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamInfoActivity.java:21-31 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunCollectionViewHolderFactory.java:52— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunCollectionViewHolderFactory.java:52-62 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/CollectionViewHolderFactory.java:52-62 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:236— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:236-246 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/contact/FunContactFragment.java: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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:19— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:19-29 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIContactSelectorActivity.java:18-28 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (11 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/FunContactViewHolderFactory.java:23— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/FunContactViewHolderFactory.java:23-33 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/ContactViewHolderFactory.java:23-33 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:35— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:35-46 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatHistoryActivity.java:34-44 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:215— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:215-228 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchByMemberBaseActivity.java:165-175 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamMemberSelectActivity.java:35— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamMemberSelectActivity.java:35-45 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamMemberSelectActivity.java:28-38 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunContactBottomConfirmDialog.java:66— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunContactBottomConfirmDialog.java:66-76 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/dialog/BaseTeamIdentifyDialog.java:87-98 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/custom/MultiForwardAttachment.java:139— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/custom/MultiForwardAttachment.java:139-149 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/custom/RichTextAttachment.java:60-71 — 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.
Swallowed exception (empty catch) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameDialog.java:249— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/DateFormatUtils.java:38— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:225— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:235— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:67— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:432— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:478— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:971— 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/CommonAlertDialog.kt:73— 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:686— 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:94— 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:638— 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) app/src/main/java/com/netease/yunxin/app/im/utils/AppUtils.java:21— 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) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/SettingUIKitActivity.java:150— 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.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×13
Edited copy of a member (15 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:39— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:39-68 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:49-91 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:103— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:103-118 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:103-117 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:215— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:215-229 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:518-541 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:873— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:873-887 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:911-925 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1016— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1016-1030 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:860-875 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:261— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:261-275 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:277-291 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunPinViewHolderFactory.java:67— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunPinViewHolderFactory.java:67-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/PinViewHolderFactory.java:56-71 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:25— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:25-40 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ForwardSelectorActivity.java:24-38 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamUpdateIconActivity.java:30— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamUpdateIconActivity.java:30-44 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamUpdateIconActivity.java:21-35 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:802— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:802-817 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:819-833 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:74— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:74-88 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/ai/FunAIUserListActivity.java:51-65 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:75— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:75-89 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:72-86 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:382— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:382-396 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:398-412 — 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 (22 corresponding lines) · ×12
Edited copy of a member (22 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:109— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:109-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java:109-130 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:33— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionChatActivity.java:33-54 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatBotSubSessionChatActivity.java:33-54 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:203— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:203-225 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:204-225 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:678— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:678-699 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:514-535 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (22 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:270— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:270-291 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:273-294 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:108— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:108-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:104-125 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:160— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:160-182 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:196-217 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:110— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatPinActivity.java:110-131 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatPinActivity.java:98-119 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:313— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:313-334 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:305-326 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1231— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1231-1252 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:124-145 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:822— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:822-843 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:689-710 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java:89— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java:89-110 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java:129-150 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×12
Edited copy of a member (18 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:253— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:253-270 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:286-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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:401— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:401-418 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:367-384 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:80— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:80-97 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionActivity.java:72-89 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:255— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:255-272 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:255-272 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:132— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:132-149 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java:132-151 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:231— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:231-248 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:283-304 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:740— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:740-757 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:760-778 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:65— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:65-85 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:64-81 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:575— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:575-592 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:600-619 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerActivity.java:34— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerActivity.java:34-51 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamManagerActivity.java:33-50 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:138— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:138-155 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:140-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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:118— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:118-140 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:142-159 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (17 corresponding lines) · ×12
Edited copy of a member (17 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:138— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:138-154 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:137-153 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2481— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2481-2497 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2987-3009 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:236— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:236-252 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchByMemberBaseActivity.java:183-199 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:113— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:113-129 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:411-428 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:98— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:98-114 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:145-162 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:91— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:91-107 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationGroupSystemBarHelper.java:20-36 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchViewHolderFactory.java:23— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchViewHolderFactory.java:23-39 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/search/SearchViewHolderFactory.java:23-39 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:606— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:606-622 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:461-477 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1183— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1183-1200 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1203-1219 — 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) app/src/main/java/com/netease/yunxin/app/im/main/mine/EditUserInfoActivity.java:119— app/src/main/java/com/netease/yunxin/app/im/main/mine/EditUserInfoActivity.java:119-140 | app/src/main/java/com/netease/yunxin/app/im/main/mine/MineInfoActivity.java:152-168 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:782— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:782-798 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:846-862 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:704— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:704-722 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:729-745 — 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 (10 corresponding lines) · ×12
Edited copy of a member (10 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:318— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:318-327 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:343-352 — 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) app/src/main/java/com/netease/yunxin/app/im/main/mine/EditUserInfoActivity.java:107— app/src/main/java/com/netease/yunxin/app/im/main/mine/EditUserInfoActivity.java:107-117 | app/src/main/java/com/netease/yunxin/app/im/main/mine/TypeSelectActivity.java:79-88 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:57— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:57-66 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/dialog/ImageChoiceDialog.java:49-58 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:50— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:50-59 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ait/AtContactsModel.java:74-83 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:154— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:154-165 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java:111-120 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotEditActivity.java:17— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotEditActivity.java:17-27 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotCreateActivity.java:17-26 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:267— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:267-276 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:409-418 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotEditNameActivity.java:22— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotEditNameActivity.java:22-31 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotEditNameActivity.java:20-31 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:875— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:875-886 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageParamBuildUtils.java:125-134 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotViewConfigActivity.java:30— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotViewConfigActivity.java:30-39 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotViewConfigActivity.java: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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:33— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:33-42 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/search/GlobalSearchActivity.java:15-24 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:139— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:139-149 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:123-132 — 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 (16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:210— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:210-225 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:210-225 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:204— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:204-219 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:205-220 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:204` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:386— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:386-401 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:396-411 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:60— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:60-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java:46-61 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:70— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:70-85 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:484-499 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:571— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:571-586 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2809-2824 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:571` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:150— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:150-165 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:173-188 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:150` 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:172` calls `startsWith` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:149` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:59— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:59-74 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:59-74 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java` as WHOLE FILES: this scan already matched 7 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:654— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:654-669 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:633-648 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:654` 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerActivity.java:36— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerActivity.java:36-51 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamManagerActivity.java:35-50 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerActivity.java:36` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:66— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:66-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java:66-81 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java` 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.
Duplicated block (16 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationHeaderBean.java:15— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationHeaderBean.java:15-30 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationHeaderBean.java:15-30 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationHeaderBean.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationHeaderBean.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: `ConversationConstant` names `com.netease.yunxin.kit.conversationkit.local.ui.common.ConversationConstant` in one and `com.netease.yunxin.kit.conversationkit.ui.common.ConversationConstant` 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· Members sharing a duplicated core (6 members, 50+ identical tokens) · ×11
Members sharing a duplicated core (6 members, 50+ identical tokens) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:139— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:139-182 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:168-179 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:184-196 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:150-194 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:180-191 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:196-208 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:312— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:312-331 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:188-207 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:188-207 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:277-296 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:187-206 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:190-209 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:88— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:88-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:51-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:56-79 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:78-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:50-67 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:56-79 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:138— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:138-151 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:78-91 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:97-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:128-141 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:77-90 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:97-110 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:59— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:59-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:39-69 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:41-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:60-125 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java:39-69 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:39-72 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatImageMessageViewHolder.java:44— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatImageMessageViewHolder.java:44-55 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java:48-59 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatImagePinViewHolder.java:52-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatImageMessageViewHolder.java:45-56 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionImageViewHolder.java:47-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatImagePinViewHolder.java:52-63 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:35— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:35-47 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:34-45 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:33-42 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:35-47 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:33-44 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:33-42 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:82— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:82-94 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:70-82 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:76-88 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:82-94 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:69-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:76-88 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIUserSelectorAdapter.java:34— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIUserSelectorAdapter.java:34-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunFriendSelectorAdapter.java:34-55 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunTeamSelectorAdapter.java:34-53 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIUserSelectorAdapter.java:34-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/FriendSelectorAdapter.java:33-53 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/TeamSelectorAdapter.java:33-51 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:39— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:39-48 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunFriendSelectorFragment.java:40-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunTeamSelectorFragment.java:40-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ConversationSelectorFragment.java:40-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/FriendSelectorFragment.java:40-50 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/TeamSelectorFragment.java:40-50 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:256— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:256-268 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:299-321 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:324-346 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:180-192 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:233-252 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:255-275 — 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.
Duplicated block (17 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:82— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:82-98 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:83-99 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java: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 (17 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:101— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:101-117 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionActivity.java:94-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (17 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:501— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:501-517 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:362-378 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:424— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:424-440 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:306-322 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:424` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:212— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:212-228 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:189-205 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 44 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:186` calls `getAttachmentProgressLiveData`, `observeForever` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java: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 (17 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:18— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:18-34 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java:18-34 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `IndexPinyinBean` names `com.netease.yunxin.kit.common.ui.widgets.indexbar.bean.IndexPinyinBean` in one and `com.netease.yunxin.kit.contactkit.ui.indexbar.bean.IndexPinyinBean` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyAdapter.java:83— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyAdapter.java:83-99 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/adapter/ContactAdapter.java:144-160 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyAdapter.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/adapter/ContactAdapter.java` as WHOLE FILES: this scan already matched 7 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: the declarations holding them bind `data` to `TeamVerifyInfoBean` in one and `BaseContactBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:120— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:120-136 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:116-132 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java` as WHOLE FILES: this scan already matched 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/SelectorViewHolder.java:35— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/SelectorViewHolder.java:35-51 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/SelectorViewHolder.java:35-51 — 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/SelectorViewHolder.java:35` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:494— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:494-510 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:479-495 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:494` 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/viewholder/FunTitleViewHolder.java:18— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/viewholder/FunTitleViewHolder.java:18-34 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/search/viewholder/TitleViewHolder.java:18-34 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (14 lines × 2) app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:68— app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:68-81 | app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:111-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.
Duplicated block (14 lines × 2) app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:90— app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:90-103 | app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:135-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:90` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1017— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1017-1030 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:862-875 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:135— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:135-148 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:135-148 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java: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 (14 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunEntranceViewHolder.java:68— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunEntranceViewHolder.java:68-81 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/EntranceViewHolder.java:68-81 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunEntranceViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/EntranceViewHolder.java` 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. 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:224— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:224-237 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseForwardSelectorActivity.java:359-372 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseForwardSelectorActivity.java:373` calls `getVisibility`, `setVisibility` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:238` 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 × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:172— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:172-185 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:198-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 `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java: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.
Duplicated block (14 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:714— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:714-727 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:720-733 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: the declarations holding them bind `data` to `List<V2NIMConversation>` in one and `List<V2NIMLocalConversation>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:20— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:20-33 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java:20-33 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (14 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:44— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:44-57 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:72-85 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:44` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:123— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:123-136 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:113-126 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 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.
D4 · Code Duplication· Edited copy of a member (7 corresponding lines) · ×10
Edited copy of a member (7 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/FunSearchMessageViewHolder.java:74— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/FunSearchMessageViewHolder.java:74-80 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/SearchMessageViewHolder.java:80-86 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:641— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:641-647 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:908-914 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:117— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:117-123 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:96-102 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:221— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:221-227 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:121-127 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatReaderFragment.java:27— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatReaderFragment.java:27-34 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatReaderFragment.java:24-30 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:683— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:683-689 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:653-662 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:196— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:196-206 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:99-105 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:472— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:472-478 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameActivity.java:220-226 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/BottomChoiceDialog.kt:18— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/BottomChoiceDialog.kt:18-24 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/BottomHeaderChoiceDialog.kt:20-27 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:282— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:282-288 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:330-336 — 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.
Duplicated block (22 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:263— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:263-284 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:155-176 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:263` 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:39— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:39-60 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java:39-60 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `IndexPinyinBean` names `com.netease.yunxin.kit.common.ui.widgets.indexbar.bean.IndexPinyinBean` in one and `com.netease.yunxin.kit.contactkit.ui.indexbar.bean.IndexPinyinBean` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:65— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:65-86 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:45-66 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java: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.
Duplicated block (22 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:45— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:45-66 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:45-66 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:45` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunViewHolderFactory.java:31— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunViewHolderFactory.java:31-52 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunViewHolderFactory.java:31-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ViewHolderFactory.java:31— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ViewHolderFactory.java:31-52 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/ViewHolderFactory.java:31-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java:27— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java:27-48 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java:27-48 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamSettingActivity.java:41— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamSettingActivity.java:41-62 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamSettingActivity.java:32-53 — 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 `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamSettingActivity.java:41` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:171— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:171-192 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:109-130 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java` as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:171` it does not close everything it opens, so those 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunCollectionViewHolderFactory.java:28— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunCollectionViewHolderFactory.java:28-49 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/CollectionViewHolderFactory.java:28-49 — 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 (19 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:323— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:323-341 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:361-379 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:323` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:107— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:107-125 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:107-125 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:84— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:84-102 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:84-102 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:285— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:285-303 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:277-295 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:285` 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 `view` to `View` in one and `android.view.View` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (19 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:707— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:707-725 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:712-730 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (19 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:434— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:434-452 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:466-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java: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. 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:43— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:43-61 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:102-120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java: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 (19 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:48— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:48-66 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:54-72 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java: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.
Duplicated block (19 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:307— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:307-325 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:332-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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:307` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:112— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:112-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java:112-130 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java` 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.
D4 · Code Duplication· Edited copy of a member (21 corresponding lines) · ×9
Edited copy of a member (21 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:261— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:261-283 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:288-308 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunPinViewHolderFactory.java:38— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunPinViewHolderFactory.java:38-59 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/PinViewHolderFactory.java:33-53 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:560— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:560-581 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:416-436 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:462— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:462-482 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1508-1531 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotInfoActivity.java:236— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotInfoActivity.java:236-256 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotInfoActivity.java:258-278 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:47— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:47-67 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/team/TeamListActivity.java:24-44 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:760— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:760-780 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:817-844 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:70— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/ai/BaseAIUserListActivity.java:70-90 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/ai/FunAIUserListActivity.java:47-67 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:231— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:231-251 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:384-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.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×9
Edited copy of a member (19 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:145— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:145-163 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:145-164 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:448— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:448-466 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:453-471 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:392— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:392-410 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:375-396 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:144— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:144-167 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:139-157 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1378— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1378-1396 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1478-1499 — 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) app/src/main/java/com/netease/yunxin/app/im/utils/MultiLanguageUtils.java:42— app/src/main/java/com/netease/yunxin/app/im/utils/MultiLanguageUtils.java:42-63 | app/src/main/java/com/netease/yunxin/app/im/utils/MultiLanguageUtils.java:70-88 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:125— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BaseBlackListActivity.java:125-143 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/blacklist/FunBlackListActivity.java:58-76 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:117— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:117-135 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:119-137 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:274— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:274-292 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:294-312 — 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.
Duplicated block (18 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:242— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:242-259 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:242-259 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java` as WHOLE FILES: this scan already matched 13 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:241` calls `isEmpty` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:241` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:730— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:730-747 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:735-752 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:204— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:204-221 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:156-173 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java: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 (18 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:105— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:105-122 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:99-116 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java` 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:105` it does not close everything it opens, so those 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:117` calls `setVisibility` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:123` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:139— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:139-156 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java:107-124 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java: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 (18 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupManageActivity.java:393— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupManageActivity.java:393-410 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameActivity.java:188-205 — 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupManageActivity.java:393` it does not close everything it opens, so those exact lines 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:142— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:142-159 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:144-161 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (18 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:274— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:274-291 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:277-294 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:274` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:447— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:447-464 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:432-449 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:447` 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.
Swallowed exception (caught, then discarded) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/CustomGestureDetector.kt:81— `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/CustomGestureDetector.kt:89— `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:214— `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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:380— `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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:807— `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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:392— `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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/ReactionEmojiManager.java:105— `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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:825— `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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageSearchUtils.java:177— `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.
MethodTooLong: ConversationGroupNameDialog.show conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameDialog.java:47— MethodTooLong — show runs 142 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 42 over it, 1.42× 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: MessageBottomLayout.init chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:139— MethodTooLong — init runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× 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: BaseRecentConversationSelectActivity.createSelectContentView conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/BaseRecentConversationSelectActivity.java:48— MethodTooLong — createSelectContentView runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× 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: MessageOperateUtils.translateMessage chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:211— MethodTooLong — translateMessage runs 114 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
MethodTooLong: TeamNotificationHelper.buildUpdateTeamNotification chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:176— MethodTooLong — buildUpdateTeamNotification runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.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: SettingUIKitActivity.initView app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/SettingUIKitActivity.java:47— MethodTooLong — initView runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: ChatBaseMessageViewHolder.setStatus chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:803— MethodTooLong — setStatus runs 108 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× 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: ChatBaseFragment.handleTopMessage chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:427— MethodTooLong — handleTopMessage runs 102 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 2 over it, 1.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×8
Edited copy of a member (12 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:171— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:171-182 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:190-202 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerListActivity.java:60— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamManagerListActivity.java:60-71 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamManagerListActivity.java:57-68 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:52— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:52-63 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotListViewModel.java: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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:122— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:122-137 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:140-151 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:270— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:270-285 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:194-205 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:52— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:52-64 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ForwardSelectorActivity.java:46-57 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamProfileActivity.java:17— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamProfileActivity.java:17-28 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/team/TeamProfileActivity.java:15-26 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:123— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:123-136 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:109-120 — 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 (28 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:209— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:209-236 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:201-228 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:209` 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 (28 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:51-78 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java:52-79 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:51` 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:229— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:229-256 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:233-260 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (28 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunContactSelectorActivity.java:70— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunContactSelectorActivity.java:70-97 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:151-178 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunContactSelectorActivity.java:70` it begins part-way through the construct above it, so those exact lines 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:244— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:244-271 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:227-254 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:212— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:212-239 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberSelectActivity.java:169-196 — 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 `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:212` 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, `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:211` calls `setOnClickListener`, `setText` and `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberSelectActivity.java:168` 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 (28 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:57— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:57-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:57-84 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (28 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:191— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:191-218 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:190-217 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×7
Edited copy of a member (20 corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:121— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:121-140 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:143-165 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:132— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:132-151 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:159-178 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:84— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:84-104 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:84-103 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/TeamListViewModel.java:129— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/TeamListViewModel.java:129-148 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/TeamListViewModel.java:151-175 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:426— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:426-450 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1797-1816 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:146— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:146-165 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:167-188 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:518— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:518-538 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:1069-1088 — 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.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×7
Edited copy of a member (16 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1791— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1791-1812 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1822-1837 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:258— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:258-274 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:305-320 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:382— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:382-398 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:402-417 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAISelectedAdapter.java:31— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAISelectedAdapter.java:31-47 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AISelectedAdapter.java:30-45 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:737— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:737-752 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:607-624 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java:226— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java:226-241 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapLoadingWorkerTask.java:84-99 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:140— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:140-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:379-395 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (6 corresponding lines) · ×7
Edited copy of a member (6 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:100— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:100-105 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:130-135 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/ChatKitClient.java:188— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/ChatKitClient.java:188-197 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/TeamUIService.java:261-266 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:252— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:252-257 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:288-293 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotCreateActivity.java:176— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotCreateActivity.java:176-181 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotEditActivity.java:134-139 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:105— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:105-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:105-110 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunSelectedListDialog.java:25— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/FunSelectedListDialog.java:25-31 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/SelectedListDialog.java:25-30 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:943— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:943-948 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:799-804 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (26 corresponding lines) · ×6
Edited copy of a member (26 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunChatViewHolderFactory.java:88— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunChatViewHolderFactory.java:88-115 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/ChatViewHolderFactory.java:81-113 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:316— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:316-341 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:308-333 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:179— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:179-208 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/CollectionViewModel.java:124-149 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:55— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:55-80 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/viewmodel/SelectorViewModel.java:55-80 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:91— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:91-116 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchImageViewModel.java:113-138 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:828— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:828-853 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/TeamProfileViewModel.java:73-100 — 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 (24 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:100— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:100-123 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:423-446 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java` as WHOLE FILES: this scan already matched 4 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java: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 (24 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunChatViewHolderFactory.java:89— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunChatViewHolderFactory.java:89-112 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/ChatViewHolderFactory.java:82-105 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunChatViewHolderFactory.java:89` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:143— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:143-166 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:142-165 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (24 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:244— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:244-267 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:352-375 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (24 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:175— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:175-198 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:202-225 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java: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 (24 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:131— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:131-154 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:146-169 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:131` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:104— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:104-123 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:105-124 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java: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 (20 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:336— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:336-355 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:328-347 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:336` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:143— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:143-162 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:163-182 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java: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 (20 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java:56— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java:56-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/ChatMessageViewHolderFactory.java:58-77 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/ChatMessageViewHolderFactory.java` 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java: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. Note first that the copies are not typed on the same thing: `ChatAudioMessageViewHolder` names `com.netease.yunxin.kit.chatkit.ui.fun.view.message.viewholder.ChatAudioMessageViewHolder` in one and `com.netease.yunxin.kit.chatkit.ui.normal.view.message.viewholder.ChatAudioMessageViewHolder` 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 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:403— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:403-422 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:285-304 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:403` it does not close everything it opens, so those exact lines 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/AvatarColor.java:1— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/AvatarColor.java:1-20 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/utils/ColorUtils.java:1-20 — 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/AvatarColor.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×5
Edited copy of a member (40 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:55— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:55-94 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:58-99 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:49— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:49-93 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatHistoryActivity.java:47-86 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:271— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:271-310 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:236-275 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:561— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:561-606 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:677-716 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:186— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:186-225 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:233-272 — 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 copy of a member (23 corresponding lines) · ×5
Edited copy of a member (23 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:117— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:117-139 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionDetailBaseActivity.java:107-133 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:647— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:647-669 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:622-648 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/SelectorViewHolder.java:29— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/SelectorViewHolder.java:29-51 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/SelectorViewHolder.java:29-51 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:159— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:159-185 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:189-211 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunTeamVerifyFragment.java:24— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunTeamVerifyFragment.java:24-48 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/TeamVerifyFragment.java:24-46 — 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 (25 corresponding lines) · ×5
Edited copy of a member (25 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:161— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:161-194 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/ContactViewModel.java:381-405 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:433— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:433-457 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:467-491 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1002— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1002-1026 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1029-1054 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:252— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:252-277 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionViewModel.java:283-307 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:782— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:782-806 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:640-666 — 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.
Duplicated block (45 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:88— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:88-132 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java:89-133 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java` as WHOLE FILES: this scan already matched 5 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:88` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:102— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:102-146 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java:111-155 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:102` it does not close everything it opens, so those 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 (45 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:97— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:97-141 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:107-151 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:97` 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.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (45 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:43— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:43-87 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:42-86 — before extracting anything, compare `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java` and `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java: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. Note first that the copies are not typed on the same thing: the declarations holding them bind `binding` to `FunTeamMemberListItemBinding` in one and `TeamMemberListItemBinding` 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 (45 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:206— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:206-250 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:233-277 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 122 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (39 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:131— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:131-169 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:132-170 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (39 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:218— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:218-256 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:217-255 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:218` 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 (39 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:82— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:82-120 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:82-120 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java: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. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (39 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:37— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:37-75 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:37-75 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:64— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:64-102 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java:64-102 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `IndexPinyinBean` names `com.netease.yunxin.kit.common.ui.widgets.indexbar.bean.IndexPinyinBean` in one and `com.netease.yunxin.kit.contactkit.ui.indexbar.bean.IndexPinyinBean` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:447— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:447-467 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:505-525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:447` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:246— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:246-266 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:256-276 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:82— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:82-102 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java:83-103 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:96— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:96-116 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:74-94 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java: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 (21 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.kt:89— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.kt:89-109 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.kt:126-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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.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 (14–15 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:83— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:83-96 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:111-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java: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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:353— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:353-366 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:416-430 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:353` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:215— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:215-228 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:298-312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:215` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:94— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:94-107 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationGroupSystemBarHelper.java:22-36 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:94` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1238— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1238-1252 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:132-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1238` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11–12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:145— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:145-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:146-157 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java: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.
Duplicated block (11–12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:157— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java:157-168 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java:159-169 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatBasePinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatBasePinViewHolder.java` 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.
Duplicated block (11–12 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:237— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:237-247 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchByMemberBaseActivity.java:184-195 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchByMemberBaseActivity.java` 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. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:237` it does not close everything it opens, so those 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:182— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseContactSelectorActivity.java:182-193 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:201-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. 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:352— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:352-363 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:388-398 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:352` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:215— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:215-222 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:350-357 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:378-385 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:215` it begins part-way through the construct above it, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:358— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:358-365 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:380-387 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:410-417 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java: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 (8 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:41— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:41-48 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunFriendSelectorFragment.java:42-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunTeamSelectorFragment.java:42-49 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:41` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:230— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:230-237 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:275-282 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:331-338 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (8 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:336— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:336-343 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAIMessageViewHolder.java:127-134 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:317-324 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:38— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:38-44 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:37-43 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:38-44 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:36-42 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:106— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:106-113 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java:106-112 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunCreateTeamFactory.java:106-113 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/NormalCreateTeamFactory.java:106-112 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:106` 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.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:80— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:80-86 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:68-74 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:90-96 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:68-74 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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. Note first that the copies are not typed on the same thing: `ConversationConstant` names `com.netease.yunxin.kit.conversationkit.local.ui.common.ConversationConstant` in one and `com.netease.yunxin.kit.conversationkit.ui.common.ConversationConstant` 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 × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:33— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:33-39 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java:33-39 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationHeaderViewHolder.java:44-52 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java:33-39 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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 × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:202— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:202-208 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:211-217 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationView.java:230-236 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationView.java:243-249 — 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. Note first that the copies are not typed on the same thing: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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 contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:119— //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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:198— //todo show toast sdcard not exist — 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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:263— //todo if you need suffix play,set here — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/input/ActionsPanelAdapter.java:71— // todo date change — 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 (32 corresponding lines) · ×4
Edited copy of a member (32 corresponding lines) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:830— app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:830-861 | app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:863-895 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:20— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotListActivity.java:20-51 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/robot/RobotListActivity.java:19-50 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:263— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:263-294 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:262-293 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchDateActivity.java:25— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchDateActivity.java:25-57 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateActivity.java:22-53 — 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 (29 corresponding lines) · ×4
Edited copy of a member (29 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:125— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:125-154 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:141-169 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:849— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:849-877 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:880-913 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionFlowLayout.java:82— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionFlowLayout.java:82-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionGroupView.java:160-194 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.kt:82— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.kt:82-117 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/ContactAvatarView.kt:120-148 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (34 corresponding lines) · ×4
Edited copy of a member (34 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:170— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:170-203 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:108-141 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunConversationSelectorAdapter.java:36— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunConversationSelectorAdapter.java:36-71 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/ConversationSelectorAdapter.java:35-68 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:230— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:230-263 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:279-314 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:146— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:146-184 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:186-219 — 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 (28 corresponding lines) · ×4
Edited copy of a member (28 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:46— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:46-73 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotListViewModel.java:39-66 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:39— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:39-66 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:44-72 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:36— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:36-64 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/JoinTeamViewModel.java:35-62 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunTeamVerifyFragment.java:21— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunTeamVerifyFragment.java:21-50 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/TeamVerifyFragment.java:21-48 — 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 copies of one member (3 members, 12+ corresponding lines) · ×4
Edited copies of one member (3 members, 12+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:109— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:109-120 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:126-138 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyBaseFragment.java:140-152 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatForwardActivity.java:33— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatForwardActivity.java:33-44 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:283-297 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:233-247 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/BaseBottomDialog.kt:19— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/BaseBottomDialog.kt:19-30 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/BaseDialog.kt:47-58 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/dialog/ListAlertDialog.kt:77-92 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatPinFactory.java:36— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatPinFactory.java:36-48 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/CollectionViewHolderBaseFactory.java:36-47 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/ChatViewHolderFactory.java:65-76 — 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 (42 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:70— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:70-111 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:69-110 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (42 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:97— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:97-138 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunCreateTeamFactory.java:97-138 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunCreateTeamFactory.java` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java: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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (42 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java:96— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java:96-137 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/NormalCreateTeamFactory.java:96-137 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/NormalCreateTeamFactory.java` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java: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. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (42 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:1— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:1-42 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationHelper.java:1-42 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationHelper.java` as WHOLE FILES: 96% 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:1` it does not close everything it opens, so those 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 (33 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:260— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:260-292 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:316-348 — both copies are in the same file, so extract the 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 (33 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:113— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:113-145 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:94-126 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:113` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (33 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:93— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:93-125 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:94-126 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 126 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java: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 (33 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:38— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:38-70 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:38-70 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java` 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:38` it does not close everything it opens, so those exact lines 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) aisearchkit/src/main/java/com/netease/yunxin/kit/aisearchkit/page/AISearchViewModel.java:152— aisearchkit/src/main/java/com/netease/yunxin/kit/aisearchkit/page/AISearchViewModel.java:152-183 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1657-1688 — 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 `aisearchkit/src/main/java/com/netease/yunxin/kit/aisearchkit/page/AISearchViewModel.java: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: `R` names `com.netease.yunxin.kit.aisearchkit.R` in one and `com.netease.yunxin.kit.chatkit.ui.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 (32 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:342— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:342-373 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:247-278 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:342` it does not close everything it opens, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:375` calls `switchAIHelper` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:279` 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 (32 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:407— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:407-438 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:392-423 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:407` 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: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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 (32 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:169— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:169-200 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:170-201 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:347— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:347-372 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:330-355 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:347` it begins part-way through the construct above it, so those exact lines 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 × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:731— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:731-756 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:444-469 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:491— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:491-516 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationGroupBar.java:174-199 — 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 (26 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/AIUserBean.java:14— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/AIUserBean.java:14-39 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/AIUserBean.java:14-39 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/AIUserBean.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/AIUserBean.java` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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 × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:104— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:104-111 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:58-65 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:63-70 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:94-101 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:57-64 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:63-70 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:164— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:164-171 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:93-100 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:100-107 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:150-157 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:92-99 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:100-107 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 6) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:257— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:257-264 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:300-307 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:325-332 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:181-188 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:234-241 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:256-263 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java` as WHOLE FILES: this scan already matched 9 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. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java: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.
Duplicated block (8 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:85— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:85-92 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:79-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:79-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:83-90 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:79-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:80-87 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java` 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.
Duplicated block (5 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:133— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:133-137 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:75-79 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:82-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:126-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:74-78 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:82-86 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:66— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:66-70 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:48-52 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:58-62 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:66-70 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:47-51 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:58-62 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `data` to `ChatMessageBean` in one and `CollectionBean` 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:54` calls `getAttachment`, `getMessageData` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:64` 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 × 6) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotBindActivity.java:28— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotBindActivity.java:28-32 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotCreateActivity.java:29-33 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotEditActivity.java:30-34 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotEditNameActivity.java:34-38 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/robot/FunRobotInfoActivity.java:36-40 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunCommentActivity.java:34-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times.
Duplicated block (5 lines × 6) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:40— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:40-44 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ConversationTopAdapter.java:47-51 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:138-142 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java:40-44 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/ConversationTopAdapter.java:47-51 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:101-105 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java` 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. Note first that the copies are not typed on the same thing: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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.
HackComment chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/textSelectionHelper/TextLayoutUtils.java:55— ////////////////////HACK BLOCK//////////////////////////////////////////////////// — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/textSelectionHelper/TextLayoutUtils.java:88— // by 1 to compensate for the change made below. (see previous HACK BLOCK) — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
HackComment chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/textSelectionHelper/TextLayoutUtils.java:89— /////////////////////HACK BLOCK/////////////////////////////////////////////////// — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D4 · Code Duplication· Edited copy of a member (50 corresponding lines) · ×3
Edited copy of a member (50 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:184— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:184-233 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:169-218 — 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.
Edited copy of a member (50 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:39— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:39-88 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java:39-88 — 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.
Edited copy of a member (50 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:289— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:289-338 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:281-330 — 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 (47 corresponding lines) · ×3
Edited copy of a member (47 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionFlowLayout.java:33— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionFlowLayout.java:33-79 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ReactionGroupView.java:108-157 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (47 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:428— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:428-474 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:490-538 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
Edited copy of a member (47 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2854— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2854-2900 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2902-2948 — These two members are one piece of code written twice and then edited apart: 47 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (39 corresponding lines) · ×3
Edited copy of a member (39 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:293— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:293-331 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:258-298 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:222— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:222-260 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:276-314 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:176— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:176-214 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:106-144 — 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 (45 corresponding lines) · ×3
Edited copy of a member (45 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:100— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:100-144 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectorFragment.java:67-113 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:228— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:228-276 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:278-322 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:45— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:45-89 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchImageViewModel.java:54-107 — 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 copy of a member (36 corresponding lines) · ×3
Edited copy of a member (36 corresponding lines) aisearchkit/src/main/java/com/netease/yunxin/kit/aisearchkit/page/AISearchViewModel.java:150— aisearchkit/src/main/java/com/netease/yunxin/kit/aisearchkit/page/AISearchViewModel.java:150-185 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1655-1690 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:305— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:305-341 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:344-379 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:349— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:349-394 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:301-336 — 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 (33 corresponding lines) · ×3
Edited copy of a member (33 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java:54— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java:54-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/ChatMessageViewHolderFactory.java:56-89 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:206— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:206-238 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:198-230 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupManageActivity.java:391— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupManageActivity.java:391-423 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationGroupNameActivity.java:186-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.
D4 · Code Duplication· Edited copy of a member (27 corresponding lines) · ×3
Edited copy of a member (27 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:42— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:42-71 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:351-377 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:80— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:80-113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:76-102 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:43— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/team/FunTeamListActivity.java:43-69 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/team/TeamListActivity.java:20-46 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (24 corresponding lines) · ×3
Edited copy of a member (24 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:97— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatNotificationMessageViewHolder.java:97-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatNotificationMessageViewHolder.java:87-111 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamSettingActivity.java:38— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/activity/FunTeamSettingActivity.java:38-62 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/activity/TeamSettingActivity.java:30-53 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:687— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:687-710 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBotSubSessionListViewModel.java:712-735 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×3
Edited copies of one member (4 members, 7+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:67— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:67-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:78-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:87-93 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:136-148 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatLocationPinViewHolder.java:33— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatLocationPinViewHolder.java:33-39 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:43-49 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatLocationPinViewHolder.java:32-38 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:43-49 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 7+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:32— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:32-38 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:30-36 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:30-36 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java:30-36 — 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 (3 members, 9+ corresponding lines) · ×3
Edited copies of one member (3 members, 9+ corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:145— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:145-153 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:288-296 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:208-216 — 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) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/PushConfigParseActivity.java:22— app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/PushConfigParseActivity.java:22-30 | app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigActivity.java:45-53 | app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigParseActivity.java:26-34 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:106— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:106-114 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:156-164 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberSelectActivity.java:94-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 6+ corresponding lines) · ×3
Edited copies of one member (3 members, 6+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:66— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:66-71 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:99-104 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotListViewModel.java:59-64 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:553— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:553-558 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/model/ContactEntranceBean.java:29-34 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/model/ContactFriendBean.java:53-58 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:333— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:333-338 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:92-97 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:156-162 — 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.
Duplicated block (31 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionBaseViewHolder.java:91— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionBaseViewHolder.java:91-121 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionBaseViewHolder.java:90-120 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionBaseViewHolder.java` 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. 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 (31 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:444— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:444-474 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:508-538 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:444` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (31 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunEntranceViewHolder.java:35— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunEntranceViewHolder.java:35-65 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/EntranceViewHolder.java:35-65 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunEntranceViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/EntranceViewHolder.java` 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. 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 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:30— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:30-59 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java:46-75 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java` as WHOLE FILES: this scan already matched 3 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.
Duplicated block (30 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:162— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:162-191 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:161-190 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 165 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:265— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:265-294 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:269-298 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.common.ui.R` in one and `com.netease.yunxin.kit.contactkit.ui.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 (27 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:256— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:256-282 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:233-259 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:256` it begins part-way through the construct above it, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:87— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:87-113 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:134-160 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:161` calls `searchFriend` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:114` 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 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:576— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:576-602 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:995-1021 — 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 (25 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:115— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:115-139 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:114-138 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (25 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:901— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:901-925 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:757-781 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:901` it does not close everything it opens, so those exact lines 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:147— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:147-171 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java:147-171 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunPopItemFactory.java` as WHOLE FILES: this scan already matched 7 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (23 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:149— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:149-171 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java:158-180 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java: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.
Duplicated block (23 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:62— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:62-84 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:49-71 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java: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 (23 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:671— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:671-693 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:699-721 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:671` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:125— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:125-143 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:118-137 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java: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 (19–20 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:358— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:358-376 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:380-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java: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. 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1498— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1498-1516 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1898-1917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1498` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:77— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:77-92 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:81-96 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java:76-91 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:79-94 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 169 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:75` calls `attachMessageOverlayView` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:80` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:105— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:105-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:64-79 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:95-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:64-79 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java: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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:131— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:131-146 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:165-180 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:109-124 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:143-158 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (15–16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:743— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:743-757 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:763-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:743` 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–16 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:362— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:362-376 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:224-239 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:362` 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:378` calls `removeAllViews` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java: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 (15–16 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:479— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:479-493 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:496-511 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:479` it begins part-way through the construct above it, so those 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 lines × 5) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:111— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:111-124 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:52-65 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:58-71 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java:52-65 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:55-68 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:126` calls `setText` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:67` 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 × 5) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:117— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:117-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:59-72 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:66-79 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:58-71 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:66-79 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java: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 × 5) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:75— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:75-88 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseConversationSelectorAdapter.java:80-93 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseFriendSelectorAdapter.java:73-86 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseRecentForwardSelectorAdapter.java:71-84 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseTeamSelectorAdapter.java:75-88 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:75` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:304— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:304-317 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:388-401 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:303-316 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:380-393 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` 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. If that is what happened, the fix is to keep one copy and have the 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:304` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:95— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:95-108 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:102-115 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:94-107 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:102-115 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java` as WHOLE FILES: this scan already matched 9 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.
Duplicated block (14 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:44— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:44-57 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:56-69 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:63-76 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:56-69 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:316— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:316-329 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/contact/ContactFragment.java:73-85 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:316` it begins part-way through the construct above it, so those 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/contact/ContactFragment.java:73` calls `getTitleBar` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java: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 (13–14 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:237— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:237-249 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:272-285 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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 (13–14 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:116— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java:116-129 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java:124-136 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/model/ConversationBean.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/model/ConversationBean.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:110— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:110-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:104-114 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:110-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:104-114 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java` as WHOLE FILES: this scan already matched 5 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. 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:52— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:52-62 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:57-67 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:51-61 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:57-67 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java` 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:42— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:42-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:45-55 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:42-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:43-53 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:55— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:55-65 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java:56-66 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:100-110 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchMemberActivity.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchMemberActivity.java:55` it does not close everything it opens, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:60— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIContactSelectorActivity.java:60-70 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunForwardSelectorActivity.java:86-96 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIContactSelectorActivity.java:47-57 — 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 (11 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatPinFactory.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatPinFactory.java:51-61 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java:91-101 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/ChatMessageViewHolderFactory.java:94-104 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/ChatMessageViewHolderFactory.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/ChatMessageViewHolderFactory.java` 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.
Duplicated block (10–11 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:497— app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:497-506 | app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:509-519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:497` it begins part-way through the construct above it, so those 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:66— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:66-76 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:65-74 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java` as WHOLE FILES: this scan already matched 6 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `conversationInfo` to `V2NIMConversation` in one and `V2NIMLocalConversation` 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–11 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:133— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:133-143 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:191-200 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:133` it does not close everything it opens, so those 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:59— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:59-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:65-74 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:58-67 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:65-74 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java` 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. 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:169— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:169-178 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:141-150 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:169-178 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:138-147 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (10 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:123— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:123-132 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:102-111 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:133-142 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:102-111 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (9 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:123— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:123-131 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:241-249 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:122-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:226-234 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` 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. If that is what happened, the fix is to keep one copy and have the 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 (9 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:84— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:84-92 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:107-115 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:84-92 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:107-115 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java` as WHOLE FILES: this scan already matched 7 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java: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. 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (9 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:621— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:621-629 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:633-641 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:587-595 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:599-607 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:389— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:389-397 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:409-417 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:428-436 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:389` 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 (9 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:110— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:110-118 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:127-135 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyBaseFragment.java:141-149 — 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 (9 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:233— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:233-241 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:144-152 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:269-277 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java` as WHOLE FILES: this scan already matched 5 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.
Duplicated block (8 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:172— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:172-179 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:189-196 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:184-191 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:201-208 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:188` calls `getAvatarName` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:171` 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 × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:256— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:256-263 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:279-286 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:310-317 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:335-342 — 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 (8 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:68— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:68-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:62-69 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:66-73 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:63-70 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:42— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:42-47 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:37-42 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:42-47 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:37-42 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java` as WHOLE FILES: this scan already matched 5 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:42` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:179— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:179-184 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:179-184 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:178-183 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:181-186 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:61— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:61-66 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:49-54 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:83-88 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:49-54 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:40— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:40-45 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunFriendSelectorFragment.java:41-46 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunTeamSelectorFragment.java:41-46 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ConversationSelectorFragment.java:41-46 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/FriendSelectorFragment.java:41-46 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/TeamSelectorFragment.java:41-46 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:40` it does not close everything it opens, so those exact lines 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 × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:78— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:78-83 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:72-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:72-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:76-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:72-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:73-78 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java` 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.
Duplicated block (6 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:101— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:101-106 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:85-90 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:95-100 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:101-106 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:84-89 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:95-100 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:415— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:415-419 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:571-575 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:628-632 — 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 after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:576` calls `equals`, `getAccountId`, `account` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:420` 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 × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:99— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:99-103 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:129-133 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:164-168 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:161` calls `updateRobotUserInfo` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:96` 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:45— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/AddFriendViewModel.java:45-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/JoinTeamViewModel.java:43-47 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/TeamListViewModel.java:100-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Low cohesion: TeamKitTeamMemberCache (LCOM4 5) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/TeamKitTeamMemberCache.java:22— TeamKitTeamMemberCache'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: BotSubSessionListAdapter (LCOM4 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/BotSubSessionListAdapter.java:24— BotSubSessionListAdapter'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: TeamManagerViewModel (LCOM4 4) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerViewModel.java:33— TeamManagerViewModel'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.
Hotspot: chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:120— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in ChatTextMessageViewHolder.setMessageText at line 120. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 19:55:18 +08:00' --until='2026-11-04 19:55:18 +08:00' --full-history --no-merges -- chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java`: 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: chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:570— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in MessageOperateUtils.buildMediaMessage at line 570. 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-06..2026-11-04, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-06 19:55:18 +08:00' --until='2026-11-04 19:55:18 +08:00' --full-history --no-merges -- chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java`: 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.
ChatRichTextMessageViewHolder.bindData (cognitive 28) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:37— ChatRichTextMessageViewHolder.bindData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (27 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.
ChatRichTextMessageViewHolder.bindData (cognitive 28) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java:38— ChatRichTextMessageViewHolder.bindData has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (27 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.
11.onSuccess (cognitive 22) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:405— 11.onSuccess has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 1 (3 pts), loops 1 (3 pts), boolean chains 2 (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.
11.onSuccess (cognitive 22) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:390— 11.onSuccess has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 1 (3 pts), loops 1 (3 pts), boolean chains 2 (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.
IndexBarDataHelperImpl.sortSourceData (cognitive 20) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:63— IndexBarDataHelperImpl.sortSourceData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
IndexBarDataHelperImpl.sortSourceData (cognitive 20) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.java:63— IndexBarDataHelperImpl.sortSourceData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
ConversationViewModel.dynamicSubscribeConversation (cognitive 20) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:757— ConversationViewModel.dynamicSubscribeConversation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), boolean chains 3, loops 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.
ConversationViewModel.dynamicSubscribeConversation (cognitive 20) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:830— ConversationViewModel.dynamicSubscribeConversation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (4 pts), boolean chains 3, loops 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.
FunConversationBaseViewHolder.loadUIConfig (cognitive 19) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:75— FunConversationBaseViewHolder.loadUIConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 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.
FunConversationBaseViewHolder.loadUIConfig (cognitive 19) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:102— FunConversationBaseViewHolder.loadUIConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 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.
ConversationBaseViewHolder.loadUIConfig (cognitive 19) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:80— ConversationBaseViewHolder.loadUIConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 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.
ConversationBaseViewHolder.loadUIConfig (cognitive 19) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:80— ConversationBaseViewHolder.loadUIConfig has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (19 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.
ImageGridAdapter.onBindViewHolder (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:412— ImageGridAdapter.onBindViewHolder has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ImageGridAdapter.onBindViewHolder (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:490— ImageGridAdapter.onBindViewHolder has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (3 pts), boolean chains 1 (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.
SuspensionDecoration.getItemOffsets (cognitive 18) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/suspension/SuspensionDecoration.java:257— SuspensionDecoration.getItemOffsets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
SuspensionDecoration.getItemOffsets (cognitive 18) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/suspension/SuspensionDecoration.java:284— SuspensionDecoration.getItemOffsets has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
Near-duplicate member pair (44 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:59— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:59-113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java:45-108 — These two members are variants of one another: 44 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 (44 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:390— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:390-440 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:272-322 — These two members are variants of one another: 44 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· Edited copy of a member (43 corresponding lines) · ×2
Edited copy of a member (43 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:201— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:201-249 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:234-285 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:240— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:240-282 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:209-259 — 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· Members sharing a duplicated core (5 members, 50+ identical tokens) · ×2
Members sharing a duplicated core (5 members, 50+ identical tokens) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:440— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:440-524 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:310-380 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:73-166 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/BaseAddFriendActivity.java:43-71 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/BaseTeamSearchActivity.java:40-68 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:73— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:73-88 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseConversationSelectorAdapter.java:78-93 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseFriendSelectorAdapter.java:71-86 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseRecentForwardSelectorAdapter.java:69-84 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseTeamSelectorAdapter.java:73-88 — 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 (92 corresponding lines) · ×2
Edited copy of a member (92 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:32— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:32-123 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:32-124 — 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.
Edited copy of a member (92 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:52— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:52-143 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:32-124 — 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 (56 corresponding lines) · ×2
Edited copy of a member (56 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:77— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:77-132 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java:78-133 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1483— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1483-1540 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1872-1927 — 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 (44 corresponding lines) · ×2
Edited copy of a member (44 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:38— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:38-82 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java:36-79 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:60— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:60-103 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationView.java:87-134 — 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 (49 corresponding lines) · ×2
Edited copy of a member (49 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:390— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:390-438 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:375-423 — 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) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:99— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:99-165 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:167-215 — 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 (48 corresponding lines) · ×2
Edited copy of a member (48 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:209— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:209-256 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:208-255 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:140— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIContactSelectorActivity.java:140-191 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseForwardSelectorActivity.java:266-313 — 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 (42 corresponding lines) · ×2
Edited copy of a member (42 corresponding lines) app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:67— app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:67-108 | app/src/main/java/com/netease/yunxin/app/im/network/IMKitNetRequester.java:110-153 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/contact/FunContactFragment.java:155— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/contact/FunContactFragment.java:155-203 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/contact/ContactFragment.java:116-157 — 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, 36+ corresponding lines) · ×2
Edited copies of one member (3 members, 36+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:58— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:58-93 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:75-110 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyBaseFragment.java:80-124 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 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, 36+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:854— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:854-889 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:892-927 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:930-975 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 36 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 (37 corresponding lines) · ×2
Edited copy of a member (37 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:236— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:236-284 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:140-176 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:122— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:122-158 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatHistoryActivity.java:110-150 — These two members are one piece of code written twice and then edited apart: 37 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (38 corresponding lines) · ×2
Edited copy of a member (38 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:23— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:23-74 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.java:44-81 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:341— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:341-381 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:246-283 — 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 copy of a member (31 corresponding lines) · ×2
Edited copy of a member (31 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:100— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunCollectionActivity.java:100-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/CollectionActivity.java:92-123 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:433— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:433-463 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:465-495 — 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 copies of one member (4 members, 23+ corresponding lines) · ×2
Edited copies of one member (4 members, 23+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java:71— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java:71-93 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:52-78 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:171-198 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:198-229 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 23+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:66— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:66-91 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectorFragment.java:115-137 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:63-88 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java:126-148 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 15+ corresponding lines) · ×2
Edited copies of one member (3 members, 15+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:210— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:210-224 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:345-360 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:368-389 — 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/ContactListView.java:90— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/ContactListView.java:90-106 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:81-95 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationView.java:108-127 — 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 (4 members, 14+ corresponding lines) · ×2
Edited copies of one member (4 members, 14+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java:78— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java:78-91 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:59-76 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:178-196 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:205-227 — 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.
Edited copies of one member (4 members, 14+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:74— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:74-91 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchBaseViewModel.java:95-108 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchViewModel.java:96-113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchViewModel.java:117-130 — 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 (4 members, 18+ corresponding lines) · ×2
Edited copies of one member (4 members, 18+ corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:110— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:110-128 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamInfoViewModel.java:59-76 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:383-406 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:413-432 — 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:467— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:467-484 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:491-510 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:452-469 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:476-495 — 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, 18+ corresponding lines) · ×2
Edited copies of one member (3 members, 18+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:187— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:187-204 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:206-223 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:225-242 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:227— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:227-244 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:231-248 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/view/ConversationAdapter.java:155-172 — 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, 15+ corresponding lines) · ×2
Edited copies of one member (4 members, 15+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:88— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:88-104 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:106-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:103-119 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:121-135 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 15+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:116— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:116-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:114-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:105-119 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:99-115 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 13+ corresponding lines) · ×2
Edited copies of one member (3 members, 13+ corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:126— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:126-138 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:142-154 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:182-194 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatPinActivity.java:44— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatPinActivity.java:44-56 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatHistoryActivity.java:89-101 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:334-346 — 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, 8+ corresponding lines) · ×2
Edited copies of one member (3 members, 8+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:304— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:304-311 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:154-162 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:565-572 — 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:113— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:113-120 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateNameActivity.java:130-138 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateNicknameActivity.java:106-113 — 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 copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:134— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/ait/FunAitContactSelectorDialog.java:134-137 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ait/NormalAitContactSelectorDialog.java:135-138 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:121— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:121-124 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:120-123 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (5 corresponding lines) · ×2
Edited copy of a member (5 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:230— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:230-234 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:71-77 — 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:254— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:254-258 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:250-255 — 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 (61 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:28— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:28-88 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java:28-88 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationUtils` names `com.netease.yunxin.kit.conversationkit.local.ui.common.ConversationUtils` in one and `com.netease.yunxin.kit.conversationkit.ui.common.ConversationUtils` 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 (61 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:97— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:97-157 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:98-158 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java: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 (50 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:171— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:171-220 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:171-220 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (50 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:159— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:159-208 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:159-208 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 181 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java: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.
Duplicated block (49 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:223— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:223-271 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:223-271 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 196 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:203— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:203-251 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:197-245 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java` as WHOLE FILES: this scan already matched 9 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. Note first that the copies are not typed on the same thing: `MessageBottomLayout` names `com.netease.yunxin.kit.chatkit.ui.fun.view.MessageBottomLayout` in one and `com.netease.yunxin.kit.chatkit.ui.normal.view.MessageBottomLayout` 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 (47–48 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:49— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:49-95 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:49-96 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (47–48 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:286— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:286-333 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:263-309 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (44 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:171— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:171-214 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:147-190 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (44 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:41— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:41-84 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:39-82 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:41` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (38 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:45— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:45-82 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java:42-79 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java` 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 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:45` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:44` calls `setCornerRadius` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java:40` 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 (38 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:135— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:135-172 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:127-164 — before extracting anything, compare `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java` and `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: the declarations holding them bind `binding` to `FunTeamMemberListItemBinding` in one and `TeamMemberListItemBinding` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:86— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:86-121 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:90-125 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 286 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (36 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:53— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:53-88 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java:53-88 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java` as WHOLE FILES: this scan already matched 4 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:53` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (35 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:272— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:272-306 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:237-271 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (35 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/DefaultViewHolderFactory.java:1— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/DefaultViewHolderFactory.java:1-35 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/DefaultViewHolderFactory.java:1-35 — 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/DefaultViewHolderFactory.java:1` it does not close everything it opens, so those 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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 (29 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:152— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:152-180 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:152-180 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:152` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `IndexBarDataHelperImpl` names `com.netease.yunxin.kit.common.ui.widgets.indexbar.helper.IndexBarDataHelperImpl` in one and `com.netease.yunxin.kit.contactkit.ui.indexbar.helper.IndexBarDataHelperImpl` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:182` calls `configIndexTextBGColor`, `setColor` and `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:182` 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 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:759— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:759-787 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:832-860 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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, `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:863` calls `hasMore` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:789` 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–22 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:865— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:865-886 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:723-743 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:865` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:186— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:186-206 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:157-178 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:186` it begins part-way through the construct above it, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:682— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:682-699 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:517-535 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:682` 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–19 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:60— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:60-78 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:61-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. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:80` calls `isEmpty` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:79` 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 × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/ChatCustom.java:85— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/ChatCustom.java:85-101 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:95-111 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:91-107 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java` as WHOLE FILES: this scan already matched 6 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:286— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:286-302 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAIMessageViewHolder.java:89-105 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:263-279 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java: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 (16–17 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:372— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:372-387 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:438-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:372` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:387` calls `add` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:454` 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–17 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:98— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java:98-113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java:92-108 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatLocationMessageViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatLocationMessageViewHolder.java: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.
Duplicated block (15 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:197— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:197-211 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:120-134 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:134-148 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:183-197 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:119-133 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:134-148 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:197` it begins part-way through the construct above it, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:119` calls `setStroke`, `getColor`, `getContainer` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:196` 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 × 6) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIUserSelectorAdapter.java:35— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIUserSelectorAdapter.java:35-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunFriendSelectorAdapter.java:35-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunTeamSelectorAdapter.java:35-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIUserSelectorAdapter.java:35-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/FriendSelectorAdapter.java:34-48 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/TeamSelectorAdapter.java:34-48 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `bean` to `SelectableBean<V2NIMAIUser>` in one and `ContactFriendBean` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunTeamSelectorAdapter.java:50` calls `setText`, `getMemberCount` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIUserSelectorAdapter.java:50` 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 × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:64— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:64-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java:49-62 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/SearchAdapter.java:45-58 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java` as WHOLE FILES: this scan already matched 4 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `ChatReadUserBean` in one and `ChatSearchBean` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (14 lines × 3) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:49— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:49-62 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:65-78 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:108-121 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:49` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:257— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:257-269 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:143-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:222-234 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:145-157 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (13 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java:28— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java:28-40 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatImagePinViewHolder.java:26-38 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionImageViewHolder.java:27-39 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatImagePinViewHolder.java:26-38 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionImageViewHolder.java` as WHOLE FILES: 90% 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: the declarations holding them bind `message` to `CollectionBean` in one and `ChatMessageBean` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (12 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:185— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:185-196 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:107-118 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:121-132 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:171-182 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:106-117 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:121-132 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:185` it begins part-way through the construct above it, so those 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:119` calls `setStroke`, `getColor`, `getContainer` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:197` 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 × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:83— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:83-94 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:71-82 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatVideoPinViewHolder.java:77-88 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatVideoMessageViewHolder.java:83-94 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionVideoViewHolder.java:70-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatVideoPinViewHolder.java:77-88 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatVideoMessageViewHolder.java:96` calls `getAttachment` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionVideoViewHolder.java:84` 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 × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:75— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:75-86 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:55-66 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:55-66 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:55-66 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:75` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (12 lines × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:123— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:123-134 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:103-114 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:104-115 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:104-115 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:123` 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–11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1064— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1064-1072 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:988-998 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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–11 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:236— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:236-246 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:371-379 — both copies are in the same file, so extract the 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 × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:741— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:741-750 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:761-770 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:782-791 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:741` it does not close everything it opens, so those exact lines 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) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:191— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:191-200 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:210-219 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:230-239 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:201` calls `getUserWithFriend` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/UserInfoViewModel.java:240` 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 × 5) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:502— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:502-510 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:363-371 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:134-142 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/addfriend/BaseAddFriendActivity.java:54-62 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/BaseTeamSearchActivity.java:51-59 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:502` it does not close everything it opens, so those exact lines 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 × 5) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:56— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIUserSelectorAdapter.java:56-64 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseConversationSelectorAdapter.java:61-69 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseFriendSelectorAdapter.java:54-62 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseRecentForwardSelectorAdapter.java:43-51 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseTeamSelectorAdapter.java:56-64 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `data` to `SelectableBean<V2NIMAIUser>` in one and `SelectableBean<V2NIMBaseConversation>` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseConversationSelectorAdapter.java:52` calls `setSelectableListener` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseRecentForwardSelectorAdapter.java:40` 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–9 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:50— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:50-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatHistoryActivity.java:48-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchHistoryActivity.java:50` it does not close everything it opens, so those 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:152— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:152-159 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:174-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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:152` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 `data` to `V2NIMConversation` in one and `V2NIMLocalConversation` 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:62— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:62-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:62-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:41-47 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java: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 (7 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java:182— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java:182-188 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotInfoActivity.java:228-234 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotListActivity.java:107-113 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:84— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:84-89 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:123-128 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java:91-96 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 35 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 3) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:51— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:51-56 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java:51-56 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java:51-56 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationHeaderViewHolder.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationHeaderViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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–6 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:96— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:96-101 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:81-85 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–6 lines × 2) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:106— localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:106-111 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:81-85 — before extracting anything, compare `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java` as WHOLE FILES: this scan already matched 7 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. Read the line range as the matched WINDOW rather than a finished unit: at `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java: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. 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 × 5) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:79— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:79-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:122-127 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:137-142 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java:64-69 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/SearchAdapter.java:60-65 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java` as WHOLE FILES: this scan already matched 4 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 (6 lines × 5) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:119— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java:119-124 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/CollectionMessageAdapter.java:198-203 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/PinMessageAdapter.java:213-218 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java:140-145 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/search/SearchAdapter.java:101-106 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatUserBaseAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/SearchMessageAdapter.java` as WHOLE FILES: this scan already matched 4 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.
ChatBaseMessageViewHolder.setStatus (cyclomatic 36) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:803— ChatBaseMessageViewHolder.setStatus 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.
ChatCallMessageViewHolder.loadData (cyclomatic 30) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java:47— ChatCallMessageViewHolder.loadData 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.
ChatCallMessageViewHolder.loadData (cyclomatic 29) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:46— ChatCallMessageViewHolder.loadData 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.
TeamNotificationHelper.buildUpdateTeamNotification (cyclomatic 24) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:176— TeamNotificationHelper.buildUpdateTeamNotification 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.
verify.main (cyclomatic 24) .agents/skills/uikit-prune/scripts/verify.py:9— verify.main 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.
ChatBaseFragment.initView (cyclomatic 23) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:613— ChatBaseFragment.initView 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.
ChatBaseFragment.clickMessage (cyclomatic 22) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1824— ChatBaseFragment.clickMessage 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.
ConversationBaseFragment.initData (cyclomatic 22) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:288— ConversationBaseFragment.initData 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.
ChatPopActionFactory.getMessageActions (cyclomatic 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:90— ChatPopActionFactory.getMessageActions 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.
ChatTextMessageViewHolder.setMessageText (cyclomatic 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:120— ChatTextMessageViewHolder.setMessageText 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.
LocalConversationBaseFragment.initData (cyclomatic 21) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:268— LocalConversationBaseFragment.initData 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.
CropImageView.handleCropWindowChanged (cyclomatic 20) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1435— CropImageView.handleCropWindowChanged 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.
CustomDatePicker.setYearMonthMode (cyclomatic 20) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:621— CustomDatePicker.setYearMonthMode 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.
MessageCreator.createMessage (cyclomatic 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageCreator.java:33— MessageCreator.createMessage 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.
ChatTextMessageViewHolder.setMessageText (cyclomatic 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:149— ChatTextMessageViewHolder.setMessageText 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.
ChatBaseMessageViewHolder.loadNickAndAvatarForOthers (cyclomatic 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:555— ChatBaseMessageViewHolder.loadNickAndAvatarForOthers 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.
CropImageOptions.validate (cyclomatic 19) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageOptions.java:406— CropImageOptions.validate 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.
CropImageView.onRestoreInstanceState (cyclomatic 19) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1249— CropImageView.onRestoreInstanceState 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.
FunTeamVerifyInfoViewHolder.onBind (cyclomatic 19) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:37— FunTeamVerifyInfoViewHolder.onBind 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.
TeamVerifyInfoViewHolder.onBind (cyclomatic 19) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:37— TeamVerifyInfoViewHolder.onBind 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.
ConversationCustom.customContentText (cyclomatic 19) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:27— ConversationCustom.customContentText 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.
LocalConversationCustom.customContentText (cyclomatic 19) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java:27— LocalConversationCustom.customContentText 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.
TeamUserManager.getNickname (cyclomatic 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:599— TeamUserManager.getNickname 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.
ChatBaseFragment.handleTopMessage (cyclomatic 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:427— ChatBaseFragment.handleTopMessage 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.
CustomGestureDetector.processTouchEvent (cyclomatic 18) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/CustomGestureDetector.kt:112— CustomGestureDetector.processTouchEvent 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.
ServerConfigUtils.autoAdjust (cyclomatic 17) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigUtils.java:147— ServerConfigUtils.autoAdjust 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.
MessageHelper.createMultiForwardMsg (cyclomatic 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1161— MessageHelper.createMultiForwardMsg 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.
MessageOperateUtils.buildMediaMessage (cyclomatic 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:570— MessageOperateUtils.buildMediaMessage 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.
FunChatSettingActivity.initData (cyclomatic 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:172— FunChatSettingActivity.initData 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.
ChatPinBaseActivity.initData (cyclomatic 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:136— ChatPinBaseActivity.initData 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.
ChatMessageBean.<init> (cyclomatic 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:51— ChatMessageBean.<init> 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.
ChatSettingActivity.initData (cyclomatic 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:174— ChatSettingActivity.initData 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.
BaseTeamManagerListActivity.initData (cyclomatic 17) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:161— BaseTeamManagerListActivity.initData 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.
BotSubSessionUtils.getMessageSummary (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionUtils.java:78— BotSubSessionUtils.getMessageSummary 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.
MessageOperateUtils.splitTextByAtMentions (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:753— MessageOperateUtils.splitTextByAtMentions 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.
MessageOperateUtils.translateMessage (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:211— MessageOperateUtils.translateMessage 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.
FunChatSearchImageActivity.loadFetchResult (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:184— FunChatSearchImageActivity.loadFetchResult 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.
FunChatBaseMessageViewHolder.onMessageBackgroundConfig (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:176— FunChatBaseMessageViewHolder.onMessageBackgroundConfig 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.
FunChatView.init (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:82— FunChatView.init 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.
ChatBaseMessageViewHolder.bindData (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:99— ChatBaseMessageViewHolder.bindData 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.
ChatView.init (cyclomatic 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:86— ChatView.init 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.
CropWindowMoveHandler.adjustBottom (cyclomatic 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:582— CropWindowMoveHandler.adjustBottom 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustLeft, CropWindowMoveHandler.adjustRight, CropWindowMoveHandler.adjustTop) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
CropWindowMoveHandler.adjustLeft (cyclomatic 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:320— CropWindowMoveHandler.adjustLeft 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustRight, CropWindowMoveHandler.adjustTop, CropWindowMoveHandler.adjustBottom) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
CropWindowMoveHandler.adjustRight (cyclomatic 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:407— CropWindowMoveHandler.adjustRight 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustLeft, CropWindowMoveHandler.adjustTop, CropWindowMoveHandler.adjustBottom) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
CropWindowMoveHandler.adjustTop (cyclomatic 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:496— CropWindowMoveHandler.adjustTop 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustLeft, CropWindowMoveHandler.adjustRight, CropWindowMoveHandler.adjustBottom) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
BaseConversationSelectorFragment.initData (cyclomatic 16) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:66— BaseConversationSelectorFragment.initData 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.
PageMapImpl.onPoiSearched (cyclomatic 16) locationkit/src/main/java/com/netease/yunxin/kit/locationkit/PageMapImpl.java:299— PageMapImpl.onPoiSearched 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.
TeamMemberListAdapter.onBindViewHolder (cyclomatic 16) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:36— TeamMemberListAdapter.onBindViewHolder 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.
TeamUIService.createTeam (cyclomatic 16) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/TeamUIService.java:173— TeamUIService.createTeam 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.
ScaleAttache.onTouch (cyclomatic 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleAttache.kt:354— ScaleAttache.onTouch 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.
ChatBaseMessageViewHolder.setStatus (cognitive 75) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:803— ChatBaseMessageViewHolder.setStatus has cognitive complexity 75 (threshold 15). Drivers by points: if/else 33 (53 pts), ternaries 6 (17 pts), boolean chains 5 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatBaseFragment.initView (cognitive 52) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:613— ChatBaseFragment.initView has cognitive complexity 52 (threshold 15). Drivers by points: if/else 24 (46 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CropImageView.onRestoreInstanceState (cognitive 49) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1249— CropImageView.onRestoreInstanceState has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (37 pts), boolean chains 7, ternaries 1 (5 pts) (nesting depth added 28). 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.
ChatPopActionFactory.getMessageActions (cognitive 48) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:90— ChatPopActionFactory.getMessageActions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (42 pts), boolean chains 6 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChatCallMessageViewHolder.loadData (cognitive 47) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java:47— ChatCallMessageViewHolder.loadData has cognitive complexity 47 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 2, loops 1 (2 pts), 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.
ChatCallMessageViewHolder.loadData (cognitive 46) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:46— ChatCallMessageViewHolder.loadData has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28 (41 pts), boolean chains 2, loops 1 (2 pts), 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.
CustomDatePicker.setYearMonthMode (cognitive 46) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:621— CustomDatePicker.setYearMonthMode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21 (46 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.
TeamNotificationHelper.buildUpdateTeamNotification (cognitive 43) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:176— TeamNotificationHelper.buildUpdateTeamNotification has cognitive complexity 43 (threshold 15). Drivers by points: if/else 31 (43 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.
ChatTextMessageViewHolder.setMessageText (cognitive 39) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:120— ChatTextMessageViewHolder.setMessageText has cognitive complexity 39 (threshold 15). Drivers by points: if/else 22 (36 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.
CropImageView.handleCropWindowChanged (cognitive 38) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1435— CropImageView.handleCropWindowChanged has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (30 pts), boolean chains 8 (nesting depth added 19). 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.
ChatTextMessageViewHolder.setMessageText (cognitive 34) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:149— ChatTextMessageViewHolder.setMessageText has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (31 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.
ChatBaseFragment.clickMessage (cognitive 34) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1824— ChatBaseFragment.clickMessage has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19 (28 pts), boolean chains 3, loops 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.
MessageHelper.createMultiForwardMsg (cognitive 33) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1161— MessageHelper.createMultiForwardMsg has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (25 pts), ternaries 2 (4 pts), boolean chains 2, 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.
ConversationBaseFragment.initData (cognitive 33) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:288— ConversationBaseFragment.initData has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 3, ternaries 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.
PageMapImpl.onPoiSearched (cognitive 33) locationkit/src/main/java/com/netease/yunxin/kit/locationkit/PageMapImpl.java:299— PageMapImpl.onPoiSearched has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 4 (nesting depth added 16). 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.
verify.main (cognitive 33) .agents/skills/uikit-prune/scripts/verify.py:9— verify.main has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, loops 3 (6 pts), ternaries 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.
ChatBaseFragment.handleTopMessage (cognitive 32) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:427— ChatBaseFragment.handleTopMessage has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 4, loops 2 (4 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.
MessageCreator.createMessage (cognitive 31) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageCreator.java:33— MessageCreator.createMessage has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (31 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.
1.onContactChange (cognitive 31) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:64— 1.onContactChange has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 19). 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.
CustomGestureDetector.processTouchEvent (cognitive 31) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/CustomGestureDetector.kt:112— CustomGestureDetector.processTouchEvent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (30 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.
FunChatSettingActivity.initData (cognitive 30) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:172— FunChatSettingActivity.initData has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunChatSearchImageActivity.loadFetchResult (cognitive 30) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:184— FunChatSearchImageActivity.loadFetchResult has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 5 (10 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.
ChatSettingActivity.initData (cognitive 30) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:174— ChatSettingActivity.initData has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TeamVerifyViewModel.mergeAndAddTeamUserData (cognitive 30) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:357— TeamVerifyViewModel.mergeAndAddTeamUserData has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 2 (5 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.
ConversationFragment.loadUIConfig (cognitive 30) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:152— ConversationFragment.loadUIConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 1 (3 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.
LocalConversationFragment.loadUIConfig (cognitive 30) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:152— LocalConversationFragment.loadUIConfig has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (27 pts), ternaries 1 (3 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.
LocalConversationBaseFragment.initData (cognitive 30) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:268— LocalConversationBaseFragment.initData has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 3, ternaries 1 (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.
TeamMemberListAdapter.onBindViewHolder (cognitive 30) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/adapter/TeamMemberListAdapter.java:36— TeamMemberListAdapter.onBindViewHolder has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (23 pts), ternaries 2 (5 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.
MainActivity.parseAndGoChat (cognitive 29) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:784— MainActivity.parseAndGoChat has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 2 (12 pts), boolean chains 1 (nesting depth added 20). 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.
ChatBaseMessageViewHolder.loadNickAndAvatarForOthers (cognitive 28) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:555— ChatBaseMessageViewHolder.loadNickAndAvatarForOthers has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (23 pts), ternaries 2 (4 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.
ChatMessageBean.initReplyMessage (cognitive 28) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:357— ChatMessageBean.initReplyMessage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 2 (10 pts), error handling 1 (4 pts), boolean chains 2 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChatSearchImageActivity.loadFetchResult (cognitive 28) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:169— ChatSearchImageActivity.loadFetchResult has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (16 pts), ternaries 4 (8 pts), boolean chains 4 (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.
7.onSuccess (cognitive 27) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:279— 7.onSuccess has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 1 (4 pts), error handling 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChatMessageBean.<init> (cognitive 27) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:51— ChatMessageBean.<init> has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, error handling 1 (3 pts), ternaries 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.
ChatForwardMessageViewHolder.bindData (cognitive 26) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatForwardMessageViewHolder.java:59— ChatForwardMessageViewHolder.bindData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (8 pts), boolean chains 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
3.onReeditRevokeMessage (cognitive 26) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1615— 3.onReeditRevokeMessage has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 2 (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.
BaseTeamManagerListActivity.initData (cognitive 26) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:161— BaseTeamManagerListActivity.initData has cognitive complexity 26 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatBaseFragment.loadConfig (cognitive 25) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:780— ChatBaseFragment.loadConfig has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), ternaries 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.
CropImageView.applyImageMatrix (cognitive 25) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1500— CropImageView.applyImageMatrix has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (10 pts), boolean chains 4 (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.
EllipsizeUtils.ellipsize (cognitive 25) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:351— EllipsizeUtils.ellipsize has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (18 pts), loops 2 (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.
EllipsizeUtils.ellipsizeByKeywordInner (cognitive 25) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:165— EllipsizeUtils.ellipsizeByKeywordInner has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (21 pts), ternaries 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageUtils.convertToPushConfig (cognitive 24) app/src/main/java/com/netease/yunxin/app/im/utils/MessageUtils.java:114— MessageUtils.convertToPushConfig has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), error handling 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.
TeamUserManager.getNickname (cognitive 24) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:599— TeamUserManager.getNickname has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 8, ternaries 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.
FunChatSearchFileActivity.onMessageDeletedOrRevoked (cognitive 24) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:161— FunChatSearchFileActivity.onMessageDeletedOrRevoked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatSearchFileActivity.onMessageDeletedOrRevoked (cognitive 24) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:160— ChatSearchFileActivity.onMessageDeletedOrRevoked has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (8 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PickerView.onTouchEvent (cognitive 24) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/PickerView.java:175— PickerView.onTouchEvent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (23 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.
BaseConversationSelectorFragment.initData (cognitive 24) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseConversationSelectorFragment.java:66— BaseConversationSelectorFragment.initData has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4, loops 1 (3 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.
FunTeamMemberListAdapter.onBindViewHolder (cognitive 24) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/adapter/FunTeamMemberListAdapter.java:38— FunTeamMemberListAdapter.onBindViewHolder has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (20 pts), boolean chains 2, ternaries 1 (2 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.
ScaleAttache.onTouch (cognitive 24) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleAttache.kt:354— ScaleAttache.onTouch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 5, match/switch 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.
ChatTextMessageViewHolder.updateOperateView (cognitive 23) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:209— ChatTextMessageViewHolder.updateOperateView has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (18 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.
CropWindowMoveHandler.adjustBottom (cognitive 23) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:582— CropWindowMoveHandler.adjustBottom has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustLeft, CropWindowMoveHandler.adjustRight, CropWindowMoveHandler.adjustTop) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
CropWindowMoveHandler.adjustLeft (cognitive 23) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:320— CropWindowMoveHandler.adjustLeft has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustRight, CropWindowMoveHandler.adjustTop, CropWindowMoveHandler.adjustBottom) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
CropWindowMoveHandler.adjustRight (cognitive 23) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:407— CropWindowMoveHandler.adjustRight has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustLeft, CropWindowMoveHandler.adjustTop, CropWindowMoveHandler.adjustBottom) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
CropWindowMoveHandler.adjustTop (cognitive 23) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:496— CropWindowMoveHandler.adjustTop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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. This shape REPEATS in the file: 3 other methods here (CropWindowMoveHandler.adjustLeft, CropWindowMoveHandler.adjustRight, CropWindowMoveHandler.adjustBottom) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
BaseUserInfoActivity.initData (cognitive 23) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/userinfo/BaseUserInfoActivity.java:223— BaseUserInfoActivity.initData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 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.
TeamVerifyBaseFragment.initData (cognitive 23) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyBaseFragment.java:80— TeamVerifyBaseFragment.initData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (4 pts), loops 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.
ConversationCustom.customContentText (cognitive 23) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:27— ConversationCustom.customContentText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
LocalConversationCustom.customContentText (cognitive 23) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java:27— LocalConversationCustom.customContentText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (20 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageUtils.generateAIHelperInfo (cognitive 22) app/src/main/java/com/netease/yunxin/app/im/utils/MessageUtils.java:41— MessageUtils.generateAIHelperInfo has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 2 (5 pts), boolean chains 4, 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.
BotSubSessionUtils.getMessageSummary (cognitive 22) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionUtils.java:78— BotSubSessionUtils.getMessageSummary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 3 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageHelper.saveLocalRevokeMessage (cognitive 22) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1075— MessageHelper.saveLocalRevokeMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 2 (6 pts), error handling 2 (5 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.
MessageOperateUtils.buildMediaMessage (cognitive 22) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:570— MessageOperateUtils.buildMediaMessage has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), error handling 3 (5 pts), boolean chains 2 (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.
FunChatTeamFragment.initDataObserver (cognitive 22) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:232— FunChatTeamFragment.initDataObserver has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 4, loops 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatReaderBaseFragment.initData (cognitive 22) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatReaderBaseFragment.java:71— ChatReaderBaseFragment.initData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 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.
ContactListView.addFriendData (cognitive 22) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/ContactListView.java:220— ContactListView.addFriendData has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (5 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.
TeamUserManager.getAllTeamMembers (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:515— TeamUserManager.getAllTeamMembers has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatUserCache.getUserNick (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:133— ChatUserCache.getUserNick has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, ternaries 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.
MessageOperateUtils.splitTextByAtMentions (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:753— MessageOperateUtils.splitTextByAtMentions has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 4 (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.
MessageOperateUtils.translateMessage (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:211— MessageOperateUtils.translateMessage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, loops 3 (4 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.
ChatTextMessageViewHolder.updateOperateView (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:240— ChatTextMessageViewHolder.updateOperateView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
6.onSuccess (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSettingViewModel.java:230— 6.onSuccess has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), error handling 1 (3 pts), loops 1 (3 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.
ChatBaseMessageViewHolder.onMessageSignal (cognitive 21) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:389— ChatBaseMessageViewHolder.onMessageSignal has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 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.
CropOverlayView.calculateBounds (cognitive 21) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:887— CropOverlayView.calculateBounds has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 6 (9 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.
FunTeamVerifyInfoViewHolder.onBind (cognitive 21) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:37— FunTeamVerifyInfoViewHolder.onBind has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 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.
BaseForwardSelectorActivity.initData (cognitive 21) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/adapter/BaseForwardSelectorActivity.java:322— BaseForwardSelectorActivity.initData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, 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.
TeamVerifyInfoViewHolder.onBind (cognitive 21) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:37— TeamVerifyInfoViewHolder.onBind has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17 (20 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.
FriendVerifyBaseActivity.initData (cognitive 21) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:58— FriendVerifyBaseActivity.initData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (4 pts), boolean chains 3, loops 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.
FriendVerifyBaseFragment.initData (cognitive 21) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:75— FriendVerifyBaseFragment.initData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 1 (4 pts), boolean chains 3, loops 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.
MessageSearchUtils.groupMessageByMonth (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageSearchUtils.java:146— MessageSearchUtils.groupMessageByMonth has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 4 (6 pts), error handling 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.
WatchTextMessageDialog.getRootView (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/WatchTextMessageDialog.java:68— WatchTextMessageDialog.getRootView has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (19 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.
FunChatView.init (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:82— FunChatView.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5 (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.
MessageBottomLayout.init (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:139— MessageBottomLayout.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 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.
ChatSearchViewModel.loadSuccess (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchViewModel.java:224— ChatSearchViewModel.loadSuccess has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (6 pts), boolean chains 2, ternaries 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.
ChatTeamFragment.initDataObserver (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:233— ChatTeamFragment.initDataObserver has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatForwardMessageViewHolder.bindData (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:60— ChatForwardMessageViewHolder.bindData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatView.init (cognitive 20) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:86— ChatView.init has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5 (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.
BaseContactFragment.loadTitle (cognitive 20) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:295— BaseContactFragment.loadTitle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 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.
BaseFriendSelectorFragment.initData (cognitive 20) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:97— BaseFriendSelectorFragment.initData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 1 (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.
BaseTeamSelectorFragment.initData (cognitive 20) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java:65— BaseTeamSelectorFragment.initData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3, loops 1 (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.
ContactFragment.loadTitle (cognitive 20) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/contact/ContactFragment.java:47— ContactFragment.loadTitle has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (20 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.
ConversationGroupViewModel.filterCurrentGroup (cognitive 20) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:540— ConversationGroupViewModel.filterCurrentGroup has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), ternaries 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.
BaseTeamMemberListAdapter.removeData (cognitive 20) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:168— BaseTeamMemberListAdapter.removeData has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatUtils.havePermissionForTopSticky (cognitive 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:657— ChatUtils.havePermissionForTopSticky has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 6, error handling 1 (3 pts), ternaries 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.
FunChatBaseMessageViewHolder.onMessageBackgroundConfig (cognitive 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:176— FunChatBaseMessageViewHolder.onMessageBackgroundConfig 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.
ChatBaseFragment.onRevokeMessage (cognitive 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2597— ChatBaseFragment.onRevokeMessage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 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.
ChatBaseViewModel.findQuickComments (cognitive 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:646— ChatBaseViewModel.findQuickComments has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5, loops 2 (3 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.
ChatPinBaseActivity.initData (cognitive 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:136— ChatPinBaseActivity.initData has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 8 (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.
AitManager.afterTextChanged (cognitive 19) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitManager.java:271— AitManager.afterTextChanged has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 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.
CropOverlayView.fixCropWindowRectByRules (cognitive 19) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:502— CropOverlayView.fixCropWindowRectByRules has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
3.onSuccess (cognitive 19) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:222— 3.onSuccess has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (2 pts), boolean chains 1, ternaries 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. This shape REPEATS in the file: one other method here (4.onSuccess) 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.
4.onSuccess (cognitive 19) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:276— 4.onSuccess has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 1 (2 pts), boolean chains 1, ternaries 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. This shape REPEATS in the file: one other method here (3.onSuccess) 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.
BaseTeamMemberListAdapter.getSecondaryName (cognitive 19) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:297— BaseTeamMemberListAdapter.getSecondaryName has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (8 pts), if/else 5 (6 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.
TeamUIService.createTeam (cognitive 19) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/TeamUIService.java:173— TeamUIService.createTeam has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 6 (7 pts), error handling 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.
TeamUserManager.getTeamMembers (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:362— TeamUserManager.getTeamMembers has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, 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.
8.onSuccess (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:561— 8.onSuccess has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 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.
MessageHelper.replaceEmoticonsAndHighlight (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:865— MessageHelper.replaceEmoticonsAndHighlight has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 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.
ChatThumbBaseViewHolder.onLayoutConfig (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:67— ChatThumbBaseViewHolder.onLayoutConfig has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 8 (16 pts), if/else 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.
ChatBaseMessageViewHolder.bindData (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:99— ChatBaseMessageViewHolder.bindData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (16 pts), loops 1 (2 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ChatMessageListView.onScrollStateChanged (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/ChatMessageListView.java:512— ChatMessageListView.onScrollStateChanged has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (5 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.
AitService.parseMessage (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:285— AitService.parseMessage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (4 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.
PhotoView.scale (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:302— PhotoView.scale has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1 (nesting depth added 9). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
ChatPopMenu.showWindow (cognitive 18) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/popmenu/ChatPopMenu.java:198— ChatPopMenu.showWindow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 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.
CropImageOptions.validate (cognitive 18) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageOptions.java:406— CropImageOptions.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
FriendVerifyViewModel.mergeSystemMessageList (cognitive 18) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyViewModel.java:324— FriendVerifyViewModel.mergeSystemMessageList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (13 pts), loops 2 (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.
FunConversationFragment.loadUIConfig (cognitive 18) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:201— FunConversationFragment.loadUIConfig has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (16 pts), ternaries 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.
ConversationBaseFragment.renderConversationGroupList (cognitive 18) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:520— ConversationBaseFragment.renderConversationGroupList has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 4 (5 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.
BaseTeamMemberListAdapter.updateDataWithComparator (cognitive 18) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/adapter/BaseTeamMemberListAdapter.java:142— BaseTeamMemberListAdapter.updateDataWithComparator has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (8 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.
plan.skin_candidates (cognitive 18) .agents/skills/uikit-prune/scripts/plan.py:18— plan.skin_candidates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 3 (6 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.
LanguageSelectActivity.selectLanguage (cognitive 17) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/LanguageSelectActivity.java:189— LanguageSelectActivity.selectLanguage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), ternaries 2 (8 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.
TeamUserManager.getTeamMemberWithRoleListFromCache (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:466— TeamUserManager.getTeamMemberWithRoleListFromCache has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 2, loops 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.
FunAitContactAdapter.filter (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:56— FunAitContactAdapter.filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 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.
MessageBottomLayout.initView (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:440— MessageBottomLayout.initView has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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.
ChatBaseFragment.onPinedMessageListChange (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2544— ChatBaseFragment.onPinedMessageListChange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatSearchImageAdapter.removeSingleMessage (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:134— ChatSearchImageAdapter.removeSingleMessage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 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.
9.onSuccess (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1092— 9.onSuccess has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 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.
ChatBaseMessageViewHolder.setTime (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:699— ChatBaseMessageViewHolder.setTime has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (4 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.
AitService.removeAitInfo (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:540— AitService.removeAitInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (16 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.
NormalAitContactAdapter.filter (cognitive 17) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.java:56— NormalAitContactAdapter.filter has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 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.
CropOverlayView.drawBackground (cognitive 17) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:584— CropOverlayView.drawBackground 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.
EllipsizeUtils.highlight (cognitive 17) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/EllipsizeUtils.java:41— EllipsizeUtils.highlight has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, loops 1 (2 pts), ternaries 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.
BaseRobotBindActivity.loadData (cognitive 17) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java:95— BaseRobotBindActivity.loadData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), ternaries 4 (8 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.
BaseTeamProfileActivity.bindTeamData (cognitive 17) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/team/BaseTeamProfileActivity.java:121— BaseTeamProfileActivity.bindTeamData has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (17 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.
ServerConfigUtils.autoAdjust (cognitive 16) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/ServerConfigUtils.java:147— ServerConfigUtils.autoAdjust has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 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.
ChatUtils.truncateString (cognitive 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:509— ChatUtils.truncateString has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 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.
MessageBottomLayout.setMute (cognitive 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:951— MessageBottomLayout.setMute has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 3 (6 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.
1.onDataSync (cognitive 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:249— 1.onDataSync has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, ternaries 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.
ChatBaseMessageViewHolder.setStatusCallback (cognitive 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:1047— ChatBaseMessageViewHolder.setStatusCallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15, 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.
TranslateRunnable.run (cognitive 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1273— TranslateRunnable.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, ternaries 3 (5 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.
NormalChatBaseMessageViewHolder.onMessageBackgroundConfig (cognitive 16) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:51— NormalChatBaseMessageViewHolder.onMessageBackgroundConfig 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.
BitmapUtils.resizeBitmap (cognitive 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:403— BitmapUtils.resizeBitmap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, error handling 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.
CropImageView.onMeasure (cognitive 16) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1317— CropImageView.onMeasure 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.
FunVerifyInfoViewHolder.onBind (cognitive 16) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:40— FunVerifyInfoViewHolder.onBind 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.
BaseAIFriendSelectorFragment.initData (cognitive 16) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAIFriendSelectorFragment.java:100— BaseAIFriendSelectorFragment.initData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 1 (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.
VerifyInfoViewHolder.onBind (cognitive 16) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:38— VerifyInfoViewHolder.onBind 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.
FunConversationFragment.initView (cognitive 16) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:61— FunConversationFragment.initView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 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.
ConversationFragment.initView (cognitive 16) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:53— ConversationFragment.initView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 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.
ConversationGroupViewModel.syncSelectedCustomGroupConversationCache (cognitive 16) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:656— ConversationGroupViewModel.syncSelectedCustomGroupConversationCache has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 3, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
3.onSuccess (cognitive 16) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationGroupViewModel.java:153— 3.onSuccess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
FunLocalConversationFragment.initView (cognitive 16) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:68— FunLocalConversationFragment.initView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 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.
FunLocalConversationFragment.loadUIConfig (cognitive 16) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:234— FunLocalConversationFragment.loadUIConfig has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 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.
LocalConversationFragment.initView (cognitive 16) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:53— LocalConversationFragment.initView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 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.
ConversationViewModel.checkConversationNameAndRequest (cognitive 16) localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:736— ConversationViewModel.checkConversationNameAndRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 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.
D4 · Code Duplication· Near-duplicate member family (8 members, 21 shared lines) · ×1
Near-duplicate member family (8 members, 21 shared lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:58— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:58-103 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:106-138 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:38-83 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:86-118 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:38-84 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:87-119 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:38-84 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:87-119 — These 8 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 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 (6 members, 35 shared lines) · ×1
Near-duplicate member family (6 members, 35 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:163— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:163-265 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:92-147 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:99-161 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:149-251 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:91-146 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:99-161 — These 6 members are variants of one another: a block of 35 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, 14 shared lines) · ×1
Near-duplicate member family (6 members, 14 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:114— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:114-143 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:56-85 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:63-92 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:107-137 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:55-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:63-92 — These 6 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 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 (4 members, 42 shared lines) · ×1
Near-duplicate member family (4 members, 42 shared lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:58— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:58-138 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java:59-137 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunCreateTeamFactory.java:58-138 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/NormalCreateTeamFactory.java:59-137 — These 4 members are variants of one another: a block of 42 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 (4 members, 31 shared lines) · ×1
Near-duplicate member family (4 members, 31 shared lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:61— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:61-153 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:53-133 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:68-167 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:53-133 — These 4 members are variants of one another: a block of 31 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 (4 members, 24 shared lines) · ×1
Near-duplicate member family (4 members, 24 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:157— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:157-186 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:157-186 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:156-185 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:159-188 — These 4 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 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 (4 members, 20 shared lines) · ×1
Near-duplicate member family (4 members, 20 shared lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:35— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:35-72 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:36-77 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:50-99 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:36-77 — These 4 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 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 (94 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:139— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:139-321 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:118-235 — These two members are variants of one another: 94 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 (79 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:82— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:82-203 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:86-204 — These two members are variants of one another: 79 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:149— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:149-238 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:120-207 — 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 (60 shared lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:40— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:40-122 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:38-119 — These two members are variants of one another: 60 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) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:288— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:288-395 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:268-364 — 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 (48 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:81— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:81-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:82-157 — These two members are variants of one another: 48 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 (41 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:76— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/BotSubSessionMoreActionHelper.java:76-135 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/BaseChatBotSubSessionActivity.java:397-466 — These two members are variants of one another: 41 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 (35 shared lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:97— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseFriendSelectorFragment.java:97-156 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/BaseTeamSelectorFragment.java:65-124 — These two members are variants of one another: 35 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 (17 shared lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:79— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:79-100 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:79-100 — These two members are variants of one another: 17 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· Edited copy of a member (114 corresponding lines) · ×1
Edited copy of a member (114 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:37— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:37-150 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:37-150 — These two members are one piece of code written twice and then edited apart: 114 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (52 corresponding lines) · ×1
Edited copy of a member (52 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:152— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:152-208 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:152-208 — 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· Members sharing a duplicated core (11 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (11 members, 50+ identical tokens) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:84— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:84-98 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:54-68 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:152-166 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:124-138 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java:81-95 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamListViewHolder.java:51-65 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:152-166 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:121-135 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/AIUserViewHolder.java:55-69 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/BlackListViewHolder.java:60-74 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/RobotViewHolder.java:59-72 — 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 (120 corresponding lines) · ×1
Edited copy of a member (120 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:38— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunDateSelectActivity.java:38-157 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatDateSelectActivity.java:39-158 — These two members are one piece of code written twice and then edited apart: 120 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (126 corresponding lines) · ×1
Edited copy of a member (126 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:46— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:46-171 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java:47-180 — These two members are one piece of code written twice and then edited apart: 126 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (98 corresponding lines) · ×1
Edited copy of a member (98 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:48— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:48-145 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:28-125 — These two members are one piece of code written twice and then edited apart: 98 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (99 corresponding lines) · ×1
Edited copy of a member (99 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:28— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:28-126 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:28-126 — These two members are one piece of code written twice and then edited apart: 99 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×1
Edited copy of a member (51 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:181— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:181-231 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:180-236 — 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 (68 corresponding lines) · ×1
Edited copy of a member (68 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:113— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:113-180 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:113-180 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (90 corresponding lines) · ×1
Edited copy of a member (90 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:266— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:266-355 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:256-347 — These two members are one piece of code written twice and then edited apart: 90 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) · ×1
Edited copy of a member (60 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:232— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:232-291 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:233-292 — 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 (53 corresponding lines) · ×1
Edited copy of a member (53 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:246— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:246-298 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:300-355 — These two members are one piece of code written twice and then edited apart: 53 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:312— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:312-369 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:315-373 — 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 copy of a member (70 corresponding lines) · ×1
Edited copy of a member (70 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:415— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:415-486 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:590-659 — 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 (59 corresponding lines) · ×1
Edited copy of a member (59 corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:295— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/BaseContactFragment.java:295-353 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/contact/ContactFragment.java:47-113 — 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 (69 corresponding lines) · ×1
Edited copy of a member (69 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:327— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:327-396 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:503-571 — These two members are one piece of code written twice and then edited apart: 69 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (62 corresponding lines) · ×1
Edited copy of a member (62 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:317— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:317-380 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.java:179-240 — 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 (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:427— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:427-472 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:474-521 — 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 copy of a member (54 corresponding lines) · ×1
Edited copy of a member (54 corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:47— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationUIService.java:47-116 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationUIService.java:41-94 — 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 (41 corresponding lines) · ×1
Edited copy of a member (41 corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:336— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:336-383 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:385-425 — 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, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:347— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:347-374 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:346-372 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:81-105 — 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, 31+ corresponding lines) · ×1
Edited copies of one member (3 members, 31+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:86— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:86-116 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:133-164 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:453-483 — 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 copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:44— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:44-78 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/dialog/ImageChoiceDialog.java:28-63 — 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 copies of one member (6 members, 25+ corresponding lines) · ×1
Edited copies of one member (6 members, 25+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:82— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotBindViewModel.java:82-107 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:82-106 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:113-137 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:146-172 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:184-212 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/RobotInfoViewModel.java:219-244 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1084— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1084-1113 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:1009-1040 — 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 copies of one member (4 members, 32+ corresponding lines) · ×1
Edited copies of one member (4 members, 32+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:861— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:861-894 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:897-933 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:720-751 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:754-789 — 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, 26+ corresponding lines) · ×1
Edited copies of one member (4 members, 26+ corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:573— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:573-600 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:634-662 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:665-693 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:696-721 — 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, 22+ corresponding lines) · ×1
Edited copies of one member (4 members, 22+ corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:262— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:262-286 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamBaseViewModel.java:294-315 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerListViewModel.java:56-78 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamManagerListViewModel.java:86-110 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 20+ corresponding lines) · ×1
Edited copies of one member (6 members, 20+ corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:192— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:192-211 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:219-238 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:246-266 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:274-293 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:440-463 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:520-543 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 19+ corresponding lines) · ×1
Edited copies of one member (4 members, 19+ corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunViewHolderFactory.java:62— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunViewHolderFactory.java:62-81 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ViewHolderFactory.java:62-80 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunViewHolderFactory.java:62-81 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/ViewHolderFactory.java:62-80 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:167— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:167-189 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:201-223 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUserCache.java:250-270 — 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 (6 members, 22+ corresponding lines) · ×1
Edited copies of one member (6 members, 22+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:342— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.java:342-364 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:2250-2273 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:160-188 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyBaseFragment.java:174-195 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:272-294 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:320-342 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:61— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/BasePhotoChoiceDialog.java:61-76 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/userinfo/FunContactBottomConfirmDialog.java:30-46 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/dialog/BaseTeamIdentifyDialog.java:41-57 — 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, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/ChatCustom.java:83— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/ChatCustom.java:83-101 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationUtils.java:93-111 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/common/ConversationUtils.java:89-107 — 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 (5 members, 17+ corresponding lines) · ×1
Edited copies of one member (5 members, 17+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:381— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:381-397 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:399-417 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:419-436 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:438-454 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:456-476 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:187— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchAdapter.java:187-206 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:183-201 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:523-539 — 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 copies of one member (4 members, 16+ corresponding lines) · ×1
Edited copies of one member (4 members, 16+ corresponding lines) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:36— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:36-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamListViewHolder.java:34-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/AIUserViewHolder.java:36-53 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/RobotViewHolder.java:37-57 — 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 (6 members, 16+ corresponding lines) · ×1
Edited copies of one member (6 members, 16+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:231— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:231-246 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:249-264 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:330-345 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:348-363 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:367-382 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:451-470 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 17+ corresponding lines) · ×1
Edited copies of one member (4 members, 17+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:302— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:302-318 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:321-338 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:341-359 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/TeamNotificationHelper.java:362-378 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIconActivity.java:251— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIconActivity.java:251-261 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateIntroduceActivity.java:148-157 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamUpdateNameActivity.java:170-181 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationActivity.java:21— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationActivity.java:21-32 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationActivity.java:22-32 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationActivity.java:22-41 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationActivity.java:22-32 — 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 (4 members, 9+ corresponding lines) · ×1
Edited copies of one member (4 members, 9+ corresponding lines) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:83— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/viewmodel/SelectorViewModel.java:83-91 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:692-702 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/viewmodel/SelectorViewModel.java:83-91 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:665-674 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 12+ corresponding lines) · ×1
Edited copies of one member (4 members, 12+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:205— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:205-216 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:218-229 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:288-299 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/factory/ChatPopActionFactory.java:386-397 — 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 (3 members, 7+ corresponding lines) · ×1
Edited copies of one member (3 members, 7+ corresponding lines) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:261— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamManagerListActivity.java:261-267 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberListActivity.java:168-175 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamMemberSelectActivity.java:112-120 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 4+ corresponding lines) · ×1
Edited copies of one member (6 members, 4+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:119— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:119-122 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:105-108 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:105-108 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:117-120 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:105-108 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:106-109 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 6+ corresponding lines) · ×1
Edited copies of one member (4 members, 6+ corresponding lines) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:34— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:34-39 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:33-38 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:33-38 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:33-38 — 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.
Duplicated block (84–85 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:173— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:173-256 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java:175-259 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 156 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (78 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:188— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:188-265 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:174-251 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 189 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:188` 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 (66 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:70— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:70-135 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java:67-132 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:70` it begins part-way through the construct above it, so those exact lines 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 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotCreateActivity.java:186— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotCreateActivity.java:186-241 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotEditActivity.java:144-199 — 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 (53 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:75— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:75-127 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:73-125 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 219 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.java:128` calls `initViewModel` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:130` 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 (54 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:48— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java:48-101 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java:48-101 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatCallMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatCallMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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 (51 lines × 2) app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/LanguageSelectActivity.java:135— app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/LanguageSelectActivity.java:135-185 | app/src/main/java/com/netease/yunxin/app/im/main/mine/setting/TranslationSettingActivity.java:104-154 — 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 (47 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:114— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java:114-160 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java:114-160 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunCalendarMonthAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/CalendarMonthAdapter.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (45–46 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:275— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:275-320 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:187-231 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:275` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:233` calls `setVisibility` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:320` 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 (46 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionRichTextViewHolder.java:39— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionRichTextViewHolder.java:39-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionRichTextViewHolder.java:39-84 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionRichTextViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionRichTextViewHolder.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 (41 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:185— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java:185-225 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java:189-229 — before extracting anything, compare `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/IndexBar.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/IndexBar.java` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 179 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (32–40 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:88— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:88-119 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java:94-125 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:120-159 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationBaseViewHolder.java:94-125 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationBaseViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:88` 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 (38 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:110— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:110-147 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:124-161 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:109-146 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:124-161 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java` as WHOLE FILES: this scan already matched 9 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java: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.
Duplicated block (28–38 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationP2PViewHolder.java:28— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationP2PViewHolder.java:28-55 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationP2PViewHolder.java:27-54 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationP2PViewHolder.java:39-76 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationP2PViewHolder.java:27-54 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationP2PViewHolder.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationP2PViewHolder.java` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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 (36–38 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java:41— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java:41-76 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionTextViewHolder.java:40-77 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionTextViewHolder.java` 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 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 (35–36 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:335— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:335-369 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:338-373 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 308 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:335` 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:69— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:69-103 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java:69-103 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunCreateTeamFactory.java:69-103 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/NormalCreateTeamFactory.java:69-103 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/NormalCreateTeamFactory.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunCreateTeamFactory.java:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (55 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/viewholder/FunSearchFriendViewHolder.java:36— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/viewholder/FunSearchFriendViewHolder.java:36-90 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/search/viewholder/FriendViewHolder.java:36-90 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/viewholder/FunSearchFriendViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/search/viewholder/FriendViewHolder.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (31–32 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:185— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:185-215 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:170-201 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 177 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java: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 (43–44 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:140— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:140-182 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:151-194 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (29–30 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:233— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:233-261 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:287-316 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:233` 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 `data` to `V2NIMConversationResult` in one and `V2NIMLocalConversationResult` 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–30 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:207— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:207-231 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:241-270 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:205` calls `getConversationUIConfig` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:238` 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 lines × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:65— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:65-93 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:103-131 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:65-93 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:103-131 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java` 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.
Duplicated block (27–28 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunConversationSelectorAdapter.java:37— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunConversationSelectorAdapter.java:37-64 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/ConversationSelectorAdapter.java:36-62 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunConversationSelectorAdapter.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/ConversationSelectorAdapter.java` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `holder` to `BaseSelectableViewHolder<FunForwardConversationSelectorViewHolderBinding>` in one and `BaseSelectableViewHolder<ForwardConversationSelectorViewHolderBinding>` 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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/adapter/FunConversationSelectorAdapter.java:65` calls `setCornerRadius`, `dp2px` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/adapter/ConversationSelectorAdapter.java: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 (25–26 lines × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:91— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:91-115 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:71-95 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:71-96 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:71-96 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:91` it begins part-way through the construct above it, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionRichTextViewHolder.java:52— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionRichTextViewHolder.java:52-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionRichTextViewHolder.java:52-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatRichTextPinViewHolder.java:51-76 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionRichTextViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionRichTextViewHolder.java` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (24–26 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:173— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:173-198 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:127-150 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java: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 (25–26 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:53— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:53-77 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/model/ChatMessageBean.java:298-323 — both copies are in the same file, so extract the 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 (22–26 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:27— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationHeaderViewHolder.java:27-48 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationHeaderViewHolder.java:36-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. 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: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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 (24–25 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:474— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:474-498 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:328-351 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java` as WHOLE FILES: this scan already matched 22 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:474` it begins part-way through the construct above it, so those exact lines 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–24 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:61— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:61-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java:80-103 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:61-81 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchImageActivity.java:76-99 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchImageActivity.java` 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. If that is what happened, the fix is to keep one copy and have the 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:59` calls `changeStatusBarColor` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.java:59` 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–24 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java:82— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java:82-85 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/search/FunSearchActivity.java:53-72 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:172-192 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:199-222 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatBotSubSessionActivity.java: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. 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 (22–23 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java:51-73 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatLocationPinViewHolder.java:54-75 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionLocationViewHolder.java:50-72 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatLocationPinViewHolder.java:53-75 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatLocationPinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatLocationPinViewHolder.java` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java:51` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:173— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:173-194 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:109-130 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:159-180 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:109-130 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java` as WHOLE FILES: this scan already matched 7 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:133` calls `setStroke`, `getColor`, `getContainer` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:197` 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–21 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:118— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:118-138 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionDetailBaseActivity.java:108-127 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionDetailBaseActivity.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionDetailBaseActivity.java: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. 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, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionDetailBaseActivity.java:127` calls `openForwardFile`, `getMessage`, `getMessageType` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:138` 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–21 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTeamViewHolder.java:26— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTeamViewHolder.java:26-39 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationTeamViewHolder.java:38-58 — 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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 × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:79— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:79-97 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java:79-98 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchByMemberBaseActivity.java:85-104 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchBaseActivity.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatSearchByMemberBaseActivity.java` 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. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatForwardBaseActivity.java:79` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:67— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:67-85 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:74-92 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:66-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:74-92 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java` as WHOLE FILES: this scan already matched 9 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:67` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:160— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:160-177 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:160-177 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:159-176 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:162-179 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java` as WHOLE FILES: this scan already matched 5 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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–18 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java:54— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java:54-70 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:70-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionTextViewHolder.java:55-72 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java:70-86 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionTextViewHolder.java` 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 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionTextViewHolder.java:54` it begins part-way through the construct above it, so those exact lines 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 × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTopViewHolder.java:26— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTopViewHolder.java:26-40 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTopViewHolder.java:28-42 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationTopViewHolder.java:39-56 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationTopViewHolder.java:28-42 — 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTopViewHolder.java:28` 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: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTopViewHolder.java:25` calls `getAiUser` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationTopViewHolder.java:25` 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 × 3) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:226— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:226-243 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:180-197 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:180-197 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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 (17 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:315— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:315-331 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java:191-207 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatAudioPinViewHolder.java:191-207 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatAudioMessageViewHolder.java:280-296 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionAudioViewHolder.java:190-206 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatAudioPinViewHolder.java:193-209 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionAudioViewHolder.java` 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatAudioMessageViewHolder.java:315` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `message` to `ChatMessageBean` in one and `CollectionBean` 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–17 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:49— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:49-64 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ConversationTopAdapter.java:56-72 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java:49-64 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/ConversationTopAdapter.java:56-72 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 34 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:49` 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: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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–27 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:57— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java:57-82 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java:60-86 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/FunChatMessageForwardConfirmDialog.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/ChatMessageForwardConfirmDialog.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (31–37 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:36— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java:36-66 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java:52-88 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/viewholder/FunConversationBaseViewHolder.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/viewholder/FunConversationBaseViewHolder.java` as WHOLE FILES: this scan already matched 4 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. Note first that the copies are not typed on the same thing: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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–16 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:105— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:105-120 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:87-100 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:115-130 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:87-100 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java: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. 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: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.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 (17–18 lines × 2) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:138— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:138-154 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java:166-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 `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/viewmodel/TeamSettingViewModel.java: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. 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 `data` to `V2NIMConversation` in one and `V2NIMLocalConversation` 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 × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:146— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java:146-160 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:141-155 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java:140-154 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.java:126-140 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatP2PFragment.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatP2PFragment.java` as WHOLE FILES: this scan already matched 9 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.
Duplicated block (12–15 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:158— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:158-169 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:138-149 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:177-191 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:138-149 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `AIUserBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.AIUserBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.AIUserBean` 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–15 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:66— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:66-75 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:71-85 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 205 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:66` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `FunViewHolderFactory` names `com.netease.yunxin.kit.conversationkit.local.ui.fun.FunViewHolderFactory` in one and `com.netease.yunxin.kit.conversationkit.ui.fun.FunViewHolderFactory` 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, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:63` calls `setConversationGroupBarFunStyle`, `setConversationGroupBarBackgroundColorRes` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:70` 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–14 lines × 11) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:85— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java:85-98 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamListViewHolder.java:55-68 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunTeamVerifyInfoViewHolder.java:153-166 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunVerifyInfoViewHolder.java:125-138 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java:82-95 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamListViewHolder.java:52-65 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/TeamVerifyInfoViewHolder.java:153-166 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/VerifyInfoViewHolder.java:122-135 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/AIUserViewHolder.java:56-69 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/BlackListViewHolder.java:61-74 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/RobotViewHolder.java:60-72 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/view/viewholder/FunContactViewHolder.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/view/viewholder/ContactViewHolder.java` 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 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 (13–14 lines × 4) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:223— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:223-235 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:177-189 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/page/FunLocalConversationFragment.java:261-274 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/page/LocalConversationFragment.java:177-189 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 114 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.java:176` calls `showRight2ImageView` and `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:222` 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–14 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:185— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java:185-198 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/CollectionViewModel.java:130-141 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatPinViewModel.java: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. 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–14 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/AIUserViewHolder.java:38— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/AIUserViewHolder.java:38-48 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/RobotViewHolder.java:39-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/view/viewholder/AIUserViewHolder.java:38` it does not close everything it opens, so those exact lines 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 × 8) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:60— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:60-72 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:108-120 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:40-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:88-100 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:40-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:89-101 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:40-52 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:89-101 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:139— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java:139-151 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionFileViewHolder.java:79-91 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java:98-110 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatFileMessageViewHolder.java:129-141 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionFileViewHolder.java:78-90 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatFilePinViewHolder.java:98-110 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatFileMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatFilePinViewHolder.java` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (12–13 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatP2PActivity.java:56— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatP2PActivity.java:56-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatTeamActivity.java:47-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatP2PActivity.java:56-68 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatTeamActivity.java:59-70 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatP2PActivity.java:56` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9–13 lines × 2) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:89— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:89-101 | common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java:166-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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/PhotoPicker.java: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 (11–13 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:216— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:216-226 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:519-531 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/AIUserSelectorViewModel.java:216` it does not close everything it opens, so those 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) teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:45— teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:45-56 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/normal/dialog/ImageChoiceDialog.java:29-41 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/fun/dialog/FunPhotoChoiceDialog.java:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:152— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:152-163 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:43-54 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java:43-54 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java` as WHOLE FILES: this scan already matched 4 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java: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.
Duplicated block (11 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatImageMessageViewHolder.java:45— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatImageMessageViewHolder.java:45-55 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionImageViewHolder.java:49-59 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatImagePinViewHolder.java:53-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatImageMessageViewHolder.java:46-56 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionImageViewHolder.java:48-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatImagePinViewHolder.java:53-63 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatImageMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatImageMessageViewHolder.java` 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. 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–11 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:158— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:158-168 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatTextPinViewHolder.java:49-58 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java:133-143 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatPinTextViewHolder.java:49-58 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 172 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java: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 (10–11 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:255— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:255-264 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:309-319 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:334-344 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:255` it does not close everything it opens, so those 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:805— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:805-814 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java:92-100 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java:92-100 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/ConversationCustom.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/LocalConversationCustom.java` as WHOLE FILES: this scan already matched 3 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:805` it does not close everything it opens, so those exact lines 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) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:92— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java:92-100 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchImageViewModel.java:118-127 — 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatSearchFileViewModel.java: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 (8–10 lines × 2) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:205— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:205-214 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:218-225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/adapter/ChatMessageAdapter.java:205` it begins part-way through the construct above it, so those exact lines 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–10 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:162— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:162-171 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:197-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. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/blacklist/BlackListViewModel.java:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–10 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:69— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:69-78 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseFragment.java:86-95 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyBaseFragment.java:89-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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/FriendVerifyBaseActivity.java:69` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 6) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:115— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java:115-123 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java:57-65 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatThumbPinViewHolder.java:64-72 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatThumbBaseViewHolder.java:108-116 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionThumbViewHolder.java:56-64 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatThumbPinViewHolder.java:64-72 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionThumbViewHolder.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 63 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatThumbBaseViewHolder.java: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 (7–9 lines × 5) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:51— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:51-57 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatForwardPinViewHolder.java:57-63 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:76-84 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java:51-57 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatForwardPinViewHolder.java:54-60 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionForwardViewHolder.java` 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatForwardMessageViewHolder.java:85` calls `isEmpty` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionForwardViewHolder.java:58` 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–9 lines × 4) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:266— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:266-273 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:289-297 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:321-328 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:346-354 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:266` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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–9 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:80— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:80-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:80-86 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:251-259 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8–9 lines × 3) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ConversationSelectorFragment.java:42— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ConversationSelectorFragment.java:42-49 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/FriendSelectorFragment.java:42-50 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/TeamSelectorFragment.java:42-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ConversationSelectorFragment.java:42` 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 × 8) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:78— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:78-85 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:126-133 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:58-65 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java:106-113 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:58-65 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyActivity.java:107-114 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:58-65 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/verify/FriendVerifyListFragment.java:107-114 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyFragment.java` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/verify/FunFriendVerifyActivity.java:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7–8 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java:135— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java:135-141 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotCreateActivity.java:141-148 — 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java: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, `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotCreateActivity.java:149` calls `finish` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/robot/BaseRobotBindActivity.java:142` 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 (4–8 lines × 3) app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:844— app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:844-847 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java:156-163 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java:157-164 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/PopItemFactory.java` as WHOLE FILES: this scan already matched 7 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 `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/PopItemFactory.java: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. Note first that the copies are not typed on the same thing: `R` names `com.netease.yunxin.kit.conversationkit.local.ui.R` in one and `com.netease.yunxin.kit.conversationkit.ui.R` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (7 lines × 5) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:266— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:266-272 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:289-295 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:321-327 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:346-352 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:411-417 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/verify/TeamVerifyViewModel.java:266` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (3–6 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:95— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:95-100 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:95-100 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:266-268 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:95` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:94` calls `getResources`, `getDisplayMetrics`, `setPadding` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:266` 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 (5 lines × 4) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:39— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:39-43 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatRichTextPinViewHolder.java:39-43 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java:40-44 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatRichTextPinViewHolder.java:39-43 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatRichTextMessageViewHolder.java` as WHOLE FILES: this scan already matched 4 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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatRichTextMessageViewHolder.java:39` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (4–5 lines × 3) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:90— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java:90-93 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java:88-92 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/ChatSearchImageAdapter.java:261-265 — before extracting anything, compare `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileAdapter.java` and `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java` as WHOLE FILES: this scan already matched 10 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 `chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileAdapter.java: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. 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 (91 lines × 2) conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:151— conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:151-241 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:134-224 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 243 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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: `ConversationBean` names `com.netease.yunxin.kit.conversationkit.local.ui.model.ConversationBean` in one and `com.netease.yunxin.kit.conversationkit.ui.model.ConversationBean` 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, `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:148` calls `applyConversationGroupConfig` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:131` 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 (76 lines × 2) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialogAdapter.java:1— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialogAdapter.java:1-76 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectedListAdapter.java:1-77 — before extracting anything, compare `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialogAdapter.java` and `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/ai/BaseAISelectedListAdapter.java` as WHOLE FILES: 96% 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 `contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/BaseSelectedDialogAdapter.java:1` it does not close everything it opens, so those 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 × 3) common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/AvatarColor.java:1— common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/AvatarColor.java:1-20 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/utils/ColorUtils.java:1-20 | teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/utils/ColorUtils.java:1-23 — 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 `common-ui/src/main/java/com/netease/yunxin/kit/common/ui/utils/AvatarColor.java:1` it does not close everything it opens, so those 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 × 7) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/BotSubSessionListAdapter.java:67— chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/adapter/BotSubSessionListAdapter.java:67-72 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ai/AIHelperView.java:175-180 | chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ai/AiTranslateLanguageDialog.java:62-67 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java:72-77 | conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/ConversationTopAdapter.java:80-84 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java:72-77 | localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/ConversationTopAdapter.java:80-85 — before extracting anything, compare `conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunConversationTopAdapter.java` and `localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/fun/FunConversationTopAdapter.java` 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: `ConversationTopViewHolder` names `com.netease.yunxin.kit.conversationkit.local.ui.normal.viewholder.ConversationTopViewHolder` in one and `com.netease.yunxin.kit.conversationkit.ui.normal.viewholder.ConversationTopViewHolder` 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 × 10) contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIFriendSelectorFragment.java:23— contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIFriendSelectorFragment.java:23-29 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/ai/FunAIUserSelectorFragment.java:22-28 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunConversationSelectorFragment.java:25-31 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunFriendSelectorFragment.java:26-32 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/fun/selector/forward/FunTeamSelectorFragment.java:26-32 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIFriendSelectorFragment.java:22-28 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/ai/AIUserSelectorFragment.java:22-28 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/ConversationSelectorFragment.java:26-32 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/FriendSelectorFragment.java:26-32 | contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/normal/selector/forward/TeamSelectorFragment.java:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 10 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 10 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.
Off the main sequence: :chatkit-ui — :chatkit-ui: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
Unfinished stub — returns a placeholder under a TODO marker chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/audio/ChatMessageAudioControl.java:262— `getSuffixPlayer` is a shipped method whose whole body returns a default value under a TODO/FIXME — a placeholder standing in for the implementation. Implement it or remove it.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImageView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/message/viewholder/ChatBaseMessageViewHolder.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/media/PhotoView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file app/src/main/java/com/netease/yunxin/app/im/main/MainActivity.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/selector/forward/ContactSelectorViewModel.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/viewmodel/ConversationViewModel.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropOverlayView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropImage.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/ConversationBaseFragment.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/page/viewmodel/ConversationViewModel.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/scaleimage/ScaleAttache.kt:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapUtils.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/ChatUtils.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file teamkit-ui/src/main/java/com/netease/yunxin/kit/teamkit/ui/activity/BaseTeamSettingActivity.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/CropWindowMoveHandler.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/ait/AitService.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/datepicker/CustomDatePicker.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/page/LocalConversationBaseFragment.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatTeamViewModel.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Orphaned file contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/contact/ContactViewModel.java:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
Duplicated predicate chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:185— `!TextUtils.equals(actionType, ActionConstants.POP_ACTION_PIN) && !TextUtils.equals(actionType, ActionConstants.POP_ACTION_RECALL)` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.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 conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:506— `!TextUtils.equals(oldGroup.getId(), newGroup.getId()) || oldGroup.getType() != newGroup.getType() || !TextUtils.equals(oldGroup.getName(), n…` appears character-identically in 2 files — conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java, conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationGroupBar.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 common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:90— `!TextUtils.isDigitsOnly(lhsFirst) && TextUtils.isDigitsOnly(rhsFirst)` appears character-identically in 2 files — common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java, contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java:269— `!TextUtils.isEmpty(mBinding.chatMessageInputEt.getText()) && hasFocus` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java:283— `!TextUtils.isEmpty(team.getServerExtension()) && team.getServerExtension().contains(IMKitConstant.TEAM_GROUP_TAG)` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatTeamFragment.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatTeamFragment.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java:151— `!TextUtils.isEmpty(title) && TextUtils.getTrimmedLength(title) > 0` appears character-identically in 4 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/FunChatView.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/MessageBottomLayout.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/ChatView.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/MessageBottomLayout.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java:59— `!TextUtils.isEmpty(url) && binding.locationItemMapView.getContext() != null` appears character-identically in 4 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/collection/FunCollectionLocationViewHolder.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/viewholder/pin/FunChatLocationPinViewHolder.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/collection/CollectionLocationViewHolder.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/viewholder/pin/ChatLocationPinViewHolder.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java:66— `!allowAISearch || !member.isAISearchable() || (!match(member, this.query, member.getShowName(), HitType.UserName) && !match(member, this.que…` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/adapter/FunAitContactAdapter.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/adapter/NormalAitContactAdapter.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java:93— `!chatView.getMessageListView().hasMoreNewerMessages() && chatView.getMessageListView().isLastItemVisible()` appears character-identically in 4 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatBotSubSessionChatFragment.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/ChatBotSubSessionChatFragment.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.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 common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java:236— `!completeCalled && result.bitmap != null` appears character-identically in 2 files — common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapCroppingWorkerTask.java, common-ui/src/main/java/com/netease/yunxin/kit/common/ui/photo/crop/BitmapLoadingWorkerTask.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java:145— `!empty && !searchFileViewModel.hasMore()` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/FunChatSearchFileActivity.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchFileActivity.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:90— `!fromBotSubSession && !UserAIBotManager.isUserAIBot(accId) && IMKitConfigCenter.getEnableTeam()` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:216— `!fromBotSubSession && IMKitConfigCenter.getEnableAIUser()` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java:120— `!fromBotSubSession && IMKitConfigCenter.getEnablePinMessage()` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatSettingActivity.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/ChatSettingActivity.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java:146— `!hasMoreNewer && chatView.getMessageListView().isLastItemVisible()` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/fragment/FunChatFragment.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/page/fragment/NormalChatFragment.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java:216— `!isChatMsg() || !IMKitConfigCenter.getEnableAtMessage()` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/ChatTextMessageViewHolder.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/ChatTextMessageViewHolder.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 common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java:80— `!lhs.getIndexTag().equals("#") && rhs.getIndexTag().equals("#")` appears character-identically in 2 files — common-ui/src/main/java/com/netease/yunxin/kit/common/ui/widgets/indexbar/helper/IndexBarDataHelperImpl.java, contactkit-ui/src/main/java/com/netease/yunxin/kit/contactkit/ui/indexbar/helper/IndexBarDataHelperImpl.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java:76— `!showReceiveUIStyle() && uiOptions.commonUIOption.messageContentLayoutGravity == null` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/view/message/viewholder/FunChatBaseMessageViewHolder.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/view/message/viewholder/NormalChatBaseMessageViewHolder.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:40— `(current.get(Calendar.YEAR) == target.get(Calendar.YEAR)) && (current.get(Calendar.MONTH) == target.get(Calendar.MONTH))` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java:30— `(date.after(weekStart.getTime()) && date.before(weekEnd.getTime())) || date.equals(weekStart.getTime()) || date.equals(weekEnd.getTime())` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/search/ChatSearchDateUtils.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/search/ChatSearchDateUtils.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:69— `ChatKitClient.getChatUIConfig() != null && ChatKitClient.getChatUIConfig().chatInputMenu != null` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/normal/factory/BottomActionFactory.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 chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java:168— `ChatMessageAudioControl.getInstance().isPlayingAudio() && TextUtils.equals( result.getData(), ChatMessageAudioControl.getInstance() .getPlay…` appears character-identically in 2 files — chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/ChatPinBaseActivity.java, chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/CollectionBaseActivity.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 conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTeamViewHolder.java:31— `ConversationHelper.hasAit(data.infoData.getConversationId()) && data.infoData.getUnreadCount() > 0` appears character-identically in 2 files — conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/viewholder/ConversationTeamViewHolder.java, localconversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/local/ui/normal/viewholder/ConversationTeamViewHolder.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 conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:143— `ConversationKitClient.getConversationUIConfig() != null && ConversationKitClient.getConversationUIConfig().titleBarRight2Click != null` appears character-identically in 2 files — conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java, conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.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 conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java:77— `ConversationKitClient.getConversationUIConfig() != null && ConversationKitClient.getConversationUIConfig().titleBarRightClick != null` appears character-identically in 2 files — conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/page/FunConversationFragment.java, conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/normal/page/ConversationFragment.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.
+ 15 more in this group — see findings.md.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×5
Projects may be oversized for their cohesion chatkit-ui/build.gradle.kts:1— `chatkit-ui` (58685 LoC, 372 module-visible types across 57 directories) overshoots its size bounds. 5 of 10 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.8/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 contactkit-ui/build.gradle.kts:1— `contactkit-ui` (19398 LoC, 240 module-visible types across 60 directories) overshoots its size bounds. 5 of 10 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.8/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 common-ui/build.gradle.kts:1— `common-ui` (13694 LoC, 153 module-visible types across 20 directories) overshoots its size bounds. 5 of 10 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.8/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 conversationkit-ui/build.gradle.kts:1— `conversationkit-ui` (9531 LoC, 71 module-visible types across 15 directories) overshoots its size bounds. 5 of 10 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.8/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 teamkit-ui/build.gradle.kts:1— `teamkit-ui` (7521 LoC, 58 module-visible types across 14 directories) overshoots its size bounds. 5 of 10 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 0.8/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: IChatView (49 abstract methods) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/interfaces/IChatView.java:23— `IChatView` declares 49 abstract methods: `addMessageListForward`, `addTopView`, `appendMessage`, `appendMessageList`, `appendMessageList`, `clearMessageList`, `clearReplyMessage`, `deleteMessage`, `deleteMessages`, `getChatBodyBottomLayout`, `getChatBodyTopLayout`, `getMessageList`, `getMessageListView`, `getRootView`, `getTitleBar`, `hideCurrentInput`, `hideRichInputPanel`, `isMultiSelect`, `notifyUserInfoChanged`, `revokeMessage`, `searchMessagePosition`, `searchMessagePositionByTime`, `setAitManager`, `setChatConfig`, `setInputMute`, `setItemClickListener`, `setLayoutCustom`, `setLoadHandler`, `setMessageBackground`, `setMessageBackgroundRes`, `setMessageProxy`, `setMessageReader`, `setMessageViewHolderFactory`, `setMultiSelectEnable`, `setNetWorkState`, `setReeditMessage`, `setReeditRichMessage`, `setReplyMessage`, `setTitleBarVisible`, `setTypeState`, and 9 more. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 49 declarations carry 46 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 46 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: IMessageData (21 abstract methods) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/interfaces/IMessageData.java:14— `IMessageData` declares 21 abstract methods: `addMessageListForward`, `addPinMessage`, `appendMessage`, `appendMessageList`, `appendMessageList`, `clearMessageList`, `deleteMessage`, `deleteMessage`, `hasMoreForwardMessages`, `hasMoreNewerMessages`, `removePinMessage`, `revokeMessage`, `setHasMoreForwardMessages`, `setHasMoreNewerMessages`, `setMessageMode`, `setMultiSelect`, `updateMessage`, `updateMessage`, `updateMessage`, `updateMessageStatus`, `updateMultiSelectMessage`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants are not counted, because no implementer is forced to write them. Those 21 declarations carry 17 distinct name(s), so part of the width is overloading rather than separate responsibilities — but 17 operations clears the >15 bar on its own, so the row is about responsibilities, not signatures. 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: IMessageProxy (21 abstract methods) chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/interfaces/IMessageProxy.java:14— `IMessageProxy` declares 21 abstract methods: `audioCall`, `captureVideo`, `getConversationId`, `getConversationType`, `hasPermission`, `onAIHelperClick`, `onActionClick`, `onCustomAction`, `onMultiActionClick`, `onTranslateAction`, `onTypeStateChange`, `pickMedia`, `sendAudio`, `sendCustomMessage`, `sendFile`, `sendImageMessage`, `sendLocationLaunch`, `sendRichTextMessage`, `sendTextMessage`, `takePicture`, `videoCall`. Counted over its ABSTRACT methods, once per signature; `default`, `static` and `private` methods and constants 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.
D34 · Knowledge Freshness· Most significant orphaned file · ×3
Most significant orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/fragment/ChatBaseFragment.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/page/viewmodel/ChatBaseViewModel.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
Most significant orphaned file chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1— One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D21 · Naming Consistency· `getContentDataID` spells `ID` where 51 names in the project spell it `Id` · ×2
`getContentDataID` spells `ID` where 51 names in the project spell it `Id` conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationAdapter.java:205— 51 of 53 names in project conversationkit-ui spell the token `Id` (51 of 53; unit: names in project conversationkit-ui containing `Id`). Peers: ConversationGroupLocalConfigHelper.removeConfig(groupId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationGroupLocalConfigHelper.java:117); ConversationHelper.updateAitInfo(sessionIdList) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:23); ConversationHelper.hasAit(sessionId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:37); FunPopItemFactory.getView(txtId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:146); FunPopItemFactory.getView(drawableId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:146). Rename to `getContentDataId`. [rule N6]
`getContentDataID` spells `ID` where 51 names in the project spell it `Id` conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/view/ConversationView.java:238— 51 of 53 names in project conversationkit-ui spell the token `Id` (51 of 53; unit: names in project conversationkit-ui containing `Id`). Peers: ConversationGroupLocalConfigHelper.removeConfig(groupId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationGroupLocalConfigHelper.java:117); ConversationHelper.updateAitInfo(sessionIdList) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:23); ConversationHelper.hasAit(sessionId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationHelper.java:37); FunPopItemFactory.getView(txtId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:146); FunPopItemFactory.getView(drawableId) (conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/fun/FunPopItemFactory.java:146). Rename to `getContentDataId`. [rule N6]
Silent fallback default in catch chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/view/emoji/AssetsStickerProvider.java:86— `loadPacks` swallows every exception into `return new ArrayList<>()` — 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 Javadoc, and the row stops firing.
Silent fallback default in catch conversationkit-ui/src/main/java/com/netease/yunxin/kit/conversationkit/ui/common/ConversationGroupLocalConfigHelper.java:70— `getConfigList` swallows every exception into `return new ArrayList<>()` — 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 Javadoc, and the row stops firing.
Documentation: no build, run or usage example README.md:1— the repository holds project manifests and neither `README.md` nor the documents it links hold a code block or a command. Show the command that builds or runs it, or a usage snippet.
No ADRs found app/build.gradle.kts:7— No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `app/build.gradle.kts` makes this repository a deployable product (line 7).
D21 · Naming Consistency· `isReceivedMessageFromAi` spells `Ai` where 55 names in the project spell it `AI` · ×1
`isReceivedMessageFromAi` spells `Ai` where 55 names in the project spell it `AI` chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:746— 55 of 56 names in project chatkit-ui spell the token `AI` (55 of 56; unit: names in project chatkit-ui containing `AI`). Peers: IChatInputMenu.onAIHelperClick (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/IChatInputMenu.java:80); MessageHelper.getAIContentMsg (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1632); MessageHelper.isAIResponseMessage (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1891); FunBottomActionFactory.assembleInputMoreActions(isAIBot) (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/factory/FunBottomActionFactory.java:19); com.netease.yunxin.kit.chatkit.ui.fun.page.FunChatAIActivity (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/fun/page/FunChatAIActivity.java:8). Rename to `isReceivedMessageFromAI`. [rule N6]
D21 · Naming Consistency· `fromSessionID` spells `ID` where 203 names in the project spell it `Id` · ×1
`fromSessionID` spells `ID` where 203 names in the project spell it `Id` chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1320— 203 of 204 names in project chatkit-ui spell the token `Id` (203 of 204; unit: names in project chatkit-ui containing `Id`). Peers: IChatListener.onConversationChange(conversationId) (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/IChatListener.java:17); TeamUserManager.init(teamId) (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:76); TeamUserManager.getTeamMemberWithRoleListFromCache(teamId) (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:466); TeamUserManager.getAvatar(accId) (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:700); 1.onTeamMemberKicked(operatorAccountId) (chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/cache/TeamUserManager.java:739). Rename to `fromSessionId`. [rule N6]
D28 · Secrets (history)· Rotate the exposed credentials · ×1
Concentrated knowledge decay — 418 of 519 significant files have no living knowledge, while the repository is still being changed at a low rate (18 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 418 separate risks. Counted over 519 of the 901 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
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.
M2 · Architecture documentation· No architecture diagram/doc · ×1
No architecture diagram/doc — No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 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.
No dependency-update automation aisearchkit/build.gradle.kts:34— `aisearchkit/build.gradle.kts` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
X5 · Nullable reference types· Java packages are not null-marked everywhere · ×1
Java packages are not null-marked everywhere — 0/186 of this repository's Java package directories are under a non-null default: a `package-info.java` declaring `@NullMarked` (JSpecify) or `@NonNullApi`, `@ParametersAreNonnullByDefault`, `@NonNullByDefault`, `@DefaultQualifier(NonNull.class)`; a `module-info.java` declaring `@NullMarked`; every type in it `@NullMarked`; or a build that runs NullAway with the package in `AnnotatedPackages`, or the Checker Framework's `NullnessChecker`. Elsewhere every reference admits null and no checker warns on the dereference that throws a `NullPointerException`.
Hand-rolled JSON/XML parsing via regex chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageHelper.java:1920— 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.
Silent fallback default on parse failure chatkit-ui/src/main/java/com/netease/yunxin/kit/chatkit/ui/common/MessageOperateUtils.java:652— `parseMediaInt` returns `0` when `NumberFormatException` is thrown, with no log or throw — a malformed value silently becomes that default. Log the input or fail validation. 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 Javadoc, and the row stops firing.
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.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
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.
provenance: not applicable — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
none (dependency manifest found, not scanned for vulnerabilities here)
—
none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Gradle build (build.gradle/build.gradle.kts) — not scanned yet).
0
—
Run 01a1e599-d926-7f81-8ecd-fbf422944ffb · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 1 · Warnings: 1529 · Recommendations: 483 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 18:23 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.