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

KazumaProject/JapaneseKeyboard

Measured 17 November 2026, 22:13 UTC, at code version 53a349f

First survey, so nothing to compare with yet
CAI score 50.3out of 100 Adequate
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: 219,222 lines of product code in 16 projects, tests not counted · Estimated rebuild effort: about 2.4 person-years · Weakest lens: Production Readiness, 43.0

Findings by how serious they are

848 critical 1714 serious 81 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
17 November 2026, 22:13 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 ▸

60of 60 dimensions measured by tools.
2628of 2643 findings point to an exact file and line, so you can open each one in the code. The other 15 concern the repository as a whole, such as missing documentation.
60dimensions across 7 lenses, read from 219,222 lines of product code in 16 projects.
Chapters

Executive summary

KazumaProject/JapaneseKeyboard falls short of our standard for production, in part because we found no automated security scanning of the code, its secrets or its dependencies. It scores 50.3 out of 100 and is rated Adequate, and 842 of its 848 critical findings are security problems.

Production Readiness, at 43.0, is the weakest lens and counts most in the score. The best first step is adding automated security scanning, worth about 5.3 points. Adding a diagnostic log comes next, worth about 4.8 points. Raising Production Readiness to 70 would lift the score to about 56.0.

610 passwords or keys in the code's history and 154 in the code are open to anyone who can read the repository. Seventy-three pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and five secrets can leak from the build pipeline. Replacing each exposed password or key, pinning each tool to an exact version and limiting each secret to its own step would close these risks. The six sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 219,222 lines, about €350,000 to rebuild. The check for the health of its packages couldn't finish, so that result is missing, not a clean pass.

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

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

If Production Readiness rose from 43.0 to 70, the lowest score rated Strong, the score would rise from 50.3 to about 56.0.

Code composition: what the lines of code are
Product code 67%Tests 33%
Rebuild cost: about €350,000 · Estimate
Cost to rebuild€120,000 to €590,000, for 1,946 to 6,174 hours of work, about 2.4 person-years for 1 to 5 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 50. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 219,222 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Raises the score by about 5.3 points · Medium effort · Security & performance tooling
2
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 4.8 points · Medium effort · Observability
3
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.
Raises the score by about 1.8 points · Low effort · ADR Quality

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 €350,000 to build again, about 2.4 person-years of work. Its weakest lens is Production Readiness, at 43.0 (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.
One cause behind 32 Domain Modelling findings · Common cause
32 findings in the Domain Modelling lens come from the same cause. The code models the business as objects, such as an order or a customer, and each object should guard its own rules: an order, for example, should refuse to be shipped before it has been paid. Here the objects don't do that. Some objects only hold data, while the rules that should keep that data valid sit elsewhere in the code. Identifiers, such as order numbers and customer numbers, are passed around as plain numbers or text, so nothing stops the code from using one kind where another belongs. Because all of these findings have the same cause, fixing it once, in the business objects themselves, deals with them together.
Based on: Rich vs anemic model (17 findings) · Strongly-typed ids (15 findings)
What to do: Give each business object the methods that enforce its rules, such as a method for shipping an order that first checks it has been paid, and let only those methods change its data. Give each kind of identifier a type of its own, so an order number can't be used where a customer number belongs.
If you do one thing first · First action
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing. Of all the actions in this report, it raises the score most for the work it takes: about 5.3 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.3 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 15% on every change. The history of the code shows how much it changes: about 648,393 lines over the last 90 days, which is about 2,629,594 lines a year. At that pace, the extra work comes to an estimated 448.5 to 2690.7 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch MarkdownHelperKeyboard MarkdownHelperKeyboard MarkdownHelperKeyboard:ai-runtime MarkdownHelperKeyboard:ai-runtime MarkdownHelperKeyboard:app MarkdownHelperKeyboard:app MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:ai-runtime MarkdownHelperKeyboard:core MarkdownHelperKeyboard:core MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:core MarkdownHelperKeyboard:custom_keyboard MarkdownHelperKeyboard:custom_keyboard MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:custom_keyboard MarkdownHelperKeyboard:flexbox MarkdownHelperKeyboard:flexbox MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:flexbox MarkdownHelperKeyboard:gojuon_keyboard MarkdownHelperKeyboard:gojuon_keyboard MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:gojuon_keyboard MarkdownHelperKeyboard:morse_keyboard MarkdownHelperKeyboard:morse_keyboard MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:morse_keyboard MarkdownHelperKeyboard:qwerty_keyboard MarkdownHelperKeyboard:qwerty_keyboard MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:qwerty_keyboard MarkdownHelperKeyboard:symbol_keyboard MarkdownHelperKeyboard:symbol_keyboard MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:symbol_keyboard MarkdownHelperKeyboard:tenkey MarkdownHelperKeyboard:tenkey MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:tenkey MarkdownHelperKeyboard:zenz MarkdownHelperKeyboard:zenz MarkdownHelperKeyboard:app->MarkdownHelperKeyboard:zenz MarkdownHelperKeyboard:custom_keyboard->MarkdownHelperKeyboard:core MarkdownHelperKeyboard:enter-parity-lab MarkdownHelperKeyboard:enter-parity-lab MarkdownHelperKeyboard:gojuon_keyboard->MarkdownHelperKeyboard:core MarkdownHelperKeyboard:morse_keyboard->MarkdownHelperKeyboard:core MarkdownHelperKeyboard:qwerty_keyboard->MarkdownHelperKeyboard:core MarkdownHelperKeyboard:symbol_keyboard->MarkdownHelperKeyboard:core MarkdownHelperKeyboard:tenkey->MarkdownHelperKeyboard:core PR984SoraProbe PR984SoraProbe keyboard_ai keyboard_ai zenz zenz

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.

888 modules, with 1400 dependencies between them. 23 loops run through 139 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 848 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.
uses →1 core.domain.skin2 core.domain.state3 core.ui.font4 markdownhelperkeyboard.converter.bitset5 markdownhelperkeyboard.gemma.database6 markdownhelperkeyboard.ime_service.image_effect7 markdownhelperkeyboard.ime_service.state8 markdownhelperkeyboard.short_cut9 core.domain.flick10 core.ui.skin11 markdownhelperkeyboard.converter.compact12 markdownhelperkeyboard.converter.utility13 markdownhelperkeyboard.database14 markdownhelperkeyboard.gemma15 custom_keyboard.view16 gojuon_keyboard17 markdownhelperkeyboard.dictionary_override18 markdownhelperkeyboard.ime_service.composing_guide19 qwerty_keyboard.ui20 tenkey21 custom_keyboard.data22 graph23 markdownhelperkeyboard.converter.candidate24 markdownhelperkeyboard.ime_service.split_keyboard25 custom_keyboard.controller26 markdownhelperkeyboard.converter.path_algorithm27 markdownhelperkeyboard.custom_keyboard.data28 markdownhelperkeyboard.custom_keyboard.ui.placement29 markdownhelperkeyboard.ime_service.adapters30 markdownhelperkeyboard.repository31 markdownhelperkeyboard.converter.graph32 markdownhelperkeyboard.ime_service.IMEService33 markdownhelperkeyboard.converter.engine34 markdownhelperkeyboard.ime_service35 markdownhelperkeyboard.keyboard_presentation36 markdownhelperkeyboard.setting_activity.ui.setting37 markdownhelperkeyboard.setting_activity38 markdownhelperkeyboard.custom_keyboard.ui39 markdownhelperkeyboard.ime_service.di40 markdownhelperkeyboard.setting_activity.ui.candidate_view_height_setting
1 core.domain.skin
2 core.domain.state
3 core.ui.font
4 markdownhelperkeyboard.converter.bitset
5 markdownhelperkeyboard.gemma.database
6 markdownhelperkeyboard.ime_service.image_effect
7 markdownhelperkeyboard.ime_service.state
8 markdownhelperkeyboard.short_cut
9 core.domain.flick1
10 core.ui.skin72
11 markdownhelperkeyboard.converter.compact2
12 markdownhelperkeyboard.converter.utility1
13 markdownhelperkeyboard.database1
14 markdownhelperkeyboard.gemma51
15 custom_keyboard.view6191033511
16 gojuon_keyboard13234
17 markdownhelperkeyboard.dictionary_override13
18 markdownhelperkeyboard.ime_service.composing_guide71
19 qwerty_keyboard.ui22612
20 tenkey14264
21 custom_keyboard.data113
22 graph1
23 markdownhelperkeyboard.converter.candidate11
24 markdownhelperkeyboard.ime_service.split_keyboard111121
25 custom_keyboard.controller11921933
26 markdownhelperkeyboard.converter.path_algorithm164
27 markdownhelperkeyboard.custom_keyboard.data510
28 markdownhelperkeyboard.custom_keyboard.ui.placement8
29 markdownhelperkeyboard.ime_service.adapters13241141
30 markdownhelperkeyboard.repository3174210
31 markdownhelperkeyboard.converter.graph11121
32 markdownhelperkeyboard.ime_service.IMEService42111116214
33 markdownhelperkeyboard.converter.engine35110122
34 markdownhelperkeyboard.ime_service2112151125312156119143241534411
35 markdownhelperkeyboard.keyboard_presentation5261111141321
36 markdownhelperkeyboard.setting_activity.ui.setting55102328
37 markdownhelperkeyboard.setting_activity1415311
38 markdownhelperkeyboard.custom_keyboard.ui33351841
39 markdownhelperkeyboard.ime_service.di1112431
40 markdownhelperkeyboard.setting_activity.ui.candidate_view_height_setting112111121133
Uses a module listed above itPart of a loopThe module itself
1 core.domain.skin2 core.domain.state3 core.ui.font4 markdownhelperkeyboard.converter.bitset5 markdownhelperkeyboard.gemma.database6 markdownhelperkeyboard.ime_service.image_effect7 markdownhelperkeyboard.ime_service.state8 markdownhelperkeyboard.short_cut9 core.domain.flick10 core.ui.skin11 markdownhelperkeyboard.converter.compact12 markdownhelperkeyboard.converter.utility13 markdownhelperkeyboard.database14 markdownhelperkeyboard.gemma15 custom_keyboard.view16 gojuon_keyboard17 markdownhelperkeyboard.dictionary_override18 markdownhelperkeyboard.ime_service.composing_guide19 qwerty_keyboard.ui20 tenkey21 custom_keyboard.data22 graph23 markdownhelperkeyboard.converter.candidate24 markdownhelperkeyboard.ime_service.split_keyboard25 custom_keyboard.controller26 markdownhelperkeyboard.converter.path_algorithm27 markdownhelperkeyboard.custom_keyboard.data28 markdownhelperkeyboard.custom_keyboard.ui.placement29 markdownhelperkeyboard.ime_service.adapters30 markdownhelperkeyboard.repository31 markdownhelperkeyboard.converter.graph32 markdownhelperkeyboard.ime_service.IMEService33 markdownhelperkeyboard.converter.engine34 markdownhelperkeyboard.ime_service35 markdownhelperkeyboard.keyboard_presentation36 markdownhelperkeyboard.setting_activity.ui.setting37 markdownhelperkeyboard.setting_activity38 markdownhelperkeyboard.custom_keyboard.ui39 markdownhelperkeyboard.ime_service.di40 markdownhelperkeyboard.setting_activity.ui.candidate_view_height_settingcore.domain.skin1core.domain.state2core.ui.font3markdownhelperkeyboard.converter.bitset4markdownhelperkeyboard.gemma.database5markdownhelperkeyboard.ime_service.image_effect6markdownhelperkeyboard.ime_service.state7markdownhelperkeyboard.short_cut8core.domain.flick9core.ui.skin10markdownhelperkeyboard.converter.compact11markdownhelperkeyboard.converter.utility12markdownhelperkeyboard.database13markdownhelperkeyboard.gemma14custom_keyboard.view15gojuon_keyboard16markdownhelperkeyboard.dictionary_override17markdownhelperkeyboard.ime_service.composing_guide18qwerty_keyboard.ui19tenkey20custom_keyboard.data21graph22markdownhelperkeyboard.converter.candidate23markdownhelperkeyboard.ime_service.split_keyboard24custom_keyboard.controller25markdownhelperkeyboard.converter.path_algorithm26markdownhelperkeyboard.custom_keyboard.data27markdownhelperkeyboard.custom_keyboard.ui.placement28markdownhelperkeyboard.ime_service.adapters29markdownhelperkeyboard.repository30markdownhelperkeyboard.converter.graph31markdownhelperkeyboard.ime_service.IMEService32markdownhelperkeyboard.converter.engine33markdownhelperkeyboard.ime_service34markdownhelperkeyboard.keyboard_presentation35markdownhelperkeyboard.setting_activity.ui.setting36markdownhelperkeyboard.setting_activity37markdownhelperkeyboard.custom_keyboard.ui38markdownhelperkeyboard.ime_service.di39markdownhelperkeyboard.setting_activity.ui.candidate_view_height_setting40172211516191033511132341371226121426411311111112111921933164510813241141317421011121421111162143511012221121511253121561191432415344115261111141321551023281415311333518411112431112111121133+848 more modules (most-connected shown)

At a glance — Code Health · 74.5 · Adequate · gated by D2, D4 ·

At a glance — Architecture · 80.1 · Strong ·

At a glance — Maturity · 56.2 · Adequate · gated by M2 ·

At a glance — Readiness · 43.0 · Weak · gated by P2, P3 ·

At a glance — Security · 51.2 · Adequate · gated by D28, D29, D36 ·

At a glance — Domain Modelling · 53.1 · Adequate · gated by DM2, DM4, DM11 ·

At a glance — Performance · 100.0 · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A07:2025 — Authentication Failures765High / Critical
A05:2025 — Injection84High / Critical
A03:2025 — Software Supply Chain Failures6Medium

Roadmap

Top priorities: Resolve the 154 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (154); Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing; Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.

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

Do thisHelpsEffortDimension
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.3 ptsMediumSecurity & performance tooling
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.+4.8 ptsMediumObservability
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with build.gradle.+1.8 ptsLowADR Quality
Resolve the 154 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (154).+5.5 ptsHighREDACTED Scanning
Resolve the 1 `KeyTOJapanese` spells `TO` where 22 names in the project spell it `To` finding(s) in Naming Consistency — start with KeyInfo.kt.+1.2 ptsLowNaming Consistency
Resolve the 1 `KeyTO` spells `TO` where 22 names in the project spell it `To` finding(s) in Naming Consistency — start with Key.kt.+1.2 ptsLowNaming Consistency
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.+1.7 ptsMediumArchitecture documentation
Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2).+0.8 ptsLowStatic Analysis (SAST)

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopREDACTED Scanning: Leaked secret: REDACTED
REDACTED1.3SlopStatic Analysis (SAST): High: REDACTED
app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt2.9SlopChange Coupling: Boundary-crossing change coupling: DataConverterExtensions.kt ↔ KeyActionMapper.kt
app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt3.5SlopChange Coupling: Boundary-crossing change coupling: IMEService.kt ↔ PopupWindowExtension.kt
app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt4.3MixedChange Coupling: Boundary-crossing change coupling: AppPreference.kt ↔ CustomAngleFlickController.kt
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedSecrets (history): REDACTED: REDACTED
REDACTED4.8MixedSecrets (history): REDACTED: REDACTED
REDACTED4.8MixedSecrets (history): REDACTED: REDACTED
app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt4.9MixedCyclomatic Complexity: ExtenstionsKt.addingStringToListForCommonPrefix (cyclomatic 28)
app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt5.0MixedChange Coupling: Boundary-crossing change coupling: KeyboardRepository.kt ↔ KeyActionMapper.kt
REDACTED5.1MixedSecrets (history): REDACTED: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt5.1MixedCode Duplication: Edited copies of one member (4 members, 18+ corresponding lines)

How the grades work

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

Critical — 848

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 — 1714

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 — 81

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

Could not be resolved — 14

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 60 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 — 60 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D16D17D19D20D21D26D27D28D29D34D35D36D37D44AX10AX2AX3AX4AX6DM10DM11DM12DM2DM4DM5DM6DM9M1M2M3M4P1P2P3P4P6PF3X1X12X15X16X18X21X23X25X27X28X29X3X30X5

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1eb92-5e6f-743d-b976-7710c7b42336.

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

Run transparency — what happened this run

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

  • 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: this repository's production source spans .py, .kt, and our analyzer cannot run the .kt test suite(s) — so no coverage was collected for the repository as a whole. The Python half did build and run, and its own line coverage came back at 74.4% — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — coverage is excluded from the score rather than counted as a near-zero.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.kt) and this repository declares a JVM test suite (repository root, Gradle), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's dependency manifests WERE read and their pinning discipline assessed; what went unanswered is the currency half, because api.foojay.io — the registry that answers it — was asked and did not reply (the build stopped because api.foojay.io, a repository this project declares, refused it with HTTP 403 — what this scan's egress allowlist returns for a host that is not on it, so the dependency graph was not resolved). This is OUR side and it is an ENVIRONMENT fault, not a missing collector: the collector exists and ran. An HTTP 403 here is what this scan's egress allowlist returns for a host that is not on it, so the remedy is to add api.foojay.io to the allowlist and re-run — not to build anything.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (zenz/build.gradle), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • 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.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactEnglishDictionary.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/RuntimeGrammarRoles.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt`, … (+50 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • 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: requirements ({languageVersion=25, vendor=JetBrains, implementation=vendor-specific, nativeImageCapable=false}) from 'https://api.foojay.io/disco/v3.0/ids/50dff0498c7a09126e3b7e7f2749f324/redirect', d…; runtime evidence skipped (launch chosen because app/build.gradle applies the Android application plugin and gradlew builds it).
  • C2 Access Controls — not measured this run — 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.
  • DM8 Value-object opportunities — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The frontend declares that it computes whether a construction is produced or passed, yet 6629 of 6776 constructions arrived without the answer. Arm two skipped them; it did not clear them.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java source only, and this repository's Kotlin, Python, c, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby, Scala and Rust source only, and this repository's Kotlin, Python, c, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • 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. 54 further occurrence(s) are not listed individually; the score already reflects all 94.
  • 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.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.

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.
  • 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.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity4.4 / 10Weak✓ Tool-verified

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

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

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

207 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was IMEService.configureFlickKeyboardView at 446. A further 53 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 CharExtensionKt.getNextReturnInputChar at 140 — they are counted neither in the figure above nor in this dimension's score. 20 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingDestination.kt (SettingDestinations.routeDestinationId at 82), app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingFilters.kt (FrequentSettingFilters.categoryOf at 61), app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt (DataConverterExtensionsKt.toFlickAction at 57), custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyActionMapper.kt (KeyActionMapper.fromKeyAction at 57), gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/AppCompatButton.kt (AppCompatButtonKt.setGojuonKeyTextJapanese at 56), and 15 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

IMEService.configureFlickKeyboardView (cyclomatic 446)app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15731
CharExtensionKt.getNextInputChar (cyclomatic 279)tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:3
GraphBuilder.constructGraph (cyclomatic 130)app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:322
GojuonKeyboardView.onTouchLegacy (cyclomatic 130)gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1109
IMEService.setCurrentInputType (cyclomatic 129)app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23178

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

What to do

  1. Bring the 2 bodies over 240 down to 240 or less in Cyclomatic Complexity — start with IMEService.configureFlickKeyboardView (cyclomatic 446), CharExtensionKt.getNextInputChar (cyclomatic 279). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 4.4 to about 5.1/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

D2 · Cognitive Complexity3.0 / 10Weak✓ Tool-verified

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

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

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

323 method(s) exceeded the cognitive complexity threshold of 15; the worst was IMEService.configureFlickKeyboardView at 354.

LOUDSWithTermId.search (cognitive 17) · ×2app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:610
KeyboardFontApplicator.apply (cognitive 17) · ×2core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:53
IMEService.configureFlickKeyboardView (cognitive 354)app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15731
GraphBuilder.constructGraph (cognitive 326)app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:322
GojuonKeyboardView.onTouchLegacy (cognitive 321)gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1109

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

What to do

  1. Bring the 3 bodies over 240 down to 240 or less in Cognitive Complexity — start with IMEService.configureFlickKeyboardView (cognitive 354), GraphBuilder.constructGraph (cognitive 326), GojuonKeyboardView.onTouchLegacy (cognitive 321). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 3.0 to about 3.7/10, projected with the scoring formula itself and assuming each lands exactly at 240; a cleaner split scores higher.

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

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

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

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

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

197 god class(es) detected.

MethodTooLong: FlickKeyboardView.attachKeyBehavior · ×77custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1769
FileTooLong: ime_service/IMEService.kt · ×43app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt
ClassTooLong: GojuonKeyboardView · ×42gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:118
TooManyMethods: IMEService · ×35app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:512

What to do

  1. Resolve the 77 MethodTooLong finding(s) in God Classes — start with KeyboardDefaultLayouts.kt (24), AppDatabase.kt (19), GojuonKeyboardView.kt (5). — One of this dimension's main actionable groups (77 warning-level).
  2. Resolve the 43 FileTooLong finding(s) in God Classes — start with LOUDSWithTermId.kt (2), IMEService.kt, KeyboardDefaultLayouts.kt. — One of this dimension's main actionable groups (43 warning-level).
  3. Resolve the 42 ClassTooLong finding(s) in God Classes — start with LOUDSWithTermId.kt (2), GojuonKeyboardView.kt, FlickKeyboardView.kt. — One of this dimension's main actionable groups (42 warning-level).

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

D4 · Code Duplication3.8 / 10Weak✓ Tool-verified

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

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

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

537 duplicated block group(s) detected. 15.4 % of the production lines (33,799 of 219,222) are in a reported copy. A further 304 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (10 lines × 2) · ×27app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:175
Duplicated block (7 lines × 2) · ×27app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:81
Duplicated block (13 lines × 2) · ×23app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:699
Duplicated block (8 lines × 2) · ×22app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:861
Duplicated block (11 lines × 2) · ×21app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:619

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

What to do

  1. Resolve the 27 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with LOUDS.kt (3), PopupWindow.kt (3), CandidateHeightLandscapeSettingFragment.kt (2). — One of this dimension's main actionable groups (27 warning-level).
  2. Resolve the 27 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with LOUDSWithTermId.kt (3), FlickKeyboardView.kt (3), FluidSimulation.kt (2). — One of this dimension's main actionable groups (27 warning-level).
  3. Resolve the 23 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with IMEService.kt (3), KeyboardSizeLandscapeFragment.kt (3), CandidateHeightLandscapeSettingFragment.kt (2). — One of this dimension's main actionable groups (23 warning-level).

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

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

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

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

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

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

16 production modules (Gradle+CMake), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 3 module(s) off the main sequence, with abstractness counted on 13 of the 16 (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: MarkdownHelperKeyboard:ai-runtime · ×3

What to do

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

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 8 serious findings✓ Tool-verified

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

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

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

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

8 of 422 classes have LCOM4 above 3.

Low cohesion: FloatingCandidateListAdapter (LCOM4 7) · ×8app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/FloatingCandidateListAdapter.kt:27

What to do

  1. Resolve the 8 Low cohesion finding(s) in Cohesion (LCOM4) — start with FloatingCandidateListAdapter.kt, CupertinoClassicSkin.kt, CupertinoSkin.kt. — One of this dimension's main actionable groups (8 warning-level).

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

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

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

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

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

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 154 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED (154). — One of this dimension's main actionable groups (154 issue-level).

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

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

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

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

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

0 of 16 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 14 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 32 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.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.4 / 10Strong✓ Tool-verified

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

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

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

Top hotspots: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt (190×446=84740); custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt (34×81=2754); gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt (15×130=1950) Repeated repair below the complexity floor: core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt (7 of 8 changes were fixes); app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontRepository.kt (5 of 6 changes were fixes); core/src/main/java/com/kazumaproject/core/domain/listener/QWERTYKeyListener.kt (4 of 4 changes were fixes)

Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt · ×42app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15731
Repeated repair: core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt · ×6core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt:122

What to do

  1. Resolve the 42 Hotspot finding(s) in Churn × Complexity Hotspots — start with IMEService.kt, FlickKeyboardView.kt, GojuonKeyboardView.kt. — One of this dimension's main actionable groups (42 warning-level).
  2. Resolve the 6 Repeated repair finding(s) in Churn × Complexity Hotspots — start with SkinGuidePopup.kt, LocalFontRepository.kt, QWERTYKeyListener.kt. — One of this dimension's main actionable groups (6 warning-level).

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

D16 · Bus Factor7.5 / 10Strong✓ Tool-verified

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

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

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

147 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is symbol_keyboard/src/main/java/com/kazumaproject/domain/Emoji.kt. Counted over 592 of the 1048 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

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

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

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

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

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

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

0 deducted task-comment markers across 219222 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.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

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.

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

2 of 2 documentation facets pass in full. 12 document(s) read across 14 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundenter-parity-lab/build.gradle:2

What to do

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

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

D21 · Naming Consistency0.5 / 10Critical✓ Tool-verified

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

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

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

2 naming inconsistencies among 21 declarations measured against a convention their peers follow.

`KeyTO` spells `TO` where 22 names in the project spell it `To`core/src/main/java/com/kazumaproject/core/domain/key/Key.kt:48
`KeyTOJapanese` spells `TO` where 22 names in the project spell it `To`core/src/main/java/com/kazumaproject/core/domain/key/KeyInfo.kt:716

What to do

  1. Resolve the 1 `KeyTO` spells `TO` where 22 names in the project spell it `To` finding(s) in Naming Consistency — start with Key.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `KeyTOJapanese` spells `TO` where 22 names in the project spell it `To` finding(s) in Naming Consistency — start with KeyInfo.kt. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion5.7 / 10Adequate✓ Tool-verified

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

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

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

3 of 14 build units (Gradle) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion · ×3app/build.gradle:1

What to do

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

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

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

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

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

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

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

REDACTED
REDACTED

What to do

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

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

D29 · Static Analysis (SAST)3.1 / 10Weak✓ Tool-verified

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

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

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

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

84 finding(s): 0 critical, 78 high, 6 medium, 0 low. 73 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 11 file(s) — `.github/scripts/run-zenz-correction-performance.sh` (line 245), `app/src/androidTest/java/com/kazumaproject/markdownhelperkeyboard/converter/ConversionPerformanceInstrumentedProbeTest.kt` (line 262), `app/src/androidTest/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewProductDeviceTest.kt` (line 325), `app/src/androidTest/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/opensource/OpenSourceUiInstrumentedTest.kt` (line 151, line 155, line 159), `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt` (line 920, line 921, line 922, …), … (+6 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2). — One of this dimension's main actionable groups (2 issue-level).
  3. No action in Static Analysis (SAST) — all 73 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (73 issue-level, 0 of them charged here).

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

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

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

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

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

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 592 of the 1048 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

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

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

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

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

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

Strongest change-coupling: ImePreferencesSnapshot.kt↔AppPreference.kt 90%; KanaKanjiEngine.kt↔Qualifiers.kt 90%; FlickCirclePopupView.kt↔FlickKeyboardView.kt 90%

Boundary-crossing change coupling: AppPreference.kt ↔ CustomAngleFlickController.kt · ×6app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt:1
Change coupling: KanaKanjiEngine.kt ↔ Qualifiers.kt · ×10app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1
Change-coupling hub: AppPreference.kt → ImePreferencesSnapshot.kt, CandidateHeightLandscapeSettingFragment.kt, CandidateViewHeightSettingFragment.kt, KeyboardThemeFragment.kt, CommonPreferenceFragment.kt, SumirePreferenceFragment.kt, CircularFlickSettingsFragment.kt, FlickKeyboardSizeSettingsFragment.kt, TenKeyCandidateLetterSizeFragment.kt · ×3app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt

What to do

  1. Resolve the 6 Boundary-crossing change coupling finding(s) in Change Coupling — start with AppPreference.kt, KeyboardRepository.kt, SumirePreferenceFragment.kt. — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 10 Change coupling finding(s) in Change Coupling — start with Extenstions.kt (2), DataConverterExtensions.kt (2), KanaKanjiEngine.kt. — One of this dimension's main actionable groups (10 warning-level).
  3. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with AppPreference.kt, FlickKeyboardView.kt, IMEService.kt. — One of this dimension's main actionable groups (3 warning-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

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

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

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

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

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

AX2 · Stateful singletons5.4 / 10Adequate✓ Tool-verified

Other · Architecture — Whether singleton services avoid mutable shared instance state that concurrent callers would race on.

Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.

  • `DictionaryBinaryReader` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (browsingOnly; e.g. `browsingOnly` in `forBrowsing` at line 43). — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryBinaryReader.kt:36
  • `GemmaRuntimeClient` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (residentConfig, residentBackend; e.g. `residentConfig` in `initializeLocked` at line 110). — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/runtime/GemmaRuntimeClient.kt:22
  • `LearnRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (conversionRevision; e.g. `conversionRevision` in `invalidateConversionSnapshot` at line 173). — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/LearnRepository.kt:16
  • `UserDictionaryRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (conversionRevision; e.g. `conversionRevision` in `invalidateConversionSnapshot` at line 119). — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/UserDictionaryRepository.kt:18

What to do

  • Java/Kotlin: keep container singletons stateless — move per-request data into locals or a request-scoped bean — or back the state with java.util.concurrent types (ConcurrentHashMap, AtomicInteger/AtomicReference), guard it with synchronized / a Lock (Kotlin: withLock), or mark a flag that is only ever overwritten volatile (@Volatile).
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

AX6 · Interface segregation9.9 / 10Exemplary✓ Tool-verified

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.

  • `KeyboardLayoutDao` declares 30 abstract methods: `getLayoutsList`, `getLayoutsListNotFlow`, `getFullLayoutById`, `insertLayout`, `insertKeys`, `insertFlickMappings`, `insertCircularFlickMappings`, `insertTwoStepFlickMappings`, `insertLongPressFlickMappings`, `insertTwoStepLongPressFlickMappings`, `insertSpacers`, `deleteSpacersForLayout`, `deleteLayout`, `updateLayout`, `clearNumberUsageModeExcept`, `updateLayoutUsageMode`, `deleteKeysForLayout`, `deleteFlicksForLayout`, `deleteCircularFlicksForLayout`, `deleteTwoStepFlicksForLayout`, `deleteLongPressFlicksForLayout`, `deleteTwoStepLongPressFlicksForLayout`, `getLayoutName`, `getFullLayoutOneShot`, `findLayoutByName`, `findLayoutByStableId`, `getAllFullLayouts`, `getAllFullLayoutsOneShot`, `getMaxSortOrder`, `updateLayoutSortOrder`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:22
  • `AppDatabase` declares 19 abstract methods: `learnDao`, `clickedSymbolDao`, `userWordDao`, `keyboardLayoutDao`, `userTemplateDao`, `clipboardHistoryDao`, `romajiMapDao`, `ngWordDao`, `shortcutDao`, `systemUserDictionaryDao`, `ngramRuleDao`, `gemmaPromptTemplateDao`, `deleteKeyFlickDeleteTargetDao`, `physicalKeyboardShortcutDao`, `candidateOrderOverrideDao`, `sumireSpecialKeyActionOverrideDao`, `sumireSpecialKeyPlacementOverrideDao`, `customZeroQueryDao`, `textMacroDao`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:96
  • `LearnDao` declares 18 abstract methods: `editEntry`, `deleteById`, `insertStrict`, `insert`, `findByInput`, `findByInputAndOutput`, `existsDuplicateForUpdate`, `all`, `getAllSuspend`, `insertAll`, `predictiveSearchByInput`, `findCommonPrefixes`, `findByInputPrefix`, `updateLearnedData`, `delete`, `deleteAll`, `deleteByInput`, `deleteByInputAndOutput`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/learning/database/LearnDao.kt:14

What to do

  • Split fat interfaces into focused role-interfaces so clients depend only on what they use.
DM10 · One transaction, one aggregate9.8 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether a single operation mutates more than one aggregate root. An aggregate is a consistency boundary, so saving two together fuses them into one — the second's invariants come to depend on the first's transaction, and the pair can no longer be separated. Reads of other aggregates are not counted.

Method: Neutral body surface (DDD-gated): every method body scanned for repository WRITE calls (Add/Update/Save/Remove/Delete/Insert/Store and their async forms), keyed on the ARGUMENT type rather than the repository type — three `IRepository<T>` writes collapse to one repository but are three distinct aggregates. Reads (Get/Find/Load/Query) are excluded, so loading another aggregate for context never counts. Score is offending methods over methods that write at all. Deterministic.

  • `FloatingDictionaryStore.delete` saves `UserDictionaryRepository`, `UserTemplateRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_dictionary/FloatingDictionaryStore.kt:64

What to do

  • Mutate one aggregate per operation and let the others follow from a domain event — the second aggregate reaching consistency a moment later is the design, not a compromise.
DM11 · Constructible invalid state3.0 / 10Weak✓ Tool-verified

Other · Domain Modelling — Whether an aggregate can be constructed in a state its own rules forbid — a public constructor that takes a raw primitive, stores it, and validates nothing, with no factory beside it. A constructor taking only value objects is not counted: each parameter has already validated itself.

Method: Neutral surface (DDD-gated): each non-abstract entity/aggregate checked for a PUBLIC constructor taking at least one RAW PRIMITIVE parameter whose body contains no guard token (throw / Guard. / Ensure. / ArgumentException / CheckRule / an XException.ThrowIf* helper). C#: a static factory beside a public constructor does not exempt it, and a public parameterless constructor followed by public raw-primitive setters that refuse nothing is charged when the type also declares a validating way in (a guarded constructor or a guarding static method returning the type); TypeScript: a static Create/Of/From/New factory exempts the type. A constructor taking only value objects is never charged -- measured: 64 of 87 unguarded public constructors on the C# corpus take value objects only, so ignoring parameter types would be 73% false positives. One finding per entity. Deterministic.

  • `CandidateOrderOverrideEntity`'s public constructor takes `input`, `scope`, `candidate` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CandidateOrderOverrideEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/database/CandidateOrderOverrideEntity.kt:15
  • `ClipboardHistoryItem`'s public constructor takes `preview`, `contentPath` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ClipboardHistoryItem` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/database/ClipboardHistoryItem.kt:13
  • `CircularFlickMapping`'s public constructor takes `actionType`, `actionValue`, `iconType`, `iconValue` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CircularFlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CircularFlickMapping.kt:17
  • `CustomKeyboardLayout`'s public constructor takes `name`, `stableId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CustomKeyboardLayout` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:25
  • `FlickMapping`'s public constructor takes `actionType`, `actionValue`, `iconType`, `iconValue` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `FlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/FlickMapping.kt:21
  • `KeyDefinition`'s public constructor takes `label`, `iconType`, `iconValue`, `keyIdentifier`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `KeyDefinition` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:25
  • `LongPressFlickMapping`'s public constructor takes `output` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `LongPressFlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/LongPressFlickMapping.kt:21
  • `SpacerDefinition`'s public constructor takes `itemIdentifier` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SpacerDefinition` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:26
  • `TwoStepFlickMapping`'s public constructor takes `output` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `TwoStepFlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepFlickMapping.kt:21
  • `TwoStepLongPressMappingEntity`'s public constructor takes `output` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `TwoStepLongPressMappingEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepLongPressMappingEntity.kt:21
  • `RomajiMapEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RomajiMapEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/RomajiMapEntity.kt:8
  • `DeleteKeyFlickDeleteTarget`'s public constructor takes `symbol` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DeleteKeyFlickDeleteTarget` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/database/DeleteKeyFlickDeleteTarget.kt:11
  • `GemmaPromptTemplate`'s public constructor takes `title`, `prompt`, `inputModality`, `taskKind`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GemmaPromptTemplate` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/database/GemmaPromptTemplate.kt:16
  • `LearnEntity`'s public constructor takes `input`, `out` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `LearnEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/learning/database/LearnEntity.kt:16
  • `NgWord`'s public constructor takes `yomi`, `tango` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NgWord` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/database/NgWord.kt:11
  • `NgramRuleEntity`'s public constructor takes `node1Word`, `node2Word`, `node3Word`, `node4Word`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NgramRuleEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ngram_rule/database/NgramRuleEntity.kt:24
  • `PhysicalKeyboardShortcutItem`'s public constructor takes `context`, `actionId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PhysicalKeyboardShortcutItem` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/database/PhysicalKeyboardShortcutItem.kt:16
  • `ShortcutItem`'s public constructor takes `typeId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ShortcutItem` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/data/ShortcutItem.kt:7
  • `SumireSpecialKeyActionOverrideEntity`'s public constructor takes `layoutType`, `inputMode`, `keyId`, `direction`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SumireSpecialKeyActionOverrideEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_special_key/database/SumireSpecialKeyActionOverrideEntity.kt:10
  • `SumireSpecialKeyPlacementOverrideEntity`'s public constructor takes `layoutType`, `inputMode`, `keyId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SumireSpecialKeyPlacementOverrideEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_special_key/database/SumireSpecialKeyPlacementOverrideEntity.kt:10
  • `SystemUserDictionaryEntry`'s public constructor takes `yomi`, `tango` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SystemUserDictionaryEntry` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/database/SystemUserDictionaryEntry.kt:15
  • `TextMacro`'s public constructor takes `name`, `reading`, `body` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `TextMacro` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/database/TextMacro.kt:14
  • `UserWord`'s public constructor takes `word`, `reading` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `UserWord` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_dictionary/database/UserWord.kt:22
  • `UserTemplate`'s public constructor takes `word`, `reading` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `UserTemplate` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/database/UserTemplate.kt:18
  • `CustomZeroQueryEntry`'s public constructor takes `lookupKey`, `displayKey`, `candidate` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CustomZeroQueryEntry` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/CustomZeroQueryEntry.kt:14
  • `ClickedSymbol`'s public constructor takes `symbol` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ClickedSymbol` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — symbol_keyboard/src/main/java/com/kazumaproject/data/clicked_symbol/ClickedSymbol.kt:12

What to do

  • Give each aggregate one way in that can refuse — a guarded constructor, value-object parameters that validate themselves, or a private constructor behind a factory that returns a failure.
DM12 · Ambient inputs in the domain10.0 / 10Exemplary○ Nothing flagged

Other · Domain Modelling — Whether domain types receive the time and randomness their rules depend on, rather than reading the process clock or a global random source directly — an ambient read makes the rule it feeds untestable at the instant that matters and lets two reads inside one operation disagree.

Method: Roslyn (DDD-gated, C#/VB only): domain-layer types scanned for ambient reads — DateTime/DateTimeOffset.Now/UtcNow/Today, Random.Shared, new Random(), Stopwatch.GetTimestamp — resolved against the semantic model, with a comment/string-stripped token fallback only where resolution fails. Body reads are scored; field/property initialisers are surfaced unscored. Apply/When folds excluded (ES1 owns them). Deterministic, symbol-resolved.

DM2 · Strongly-typed ids3.0 / 10Weak✓ Tool-verified

Other · Domain Modelling — How much of the domain uses strongly-typed ids vs raw Guid/string/int — adoption curve, not all-or-nothing.

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

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

  • `CircularFlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CircularFlickMapping.kt:18
  • `CustomKeyboardLayout.layoutId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:27
  • `CustomKeyboardLayout.stableId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:35
  • `FlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/FlickMapping.kt:22
  • `KeyDefinition.keyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:27
  • `KeyDefinition.ownerLayoutId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:28
  • `KeyDefinition.drawableResId` is a raw `Int` — give it a strongly-typed id: a dedicated single-field type wrapping the `Int`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:36
  • `LongPressFlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/LongPressFlickMapping.kt:22
  • `SpacerDefinition.spacerId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:28
  • `SpacerDefinition.ownerLayoutId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:29
  • `TwoStepFlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepFlickMapping.kt:22
  • `GemmaPromptTemplate.builtInKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/database/GemmaPromptTemplate.kt:31
  • `PhysicalKeyboardShortcutItem.actionId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/database/PhysicalKeyboardShortcutItem.kt:25
  • `ShortcutItem.typeId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/data/ShortcutItem.kt:9
  • `FlickTextPreviewEvent.gestureId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that. — core/src/main/java/com/kazumaproject/core/domain/flick/FlickTextPreviewEvent.kt:11

What to do

  • Adopt strongly-typed ids across the domain — finish the migration or document the boundary; primitive ids invite transposed-argument bugs.
DM4 · Rich vs anemic model3.0 / 10Weak✓ Tool-verified

Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.

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

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

  • `ClipboardHistoryItem` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/database/ClipboardHistoryItem.kt:13
  • `CircularFlickMapping` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CircularFlickMapping.kt:17
  • `CustomKeyboardLayout` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:25
  • `FlickMapping` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/FlickMapping.kt:21
  • `KeyDefinition` is an aggregate/entity with 24 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:25
  • `LongPressFlickMapping` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/LongPressFlickMapping.kt:21
  • `SpacerDefinition` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:26
  • `TwoStepFlickMapping` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepFlickMapping.kt:21
  • `DeleteKeyFlickDeleteTarget` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/database/DeleteKeyFlickDeleteTarget.kt:11
  • `GemmaPromptTemplate` is an aggregate/entity with 15 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/database/GemmaPromptTemplate.kt:16
  • `NgWord` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/database/NgWord.kt:11
  • `PhysicalKeyboardShortcutItem` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/database/PhysicalKeyboardShortcutItem.kt:16
  • `ShortcutItem` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/data/ShortcutItem.kt:7
  • `TextMacro` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/database/TextMacro.kt:14
  • `UserWord` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_dictionary/database/UserWord.kt:22
  • `UserTemplate` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/database/UserTemplate.kt:18
  • `ClickedSymbol` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — symbol_keyboard/src/main/java/com/kazumaproject/data/clicked_symbol/ClickedSymbol.kt:12

What to do

  • Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
DM5 · Encapsulated state10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether entities protect their state — private/init-only setters, and collections handed out as read-only views rather than the mutable backing collection — instead of exposing writable state that bypasses invariants. Softened when a rehydration framework (Marten/EF) is present.

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

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

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

Other · Domain Modelling — Whether the domain layer stays free of infrastructure dependencies (EF/Marten/HTTP/ASP.NET) — the clean-architecture dependency rule.

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

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

DM9 · Scattered domain decisions9.6 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether one domain rule is decided — or one measurement produced — in more than one place, rather than living on the type that owns it.

Method: Neutral body surface plus Roslyn (DDD-gated), two arms. DECISION (Roslyn only): a predicate over a domain type's members judged in two or more types, where none of those decisions live on the owning type — operands of comparisons and relational property patterns only, so a member merely passed as an argument is not judged. DERIVATION: a plain all-numeric carrier of ≥2 members, with no base type and exactly one constructor, CONSTRUCTED as the result of a method (returned or assigned, never inline as an argument) in two or more types other than its own — the same measurement produced twice, which centralising the judgement does not fix. DERIVATION runs on every language whose frontend declares the produced-or-passed fact per construction (Roslyn and the Java sidecar today); a target with only the derivation arm carries an engine gap naming the decision arm as not assessed, and a frontend that declares nothing keeps the dimension not measured rather than clean. Single-member rules, test code and generated code are out of population for both. Advisory.

  • com.kazumaproject.android.flexbox.SavedState's [mAnchorOffset, mAnchorPosition] are built independently in com.kazumaproject.android.flexbox.1, com.kazumaproject.android.flexbox.FlexboxLayoutManager — the same reading, produced twice. Two producers can disagree without either looking wrong on its own: whichever population, filter or rounding one of them applies, the other need not, and nothing compares them. Give the measurement ONE producer and let the other call it.

What to do

  • Give each measurement ONE producer — the others call it. Centralising the judgement is not enough on its own: two producers of the same numbers can disagree while every rule reading them is correct.
M1 · Documentation (README)6.8 / 10Adequate✓ Tool-verified

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

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation0.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
  • 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.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

P2 · Observability2.0 / 10Critical✓ Tool-verified

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

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

  • No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.

What to do

  • Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

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

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

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader3.5 / 10Weak✓ Tool-verified

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

  • `shortArraySize` is read from the bytes being parsed at line 58 (`readInt`), then used to size a `ShortArray` at line 59 — and nowhere in its scope is `shortArraySize` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `shortArraySize` against the bytes actually remaining and a maximum the format allows before allocating. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/stream/ArraysStream.kt:59

What to do

  • Each finding names the read that takes the length from the input and the site that spends it, and states that the value is never compared in between. Confirm from the two, then bound the length against the remaining stream before using it.
X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

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.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

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.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

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.

X23 · Unguarded diagnostic materialisation7.9 / 10Strong✓ Tool-verified

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

  • `d` at line 17967 is called with an argument built by `supportedMimeTypes.joinToString()` (line 17967), whose cost grows with the collection it walks. Kotlin evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because d is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled` test, no `BuildConfig.DEBUG` flag, no trailing lambda (`logger.debug { … }`) the logger calls only when the level is on. — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17967

What to do

  • In Kotlin, hand the logger a lambda it calls only when the level is on (`logger.debug { "rows: ${rows.joinToString()}" }` — kotlin-logging and Log4j 2's Kotlin API take one), or put the line behind `if (log.isDebugEnabled)` (`if (BuildConfig.DEBUG)` for a line only a debug build needs). A string template is not the fix on SLF4J or Timber: their message is a `String`, so every `joinToString` or `toJson` inside the `${…}` runs before the call is entered.
X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

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.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

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.

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.

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

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

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

  • 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. (×5) — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:409, custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:433, custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:452, …
  • `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. (×10) — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zenz/ZenzaiDraftReview.kt:36, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateViewModel.kt:65, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:97, …

What to do

  • Swallowed exception (empty catch)
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.

X5 · Nullable reference types9.9 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether Kotlin's null safety is not undermined by not-null assertions — `String` cannot hold null and `String?` must be checked before use in every Kotlin module, and each `!!` is a run-time `NullPointerException` the author has told the compiler cannot happen.

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

Reference — by lens

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

LensScoreRatingImpact
Code Health74.5Adequate — gated by D2, D4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture80.1StrongSolid.
Maturity56.2Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness43.0Weak — gated by P2, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security51.2Adequate — gated by D28, D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling53.1Adequate — gated by DM2, DM4, DM11Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100.0ExemplaryStrongest area.
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 — 1 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.

  • 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: Dagger rejects, at compile time, a component that holds a binding with a narrower scope than its own.
  • 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: requirements ({languageVersion=25, vendor=JetBrains, implementation=vendor-specific, nativeImageCapable=false}) from 'https://api.foojay.io/disco/v3.0/ids/50dff0498c7a09126e3b7e7f2749f324/redirect', d…; runtime evidence skipped (launch chosen because app/build.gradle applies the Android application plugin and gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~106226 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .kt suite was found but not re-run
  • D12 Dependency Hygiene — Dependency currency not established — api.foojay.io did not answer
  • 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. 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, .py, 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) — 55 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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 measured — polyglot repository, one half has no runner
  • DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
  • ED1 Event-Driven — not scored — this repository shows 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
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust and Java, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage data present for 6 file(s), but no domain-layer files were identified: no covered file's path contains any of the markers this check keys on (/domain/, /aggregates/, /valueobjects/, /domainmodel/, .domain/, /entities/), which are matched case-insensitively anywhere in the path. With no domain partition there is nothing to compare the web/controller layer against — if this repository keeps its business rules under a folder named none of those, that naming is what the check cannot see, not the domain logic.
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a 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.
  • 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.
  • 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
  • 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
  • X24 Document value interpolated into markup unescaped — X24 reached only 1% of this repository's production lines — kotlin (208,728 lines), c (3,441 lines), cpp (1,829 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X26 Unsynchronised callback handoff — 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 Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 848 finding(s)
D28 · Secrets (history) · REDACTED · ×610
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 585 more in this group — see findings.md.
D13 · REDACTED Scanning · Leaked secret · ×154
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 129 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 48 more in this group — see findings.md.
D35 · Change Coupling · Boundary-crossing change coupling · ×6
  • Boundary-crossing change coupling: AppPreference.kt ↔ CustomAngleFlickController.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt` (context main) and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt` (context custom_keyboard) sit in DIFFERENT parts of the tree yet change together 67% of the time (10 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `ccd4937f` Add flick and long-press popup settings for TenKey and Sumire; `b7f4d651` implement composing text; `ea335fa1` delete unnesary pereference — run `git show` on any of them.
  • Boundary-crossing change coupling: KeyboardRepository.kt ↔ KeyActionMapper.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt` (context main) and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyActionMapper.kt` (context custom_keyboard) sit in DIFFERENT parts of the tree yet change together 62% of the time (15 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `7d27baff` Add configurable editing and modifier keys; `d86376e4` Add cut action to custom keyboard; `ab578936` Add DeleteAfterCursor custom key action — run `git show` on any of them.
  • Boundary-crossing change coupling: SumirePreferenceFragment.kt ↔ FlickKeyboardView.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SumirePreferenceFragment.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SumirePreferenceFragment.kt` (context main) and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt` (context custom_keyboard) sit in DIFFERENT parts of the tree yet change together 61% of the time (11 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `385dbe21` Add key-anchored popup map input and editor for Sumire; `bc7c48bc` Temporarily suspend three-stage flick input; `0f5de471` Improve diagonal recognition for multi-stage flicks — run `git show` on any of them.
  • Boundary-crossing change coupling: DataConverterExtensions.kt ↔ KeyActionMapper.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt` (context main) and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyActionMapper.kt` (context custom_keyboard) sit in DIFFERENT parts of the tree yet change together 56% of the time (10 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `7d27baff` Add configurable editing and modifier keys; `d86376e4` Add cut action to custom keyboard; `ab578936` Add DeleteAfterCursor custom key action — run `git show` on any of them.
  • Boundary-crossing change coupling: CircularFlickSettingsFragment.kt ↔ CustomAngleFlickController.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_angle/CircularFlickSettingsFragment.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_angle/CircularFlickSettingsFragment.kt` (context main) and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt` (context custom_keyboard) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `ea335fa1` delete unnesary pereference; `b199b32e` add icon to circlar flick; `239286e4` add multiple separation in circular flick — run `git show` on any of them.
  • Boundary-crossing change coupling: IMEService.kt ↔ PopupWindowExtension.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt` (context main) and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt` (context tenkey) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `7f342fd2` create fragment and view for custom popup view; `2d895b8a` show key preview corresponding to anchor view in default; `9941133a` not show key window if char is null — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
Serious — 1714 finding(s)
D3 · God Classes · MethodTooLong · ×77
  • MethodTooLong: FlickKeyboardView.attachKeyBehavior custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1769 — MethodTooLong — attachKeyBehavior runs 797 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 697 over it, 7.97× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.learnDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:98 — MethodTooLong — learnDao runs 790 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 690 over it, 7.90× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.clickedSymbolDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:99 — MethodTooLong — clickedSymbolDao runs 789 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 689 over it, 7.89× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.userWordDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:100 — MethodTooLong — userWordDao runs 788 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 688 over it, 7.88× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.keyboardLayoutDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:101 — MethodTooLong — keyboardLayoutDao runs 787 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 687 over it, 7.87× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.userTemplateDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:102 — MethodTooLong — userTemplateDao runs 786 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 686 over it, 7.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.clipboardHistoryDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:103 — MethodTooLong — clipboardHistoryDao runs 785 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 685 over it, 7.85× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.romajiMapDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:104 — MethodTooLong — romajiMapDao runs 784 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 684 over it, 7.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.ngWordDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:105 — MethodTooLong — ngWordDao runs 783 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 683 over it, 7.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.shortcutDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:106 — MethodTooLong — shortcutDao runs 782 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 682 over it, 7.82× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.systemUserDictionaryDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:107 — MethodTooLong — systemUserDictionaryDao runs 781 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 681 over it, 7.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.ngramRuleDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:108 — MethodTooLong — ngramRuleDao runs 780 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 680 over it, 7.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.gemmaPromptTemplateDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:109 — MethodTooLong — gemmaPromptTemplateDao runs 779 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 679 over it, 7.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.deleteKeyFlickDeleteTargetDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:110 — MethodTooLong — deleteKeyFlickDeleteTargetDao runs 778 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 678 over it, 7.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.physicalKeyboardShortcutDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:111 — MethodTooLong — physicalKeyboardShortcutDao runs 777 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 677 over it, 7.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.candidateOrderOverrideDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:112 — MethodTooLong — candidateOrderOverrideDao runs 776 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 676 over it, 7.76× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.sumireSpecialKeyActionOverrideDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:113 — MethodTooLong — sumireSpecialKeyActionOverrideDao runs 775 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 675 over it, 7.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.sumireSpecialKeyPlacementOverrideDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:114 — MethodTooLong — sumireSpecialKeyPlacementOverrideDao runs 774 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 674 over it, 7.74× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.customZeroQueryDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:115 — MethodTooLong — customZeroQueryDao runs 773 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 673 over it, 7.73× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: AppDatabase.textMacroDao app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:116 — MethodTooLong — textMacroDao runs 772 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 672 over it, 7.72× 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: GraphBuilder.constructGraph app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:322 — MethodTooLong — constructGraph runs 726 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 626 over it, 7.26× 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: KeyboardDefaultLayouts.createHiraganaEffectiveLayout custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8467 — MethodTooLong — createHiraganaEffectiveLayout runs 663 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 563 over it, 6.63× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: KeyboardDefaultLayouts.createHiraganaToggleLayout custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5032 — MethodTooLong — createHiraganaToggleLayout runs 629 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 529 over it, 6.29× 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: KeyboardDefaultLayouts.createHiraganaFlickLayout custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6574 — MethodTooLong — createHiraganaFlickLayout runs 617 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 517 over it, 6.17× 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: Companion.from app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt:347 — MethodTooLong — from runs 437 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 337 over it, 4.37× 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.
  • + 52 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×43
  • FileTooLong: ime_service/IMEService.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt — FileTooLong — 23323 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 22823 over it, 46.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: layout/KeyboardDefaultLayouts.kt custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt — FileTooLong — 7634 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 7134 over it, 15.27× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: setting_activity/AppPreference.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt — FileTooLong — 3875 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3375 over it, 7.75× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: engine/KanaKanjiEngine.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt — FileTooLong — 3752 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 3252 over it, 7.50× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: gojuon_keyboard/GojuonKeyboardView.kt gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt — FileTooLong — 3345 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: GojuonKeyboardView (118-4654). The bar is 500 significant lines; this is 2845 over it, 6.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/FlickKeyboardView.kt custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt — FileTooLong — 2802 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: FlickKeyboardView (112-3914). The bar is 500 significant lines; this is 2302 over it, 5.60× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ui/QWERTYKeyboardView.kt qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt — FileTooLong — 2413 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: QWERTYKeyboardView (109-3544). The bar is 500 significant lines; this is 1913 over it, 4.83× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: tenkey/TenKey.kt tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt — FileTooLong — 2333 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: TenKey (129-3350). The bar is 500 significant lines; this is 1833 over it, 4.67× 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: path_algorithm/FindPath.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt — FileTooLong — 2128 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: FindPath (32-2790). The bar is 500 significant lines; this is 1628 over it, 4.26× 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: image_effect/SprayPaintSimulation.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt — FileTooLong — 1925 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SprayPaintSimulation (18-2349). The bar is 500 significant lines; this is 1425 over it, 3.85× 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: adapters/SuggestionAdapter.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt — FileTooLong — 1921 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: SuggestionAdapter (180-2691). The bar is 500 significant lines; this is 1421 over it, 3.84× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: key/KeyInfo.kt core/src/main/java/com/kazumaproject/core/domain/key/KeyInfo.kt — FileTooLong — 1870 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: KeyInfo (5-2237). The bar is 500 significant lines; this is 1370 over it, 3.74× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ui/KeyEditorFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt — FileTooLong — 1700 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1200 over it, 3.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ui/KeyboardEditorViewModel.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt — FileTooLong — 1223 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: KeyboardEditorViewModel (103-1722). The bar is 500 significant lines; this is 723 over it, 2.45× 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: dictionary_override/DictionaryModels.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryModels.kt — FileTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 706 over it, 2.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: utility/FormulaParser.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt — FileTooLong — 1019 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 519 over it, 2.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: graph/GraphBuilder.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt — FileTooLong — 1001 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: GraphBuilder (26-1329). The bar is 500 significant lines; this is 501 over it, 2.00× 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: setting/CommonPreferenceFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt — FileTooLong — 956 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: CommonPreferenceFragment (83-1333). The bar is 500 significant lines; this is 456 over it, 1.91× 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: image_effect/FluidSimulation.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt — FileTooLong — 925 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: FluidSimulation (10-1144). The bar is 500 significant lines; this is 425 over it, 1.85× 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: repository/KeyboardRepository.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt — FileTooLong — 891 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: KeyboardRepository (127-1359). The bar is 500 significant lines; this is 391 over it, 1.78× 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: database/AppDatabase.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt — FileTooLong — 881 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: AppDatabase (96-1272). The bar is 500 significant lines; this is 381 over it, 1.76× 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: with_term_id/LOUDSWithTermId.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt — FileTooLong — 827 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: LOUDSWithTermId (34-1121). The bar is 500 significant lines; this is 327 over it, 1.65× 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: symbol_keyboard/CustomSymbolKeyboardView.kt symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: CustomSymbolKeyboardView (70-1215). The bar is 500 significant lines; this is 326 over it, 1.65× 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: candidate_view_height_setting/SuggestionAdapter2.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt — FileTooLong — 821 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: SuggestionAdapter2 (84-1171). The bar is 500 significant lines; this is 321 over it, 1.64× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: setting/SettingDestination.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingDestination.kt — FileTooLong — 804 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: SettingDestination (96-1056). The bar is 500 significant lines; this is 304 over it, 1.61× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • + 18 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×42
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15731 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt changed 190 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 446 in IMEService.configureFlickKeyboardView at line 15731. 66 of those changes were fix/bug commits, and the other 124 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1769 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in FlickKeyboardView.attachKeyBehavior at line 1769. 10 of those changes were fix/bug commits, and the other 24 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1109 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in GojuonKeyboardView.onTouchLegacy at line 1109. 4 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2763 — tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt changed 25 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in TenKey.setFlickInActionMove at line 2763. 8 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1609 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt changed 40 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in SuggestionAdapter.applyVerticalCandidate at line 1609. 14 of those changes were fix/bug commits, and the other 26 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1667 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in QWERTYKeyboardView.onTouchEvent at line 1667. 8 of those changes were fix/bug commits, and the other 12 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: tools/classified-dictionaries/prepare.py tools/classified-dictionaries/prepare.py:161 — tools/classified-dictionaries/prepare.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in prepare.provenance at line 161. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- tools/classified-dictionaries/prepare.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:411 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in CommonPreferenceFragment.onPreferencesReady at line 411. 4 of those changes were fix/bug commits, and the other 19 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:322 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 130 in GraphBuilder.constructGraph at line 322. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:854 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in KanaKanjiEngine.getCandidatesOriginal at line 854. 4 of those changes were fix/bug commits, and the other 18 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:623 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in SettingSearchIndex.legacyRelatedKeys at line 623. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1879 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 41 in KeyEditorFragment.onDone at line 1879. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt:347 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ImePreferencesSnapshot.from at line 347. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1700 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in FindPath.backwardAStarWithBunsetsu at line 1700. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt:171 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in PopupMapEditorCanvas.onTouchEvent at line 171. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:587 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in EnglishEngine.getCandidates at line 587. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:65 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in PopupMapEditorFragment.onCreateView at line 65. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt:86 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in EnglishPhraseDictionary.phrases at line 86. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:169 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in KeyboardDefaultLayouts.createFinalLayout at line 169. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt:203 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in PhraseConverter.lattice at line 203. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt:553 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in KeyboardThemeFragment.syncSearchAvailability at line 553. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:750 — symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in CustomSymbolKeyboardView.buildCategoryTabs at line 750. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt:96 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in ComposingGuideWindow.refresh at line 96. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/CandidateSurfaceHost.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/CandidateSurfaceHost.kt:115 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/CandidateSurfaceHost.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in CandidateSurfaceHost.refreshAppearance at line 115. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/CandidateSurfaceHost.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:218 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 81 in KeyboardPreviewView.createSurface at line 218. 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-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 17 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×42
  • ClassTooLong: GojuonKeyboardView gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:118 — ClassTooLong — 3234 significant lines (blank, comment-only and punctuation-only lines excluded), 91 methods. The bar is 400 significant lines; this is 2834 over it, 8.09× 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: FlickKeyboardView custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:112 — ClassTooLong — 2693 significant lines (blank, comment-only and punctuation-only lines excluded), 138 methods. The bar is 400 significant lines; this is 2293 over it, 6.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.
  • ClassTooLong: QWERTYKeyboardView qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:109 — ClassTooLong — 2308 significant lines (blank, comment-only and punctuation-only lines excluded), 156 methods. The bar is 400 significant lines; this is 1908 over it, 5.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: TenKey tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:129 — ClassTooLong — 2207 significant lines (blank, comment-only and punctuation-only lines excluded), 113 methods. The bar is 400 significant lines; this is 1807 over it, 5.52× 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: FindPath app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:32 — ClassTooLong — 2099 significant lines (blank, comment-only and punctuation-only lines excluded), 47 methods. The bar is 400 significant lines; this is 1699 over it, 5.25× 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: SprayPaintSimulation app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:18 — ClassTooLong — 1910 significant lines (blank, comment-only and punctuation-only lines excluded), 79 methods. The bar is 400 significant lines; this is 1510 over it, 4.78× 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: KeyInfo core/src/main/java/com/kazumaproject/core/domain/key/KeyInfo.kt:5 — ClassTooLong — 1868 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 1468 over it, 4.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SuggestionAdapter app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:180 — ClassTooLong — 1774 significant lines (blank, comment-only and punctuation-only lines excluded), 133 methods. The bar is 400 significant lines; this is 1374 over it, 4.44× 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: KeyboardEditorViewModel app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:103 — ClassTooLong — 1131 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 400 significant lines; this is 731 over it, 2.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GraphBuilder app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:26 — ClassTooLong — 978 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. The bar is 400 significant lines; this is 578 over it, 2.45× 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: FluidSimulation app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:10 — ClassTooLong — 918 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 518 over it, 2.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CommonPreferenceFragment app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:83 — ClassTooLong — 881 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 481 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.
  • ClassTooLong: KeyboardRepository app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:127 — ClassTooLong — 798 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 398 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LOUDSWithTermId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:34 — ClassTooLong — 797 significant lines (blank, comment-only and punctuation-only lines excluded), 62 methods. The bar is 400 significant lines; this is 397 over it, 1.99× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AppDatabase app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:96 — ClassTooLong — 791 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 391 over it, 1.98× 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: CustomSymbolKeyboardView symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:70 — ClassTooLong — 759 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 359 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.
  • ClassTooLong: SuggestionAdapter2 app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:84 — ClassTooLong — 747 significant lines (blank, comment-only and punctuation-only lines excluded), 68 methods. The bar is 400 significant lines; this is 347 over it, 1.87× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SettingDestination app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingDestination.kt:96 — ClassTooLong — 723 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 323 over it, 1.81× 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: ImePreferencesSnapshot app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt:69 — ClassTooLong — 708 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 308 over it, 1.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LiquidRippleSimulation app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:10 — ClassTooLong — 658 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 258 over it, 1.65× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CrossFlickInputController custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CrossFlickInputController.kt:33 — ClassTooLong — 649 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 249 over it, 1.62× 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: CandidateHeightLandscapeSettingFragment app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:60 — ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 48 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: CandidateViewHeightSettingFragment app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:53 — ClassTooLong — 634 significant lines (blank, comment-only and punctuation-only lines excluded), 48 methods. The bar is 400 significant lines; this is 234 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: CinematicWaveSimulation app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:8 — ClassTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 211 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FeverEffectView app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:12 — ClassTooLong — 584 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 184 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 17 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×35
  • TooManyMethods: IMEService app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:512 — TooManyMethods — 1022 methods. The bar is 30 methods; this is 992 over it, 34.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: QWERTYKeyboardView qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:109 — TooManyMethods — 156 methods. The bar is 30 methods; this is 126 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.
  • TooManyMethods: FlickKeyboardView custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:112 — TooManyMethods — 138 methods. The bar is 30 methods; this is 108 over it, 4.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: SuggestionAdapter app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:180 — TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: TenKey tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:129 — TooManyMethods — 113 methods. The bar is 30 methods; this is 83 over it, 3.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: GojuonKeyboardView gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:118 — TooManyMethods — 91 methods. The bar is 30 methods; this is 61 over it, 3.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: KeyboardEditorViewModel app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:103 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppModule app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/di/AppModule.kt:112 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AppPreference app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt:59 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SprayPaintSimulation app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:18 — TooManyMethods — 79 methods. The bar is 30 methods; this is 49 over it, 2.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: KanaKanjiEngine app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:115 — TooManyMethods — 75 methods. The bar is 30 methods; this is 45 over it, 2.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: SuggestionAdapter2 app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:84 — TooManyMethods — 68 methods. The bar is 30 methods; this is 38 over it, 2.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: LOUDSWithTermId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:34 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: KeyEditorFragment app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:98 — TooManyMethods — 58 methods. The bar is 30 methods; this is 28 over it, 1.93× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CrossFlickInputController custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CrossFlickInputController.kt:33 — 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: CandidateHeightLandscapeSettingFragment app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:60 — 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: CandidateViewHeightSettingFragment app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:53 — 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: FindPath app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:32 — TooManyMethods — 47 methods. The bar is 30 methods; this is 17 over it, 1.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DictionaryBinaryReader app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryBinaryReader.kt:36 — 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: KeyboardDefaultLayouts custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:27 — 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: LOUDSWithTermId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:19 — 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: CustomSymbolKeyboardView symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:70 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 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.
  • TooManyMethods: GemmaTranslationManager app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/GemmaTranslationManager.kt:41 — TooManyMethods — 39 methods. The bar is 30 methods; this is 9 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.
  • TooManyMethods: FluidSimulation app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:10 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SimpleFormulaParser app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:123 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.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.
  • + 10 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×27
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:175 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:175-184 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:198-207 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:175` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:212 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:212-221 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:83-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:549 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:549-558 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:584-593 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:549` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:831 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:831-840 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:1080-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:831` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:235 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:235-244 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:175-184 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1200 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1200-1209 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1914-1923 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29954 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29954-29963 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30087-30096 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29954` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:187 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:187-196 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:187-196 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:189 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:189-198 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:189-198 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:846 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:846-855 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1332-1341 — both copies are in the same file, so extract the 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 (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:709 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:709-718 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:701-710 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:709` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:79 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:79-88 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:204-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:79` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:498 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:498-507 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:564-573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:498` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:563` calls `getString` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:497` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:421 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:421-430 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:314-323 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:193 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:193-202 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupViewModel.kt:161-170 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:193` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:78 — core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:78-87 | core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:111-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.
  • Duplicated block (10 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:131 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:131-140 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:141-150 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1660 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1660-1669 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1979-1988 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:128 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:128-137 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:281-290 — before extracting anything, compare `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:128` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:224 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:224-233 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:379-388 — before extracting anything, compare `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:224` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:345 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:345-354 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:502-511 — before extracting anything, compare `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:345` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:100 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:100-109 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:126-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/mozc/MozcNodeAttributeTableReader.kt:39 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/mozc/MozcNodeAttributeTableReader.kt:39-48 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/mozc/MozcSegmenterDataReader.kt:78-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2662 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2662-2671 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:1143-1152 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:437 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:437-446 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:429-438 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×27
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:81 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:81-87 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:104-110 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:307 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:307-313 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:345-351 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:468 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:468-474 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:490-496 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:468` it does not close everything it opens, so those 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:504 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:504-510 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:574-580 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:504` it does not close everything it opens, so those 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/Converter.kt:24 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/Converter.kt:24-30 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/ConverterWithTermId.kt:26-32 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/Converter.kt:24` it does not close everything it opens, so those 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 `louds` to `LOUDS` in one and `LOUDSWithTermId` 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, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/ConverterWithTermId.kt:34` calls `add` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/Converter.kt:31` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12977 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12977-12983 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13030-13036 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12977` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:559 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:559-565 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:418-424 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:231 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:231-237 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1868-1874 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt` as WHOLE FILES: this scan already matched 8 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionarySettingsFragment.kt:228 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionarySettingsFragment.kt:228-234 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionarySettingsFragment.kt:258-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionarySettingsFragment.kt:228` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:919 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:919-925 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:932-938 — both copies are in the same file, so extract the 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 (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:439 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:439-447 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:332-338 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:439` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:64 — core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:64-70 | core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:102-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:62` calls `requestLayout`, `invalidate` and `core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:101` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2403 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2403-2409 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2684-2690 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2403` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionaryDisplayState.kt:78 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionaryDisplayState.kt:78-84 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionaryDisplayState.kt:102-108 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:311 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:311-317 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:181-187 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:311` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactEnglishDictionary.kt:210 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactEnglishDictionary.kt:210-216 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactSystemDictionary.kt:206-212 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:938 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:938-944 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1353-1359 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:72 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:72-78 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:98-104 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt` 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 (7 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2654 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2654-2660 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:1128-1134 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:585 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:585-591 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:450-456 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontSettingsFragment.kt:123 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontSettingsFragment.kt:123-129 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/ui/TextMacroEditorFragment.kt:156-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:383 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:383-389 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:383-389 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3391 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3391-3397 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1889-1895 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3399 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3399-3405 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1897-1903 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/ClipboardPagingSource.kt:30 — symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/ClipboardPagingSource.kt:30-36 | symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/SymbolPagingSource.kt:30-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
  • + 2 more in this group — see findings.md.
DM11 · Constructible invalid state · Constructible in an invalid state · ×26
  • Constructible in an invalid state: CandidateOrderOverrideEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/database/CandidateOrderOverrideEntity.kt:15 — `CandidateOrderOverrideEntity`'s public constructor takes `input`, `scope`, `candidate` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CandidateOrderOverrideEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: ClipboardHistoryItem app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/database/ClipboardHistoryItem.kt:13 — `ClipboardHistoryItem`'s public constructor takes `preview`, `contentPath` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ClipboardHistoryItem` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: CircularFlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CircularFlickMapping.kt:17 — `CircularFlickMapping`'s public constructor takes `actionType`, `actionValue`, `iconType`, `iconValue` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CircularFlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: CustomKeyboardLayout app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:25 — `CustomKeyboardLayout`'s public constructor takes `name`, `stableId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CustomKeyboardLayout` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: FlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/FlickMapping.kt:21 — `FlickMapping`'s public constructor takes `actionType`, `actionValue`, `iconType`, `iconValue` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `FlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: KeyDefinition app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:25 — `KeyDefinition`'s public constructor takes `label`, `iconType`, `iconValue`, `keyIdentifier`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `KeyDefinition` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: LongPressFlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/LongPressFlickMapping.kt:21 — `LongPressFlickMapping`'s public constructor takes `output` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `LongPressFlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: SpacerDefinition app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:26 — `SpacerDefinition`'s public constructor takes `itemIdentifier` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SpacerDefinition` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: TwoStepFlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepFlickMapping.kt:21 — `TwoStepFlickMapping`'s public constructor takes `output` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `TwoStepFlickMapping` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: TwoStepLongPressMappingEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepLongPressMappingEntity.kt:21 — `TwoStepLongPressMappingEntity`'s public constructor takes `output` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `TwoStepLongPressMappingEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: RomajiMapEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/RomajiMapEntity.kt:8 — `RomajiMapEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RomajiMapEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: DeleteKeyFlickDeleteTarget app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/database/DeleteKeyFlickDeleteTarget.kt:11 — `DeleteKeyFlickDeleteTarget`'s public constructor takes `symbol` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DeleteKeyFlickDeleteTarget` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: GemmaPromptTemplate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/database/GemmaPromptTemplate.kt:16 — `GemmaPromptTemplate`'s public constructor takes `title`, `prompt`, `inputModality`, `taskKind`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GemmaPromptTemplate` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: LearnEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/learning/database/LearnEntity.kt:16 — `LearnEntity`'s public constructor takes `input`, `out` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `LearnEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NgWord app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/database/NgWord.kt:11 — `NgWord`'s public constructor takes `yomi`, `tango` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NgWord` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NgramRuleEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ngram_rule/database/NgramRuleEntity.kt:24 — `NgramRuleEntity`'s public constructor takes `node1Word`, `node2Word`, `node3Word`, `node4Word`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NgramRuleEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: PhysicalKeyboardShortcutItem app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/database/PhysicalKeyboardShortcutItem.kt:16 — `PhysicalKeyboardShortcutItem`'s public constructor takes `context`, `actionId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `PhysicalKeyboardShortcutItem` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: ShortcutItem app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/data/ShortcutItem.kt:7 — `ShortcutItem`'s public constructor takes `typeId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ShortcutItem` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: SumireSpecialKeyActionOverrideEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_special_key/database/SumireSpecialKeyActionOverrideEntity.kt:10 — `SumireSpecialKeyActionOverrideEntity`'s public constructor takes `layoutType`, `inputMode`, `keyId`, `direction`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SumireSpecialKeyActionOverrideEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: SumireSpecialKeyPlacementOverrideEntity app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_special_key/database/SumireSpecialKeyPlacementOverrideEntity.kt:10 — `SumireSpecialKeyPlacementOverrideEntity`'s public constructor takes `layoutType`, `inputMode`, `keyId` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SumireSpecialKeyPlacementOverrideEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: SystemUserDictionaryEntry app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/database/SystemUserDictionaryEntry.kt:15 — `SystemUserDictionaryEntry`'s public constructor takes `yomi`, `tango` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SystemUserDictionaryEntry` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: TextMacro app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/database/TextMacro.kt:14 — `TextMacro`'s public constructor takes `name`, `reading`, `body` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `TextMacro` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: UserWord app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_dictionary/database/UserWord.kt:22 — `UserWord`'s public constructor takes `word`, `reading` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `UserWord` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: UserTemplate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/database/UserTemplate.kt:18 — `UserTemplate`'s public constructor takes `word`, `reading` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `UserTemplate` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: CustomZeroQueryEntry app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/CustomZeroQueryEntry.kt:14 — `CustomZeroQueryEntry`'s public constructor takes `lookupKey`, `displayKey`, `candidate` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `CustomZeroQueryEntry` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×23
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:699 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:699-711 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:745-757 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:699` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1841 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1841-1853 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2339-2351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1841` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:90 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:90-102 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:113-125 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:90` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:676 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:676-688 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:778-790 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:675 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:675-687 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:927-939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:675` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:530 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:530-542 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:544-556 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11564 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11564-11576 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15421-15433 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11564` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15434` calls `d` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11577` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16040 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16040-16052 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16324-16336 — both copies are in the same file, so extract the 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, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16337` calls `handleKeyReleaseFeedback` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16053` 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22055 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22055-22067 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22098-22110 — both copies are in the same file, so extract the 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:35 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:35-47 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:34-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:35` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:873 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:873-885 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:865-877 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:873` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:110 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:110-122 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:110-122 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt: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 (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:203 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:203-215 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:203-215 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:222 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:222-234 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:175-188 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:235` calls `removeCallbacks` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:189` 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2691 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2691-2703 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2861-2873 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2691` it does not close everything it opens, so those exact lines 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1458 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1458-1470 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1848-1860 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1458` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:158 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:158-170 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:437-449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1226 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1226-1238 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1262-1274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixTree.kt:31 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixTree.kt:31-43 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/with_term_id/PrefixTreeWithTermId.kt:34-46 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:351 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:351-363 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:343-355 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:523 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:523-535 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:523-535 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:643 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:643-655 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:701-713 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:643` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:519 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:519-531 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:573-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:519` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×22
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:861 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:861-869 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1347-1354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:861` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1071 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1071-1078 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1106-1113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1071` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:1201 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:1201-1208 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:1235-1242 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:1201` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:511 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:511-518 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:575-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:511` it begins part-way through the construct above it, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:446 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:446-453 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:484-491 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:482` calls `usesFlexiblePlacement` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:444` 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) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1086 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1086-1093 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1115-1122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1086` it does not close everything it opens, so those exact lines 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) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:3507 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:3507-3514 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:3521-3528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:3507` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6547 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6547-6554 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6571-6578 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6571` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:183 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:183-190 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorController.kt:148-155 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:183` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:737 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:737-744 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:437-444 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:769 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:769-776 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:468-475 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2272 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2272-2279 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:895-902 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWavePerformanceGovernor.kt:78 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWavePerformanceGovernor.kt:78-85 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobPerformanceGovernor.kt:87-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputCommand.kt:39 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputCommand.kt:39-46 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputCommand.kt:80-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:260 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:260-267 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:252-259 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:914 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:914-921 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:906-913 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:914` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:627 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:627-634 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:627-634 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:142 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:142-149 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:114-121 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:364 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:364-371 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:473-480 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:364` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:111 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:111-118 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:97-104 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:55 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:55-62 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:55-62 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:174 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:174-181 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortcutAddBottomSheetFragment.kt:152-159 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×21
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:619 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:619-629 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:651-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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:619` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:623 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:623-633 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:752-762 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:623` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15808 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15808-15818 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16151-16161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16588 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16588-16598 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17069-17079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2674 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2674-2684 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:1155-1165 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:180 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:180-190 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:172-182 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:238 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:238-248 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:230-240 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:139 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:139-149 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortcutAddBottomSheetFragment.kt:121-131 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:145 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:145-155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortCutSettingFragment.kt:127-137 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:145` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:528 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:528-538 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:594-604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:528` it does not close everything it opens, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5808 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5808-5818 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6149-6159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5808` 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:176 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:176-186 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:330-340 — before extracting anything, compare `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:176` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:218 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:218-228 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:218-228 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:98 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:98-111 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:188-198 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:98` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2372 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2372-2382 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:957-967 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:530 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:530-540 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:522-532 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:575 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:575-585 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:567-577 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:149 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:149-159 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupViewModel.kt:148-158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:149` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:100 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:100-110 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:103-113 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11465 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11465-11475 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11553-11563 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:175 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:175-185 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:195-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×18
  • Edited copy of a member (10 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:162 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:162-172 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:162-171 — 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/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:212 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:212-222 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:918-927 — 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/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaLayout.kt:142 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaLayout.kt:142-151 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaModels.kt:358-368 — 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/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:556 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:556-573 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:1209-1218 — 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/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:290 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:290-299 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupFragment.kt:240-251 — 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/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:201 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:201-210 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:239-248 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:256 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:256-270 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupFragment.kt:229-238 — 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/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:171 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:171-180 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:178-187 — 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30749 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30749-30758 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30760-30770 — 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/kazumaproject/markdownhelperkeyboard/sumire_special_key/ui/SumireSpecialKeyActionEditorFragment.kt:49 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_special_key/ui/SumireSpecialKeyActionEditorFragment.kt:49-58 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_special_key/ui/SumireSpecialKeyEditorFragment.kt:36-46 — 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/kazumaproject/markdownhelperkeyboard/custom_romaji/database/MapTypeConverter.kt:76 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/MapTypeConverter.kt:76-85 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:407-416 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:187 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:187-213 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:158-167 — 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/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:244 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:244-253 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionarySettingsFragment.kt:390-401 — 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/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:398 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:398-409 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/ui/TextMacroEditorFragment.kt:281-290 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:92 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:92-101 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:835-845 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:340 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:340-349 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:332-341 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3657 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3657-3666 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2707-2716 — 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:151 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:151-160 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:150-159 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×18
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:165 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:165-173 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:188-196 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2435 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2435-2443 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2492-2500 — both copies are in the same file, so extract the 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:37 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:37-45 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:109-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:37` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6965 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6965-6973 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6996-7004 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6995` calls `dismiss` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6964` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:938 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:938-946 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:959-967 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:938` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:543 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:543-551 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:535-543 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:588 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:588-596 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:580-588 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/OtherDictionaryUserWordParser.kt:211 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/OtherDictionaryUserWordParser.kt:211-219 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/SystemUserDictionaryExternalParser.kt:124-132 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:275 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:275-283 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:431-439 — before extracting anything, compare `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:275` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:214 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:214-222 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:919-927 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:214` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2185 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2185-2193 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:822-830 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:250 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:250-258 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:242-250 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:598 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:598-606 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:590-598 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:373 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:373-381 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:482-490 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:69 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:69-77 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:121-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:25 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:25-33 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:31-39 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt` as WHOLE FILES: this scan already matched 5 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `settings` to `LuminousBlobSettings` in one and `SprayPaintSettings` 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:67 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:67-75 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutListFragment.kt:47-55 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoGuideIllumination.kt:11 — core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoGuideIllumination.kt:11-19 | core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoPopupIllumination.kt:13-21 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
DM4 · Rich vs anemic model · Anemic entity · ×17
  • Anemic entity: ClipboardHistoryItem app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/database/ClipboardHistoryItem.kt:13 — `ClipboardHistoryItem` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: CircularFlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CircularFlickMapping.kt:17 — `CircularFlickMapping` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: CustomKeyboardLayout app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:25 — `CustomKeyboardLayout` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: FlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/FlickMapping.kt:21 — `FlickMapping` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: KeyDefinition app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:25 — `KeyDefinition` is an aggregate/entity with 24 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: LongPressFlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/LongPressFlickMapping.kt:21 — `LongPressFlickMapping` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: SpacerDefinition app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:26 — `SpacerDefinition` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: TwoStepFlickMapping app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepFlickMapping.kt:21 — `TwoStepFlickMapping` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: DeleteKeyFlickDeleteTarget app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/database/DeleteKeyFlickDeleteTarget.kt:11 — `DeleteKeyFlickDeleteTarget` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: GemmaPromptTemplate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/database/GemmaPromptTemplate.kt:16 — `GemmaPromptTemplate` is an aggregate/entity with 15 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: NgWord app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/database/NgWord.kt:11 — `NgWord` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: PhysicalKeyboardShortcutItem app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/database/PhysicalKeyboardShortcutItem.kt:16 — `PhysicalKeyboardShortcutItem` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: ShortcutItem app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/data/ShortcutItem.kt:7 — `ShortcutItem` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: TextMacro app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/database/TextMacro.kt:14 — `TextMacro` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: UserWord app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_dictionary/database/UserWord.kt:22 — `UserWord` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: UserTemplate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/database/UserTemplate.kt:18 — `UserTemplate` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
  • Anemic entity: ClickedSymbol symbol_keyboard/src/main/java/com/kazumaproject/data/clicked_symbol/ClickedSymbol.kt:12 — `ClickedSymbol` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×16
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:744 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:744-757 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:999-1012 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:744` it begins part-way through the construct above it, so those 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 (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/mozc/MozcNodeAttributeTableReader.kt:24 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/mozc/MozcNodeAttributeTableReader.kt:24-37 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/mozc/MozcSegmenterDataReader.kt:63-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:232 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:232-245 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:250-263 — both copies are in the same file, so extract the 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:364 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:364-377 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:379-392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5331 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5331-5344 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5428-5441 — both copies are in the same file, so extract the 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30271 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30271-30284 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30325-30338 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:633 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:633-646 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:625-638 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:633` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:751 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:751-764 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:743-756 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_direct_input/KeyboardSizeDirectInputFragment.kt:62 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_direct_input/KeyboardSizeDirectInputFragment.kt:62-75 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortCutSettingFragment.kt:223-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_direct_input/KeyboardSizeDirectInputFragment.kt:62` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:612 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:612-625 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:612-625 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:63 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:63-76 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortcutAddBottomSheetFragment.kt:83-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1094 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1094-1107 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1640-1653 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:609 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:609-622 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:677-690 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) core/src/main/java/com/kazumaproject/core/ui/appcompatbutton/CustomLineHeightSpan.kt:14 — core/src/main/java/com/kazumaproject/core/ui/appcompatbutton/CustomLineHeightSpan.kt:14-27 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CustomLineHeightSpan.kt:14-27 — before extracting anything, compare `core/src/main/java/com/kazumaproject/core/ui/appcompatbutton/CustomLineHeightSpan.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CustomLineHeightSpan.kt` as WHOLE FILES: 95% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/kazumaproject/core/ui/appcompatbutton/CustomLineHeightSpan.kt:14` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4511 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4511-4528 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4531-4544 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4511` 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4047 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4047-4060 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4350-4363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4047` it begins part-way through the construct above it, so those 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 (8 corresponding lines) · ×14
  • Edited copy of a member (8 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt:20 — core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt:20-30 | core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt:67-74 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:45 — core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:45-53 | core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoSkin.kt: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) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:76 — core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:76-83 | core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoSkin.kt:47-57 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:305 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:305-312 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:328-335 — 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/kazumaproject/markdownhelperkeyboard/ngram_rule/ui/NgramRuleFragment.kt:263 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ngram_rule/ui/NgramRuleFragment.kt:263-270 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderFragment.kt:362-373 — 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/kazumaproject/markdownhelperkeyboard/text_macro/ui/TextMacroEditorViewModel.kt:120 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/ui/TextMacroEditorViewModel.kt:120-127 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/ui/TextMacroEditorViewModel.kt:129-137 — 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/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideCandidatePrefilter.kt:78 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideCandidatePrefilter.kt:78-85 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideWordPathScorer.kt:104-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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSettings.kt:71 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSettings.kt:71-79 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSettings.kt:130-137 — 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputCommand.kt:57 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputCommand.kt:57-65 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSettings.kt:151-158 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:128 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:128-136 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:129-136 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3577 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3577-3584 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2595-2604 — 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/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:57 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:57-64 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorController.kt:52-59 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/circular_slot/CircularSlotActionSettingFragment.kt:79 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/circular_slot/CircularSlotActionSettingFragment.kt:79-86 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/qwerty_number_key_flick/QwertyNumberKeyFlickSettingFragment.kt:36-43 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:112 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:112-119 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickCirclePopupView.kt:140-147 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×14
  • Duplicated block (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:590 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:590-607 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:658-675 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:590` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1110 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1110-1127 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1764-1781 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1110` 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, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1783` calls `nanoTime` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1128` 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6730 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6730-6747 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11792-11809 — both copies are in the same file, so extract the 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 (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9199 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9199-9216 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9231-9248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:452 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:452-469 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:520-537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:452` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:767 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:767-784 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:759-776 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3308 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3308-3325 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9504-9521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3308` it begins part-way through the construct above it, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1586 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1586-1603 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1650-1667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1586` it begins part-way through the construct above it, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1649` calls `setTextColor` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1585` 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:655 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:655-672 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:641-658 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:655` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:636` calls `updateCapsLockUI` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:650` 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 (18 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1626 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1626-1643 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1942-1959 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 (18 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1454 — tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1454-1471 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1474-1491 — both copies are in the same file, so extract the 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 (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:542 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:542-559 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:442-459 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:542` it begins part-way through the construct above it, so those exact lines 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) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1240 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1240-1257 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1275-1292 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1240` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:10 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:10-27 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:81-98 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:10` it does not close everything it opens, so those 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×13
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:11 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:11-38 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:40-66 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:314-345 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:355-386 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5921 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5921-5941 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5948-5968 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5975-5995 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6002-6022 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22052 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22052-22086 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22091-22115 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26773-26798 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27650-27667 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29952 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29952-29967 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29971-30019 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30025-30079 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30085-30102 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:251 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:251-260 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:250-259 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:345-354 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:281-290 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:69 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:69-118 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputInjector.kt:56-87 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:68-98 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:76-107 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:317 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:317-369 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:398-442 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:451-510 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:519-578 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:270 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:270-380 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:394-522 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:270-380 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:394-522 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:604 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:604-888 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893-1169 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1173-1473 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1475-1840 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:648 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:648-687 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:644-702 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:630-678 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1149-1218 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4442 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4442-4497 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4499-4549 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4551-4599 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4621-4652 — 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) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:143 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:143-183 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:190-326 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:362-404 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:411-467 — 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) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:285 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:285-321 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:325-361 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:405-441 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:445-481 — 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 · Duplicated block (20 lines × 2) · ×13
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixTree.kt:50 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixTree.kt:50-69 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/with_term_id/PrefixTreeWithTermId.kt:53-72 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5654 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5654-5673 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5780-5799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5701 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5701-5720 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5827-5846 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5701` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12852 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12852-12871 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12879-12898 — both copies are in the same file, so extract the 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 (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23724 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23724-23743 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23830-23849 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31320 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31320-31339 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31362-31381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31320` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2401 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2401-2420 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:986-1005 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2401` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_layout_edit/KeyboardLayoutEditOverlayView.kt:309 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_layout_edit/KeyboardLayoutEditOverlayView.kt:309-328 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_layout_edit/KeyboardLayoutEditOverlayView.kt:331-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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_layout_edit/KeyboardLayoutEditOverlayView.kt:309` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:554 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:554-573 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:546-565 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:159 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:159-178 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:182-201 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:159` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7668 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7668-7687 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8470-8489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7668` it does not close everything it opens, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:315 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:315-334 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:356-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:587 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:587-606 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:610-629 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:587` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×13
  • Duplicated block (19 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15913 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15913-15931 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16817-16835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15913` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23303 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23303-23321 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23418-23436 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23303` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23322` calls `setFirstKeyboardType` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23437` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29693 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29693-29711 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29884-29902 — both copies are in the same file, so extract the 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 (19 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2199 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2199-2217 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:836-854 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:51 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:51-69 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:53-71 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `settings` to `LiquidRippleSettings` in one and `SprayPaintSettings` 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:412 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:412-430 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutListFragment.kt:245-263 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (19 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:489 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:489-507 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:481-499 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:510 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:510-528 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:502-520 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:609 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:609-627 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:601-619 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:89 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:89-107 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:89-107 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:89` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7346 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7346-7364 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8045-8063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7346` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1409 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1409-1427 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3924-3942 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1409` it begins part-way through the construct above it, so those exact lines 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4065 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4065-4083 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4371-4389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4065` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:347 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:347-352 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:432-437 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:368 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:368-373 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:453-458 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt: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 (6 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:524 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:524-529 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:594-599 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:524` it does not close everything it opens, so those exact lines 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/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaLayout.kt:143 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaLayout.kt:143-148 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaModels.kt:360-365 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:2066 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:2066-2072 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:2126-2131 — both copies are in the same file, so extract the 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) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:39 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:39-44 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:91-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt: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 (6 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:146 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:146-151 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:220-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 `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:192 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:192-197 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:216-221 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:192` it does not close everything it opens, so those exact lines 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/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:187 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:187-196 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:236-241 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:187` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:743 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:743-748 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:735-740 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:743` it begins part-way through the construct above it, so those exact lines 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1562 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1562-1567 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1622-1627 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:104 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:104-109 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:122-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) enter-parity-lab/src/main/java/com/kazumaproject/enterparity/CompositionRegressionRunner.java:60 — enter-parity-lab/src/main/java/com/kazumaproject/enterparity/CompositionRegressionRunner.java:60-65 | enter-parity-lab/src/main/java/com/kazumaproject/enterparity/CompositionRegressionRunner.java:76-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×13
  • Duplicated block (5 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/RuntimeGrammarRoles.kt:154 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/RuntimeGrammarRoles.kt:154-158 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/RuntimeGrammarRoles.kt:211-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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/RuntimeGrammarRoles.kt:154` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:489 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:489-493 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:489-493 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:489` it does not close everything it opens, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:221 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:221-226 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/SystemUserDictionaryExternalParser.kt:51-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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:221` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:334 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:334-338 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickCirclePopupView.kt:286-291 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickCirclePopupView.kt:286` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3644 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3644-3648 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2693-2697 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3644` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (5 lines × 2) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1371 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1371-1375 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1011-1019 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 (5 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/MapTypeConverter.kt:70 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/MapTypeConverter.kt:70-74 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:362-366 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2179 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2179-2183 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:816-820 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:432 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:432-436 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:325-329 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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. 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:561 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:561-565 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:461-465 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11911 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11911-11915 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20986-20990 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11911` it does not close everything it opens, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/ClassifiedDictionarySettingsFragment.kt:197 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/ClassifiedDictionarySettingsFragment.kt:197-201 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/DictionaryPreferenceFragment.kt:196-200 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/ClassifiedDictionarySettingsFragment.kt: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.
  • Duplicated block (5 lines × 2) core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:99 — core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:99-103 | core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt: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.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×12
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:592 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:592-607 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:624-639 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:592` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:753 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:753-768 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:797-812 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:753` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:752` calls `grow` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:796` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1266 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1266-1281 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2066-2081 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1266` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6490 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6490-6505 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:147-162 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16081 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16081-16096 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16402-16417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30539 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30539-30554 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30645-30660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30539` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/StringExtenstion.kt:295 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/StringExtenstion.kt:295-310 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/StringExtenstion.kt:316-331 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:626 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:626-641 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:645-660 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:626` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:106 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:106-121 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortCutSettingFragment.kt:92-107 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3853 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3853-3868 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4294-4309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3853` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:290 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:290-305 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:576-591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:290` it does not close everything it opens, so those 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, `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:306` calls `toString` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:592` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19136 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19136-19151 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19159-19174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×11
  • Duplicated block (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:233 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:233-247 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:256-270 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt: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. 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1931 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1931-1945 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1989-2003 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:145 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:145-159 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:183-197 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt` 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:145` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12029 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12029-12043 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12374-12388 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12029` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12373` calls `activateSplitView` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12028` 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 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16572 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16572-16586 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17049-17063 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:70 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:70-84 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:78-92 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt` as WHOLE FILES: this scan already matched 5 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1767 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1767-1781 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2488-2502 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1767` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12459 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12459-12473 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12659-12673 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12459` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:122 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:122-136 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:157-171 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt` 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 (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:269 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:269-283 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:261-275 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:285 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:285-299 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:277-291 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D35 · Change Coupling · Change coupling · ×10
  • Change coupling: KanaKanjiEngine.kt ↔ Qualifiers.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/di/Qualifiers.kt` change together 90% of the time (18 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 18 shared commits counted here, the most recent 3 are `44a214cb` update english dictionary; `347411a4` remove unnecessary variables; `ab52b391` refactor single kanji — run `git show` on any of them.
  • Change coupling: TokenArray.kt ↔ LOUDSWithTermId.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` change together 75% of the time (12 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `34c7696c` improve n gram sysyem dictionary; `70b3a501` reduce cold start; `44250a00` fix memory in dictionary — run `git show` on any of them.
  • Change coupling: Extenstions.kt ↔ KanaKanjiEngine.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `6213159b` refactor kana kanji convert; `656aad14` update dictionaries; `3948285b` update dictionary and sort emoji — run `git show` on any of them.
  • Change coupling: AppCompatButton.kt ↔ GojuonKeyboardView.kt core/src/main/java/com/kazumaproject/core/domain/extensions/AppCompatButton.kt:1 — `core/src/main/java/com/kazumaproject/core/domain/extensions/AppCompatButton.kt` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `a78c2548` add two switch mode in ten keyboard (at that commit the file was still `tabletkey/src/main/java/com/kazumaproject/tabletkey/TabletKeyboardView.kt`); `7d701520` fix layout in English in tablet (at that commit the file was still `tabletkey/src/main/java/com/kazumaproject/tabletkey/TabletKeyboardView.kt`); `9eac9b9f` implement caps lock and shift in tablet english mode (at that commit the file was still `tabletkey/src/main/java/com/kazumaproject/tabletkey/TabletKeyboardView.kt`) — run `git show` on any of them.
  • Change coupling: DataConverterExtensions.kt ↔ KeyboardRepository.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt` change together 67% of the time (12 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `7d27baff` Add configurable editing and modifier keys; `d86376e4` Add cut action to custom keyboard; `ab578936` Add DeleteAfterCursor custom key action — run `git show` on any of them.
  • Change coupling: TenKey.kt ↔ AppCompatButtonExtension.kt tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1 — `tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt` and `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt` change together 65% of the time (15 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 15 shared commits counted here, the most recent 3 are `d435afb5` Fix compact numeric sizing and synchronize settings previews; `cf05b9c8` Apply independent sizing to TenKey punctuation guides; `92a62190` Improve existing keyboard size settings with per-mode key and guide s… — run `git show` on any of them.
  • Change coupling: LOUDS.kt ↔ LOUDSWithTermId.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` change together 65% of the time (13 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `9b29f01f` Centralize LOUDS boundary validation and bump version to 1.7.139; `70b3a501` reduce cold start; `9dfc1e4d` add custom system dictionary builder — run `git show` on any of them.
  • Change coupling: KeyboardDefaultLayouts.kt ↔ FlickCirclePopupView.kt custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1 — `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickCirclePopupView.kt` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `ef8441d2` fix layout in popupview in circle; `8bf4c1fd` fix patal flick popup view; `5b620fc9` add standard flick input — run `git show` on any of them.
  • Change coupling: DataConverterExtensions.kt ↔ KeyEditorFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt` change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `cb21d93c` add image to set special key; `0c6375b7` fix spectial key actions in flick; `8ca62628` custom keyboard move to specific custom keyboard — run `git show` on any of them.
  • Change coupling: Extenstions.kt ↔ SuggestionAdapter.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:1 — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `6213159b` refactor kana kanji convert; `656aad14` update dictionaries; `dc8d59fe` 辞書の更新 — run `git show` on any of them.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×10
  • Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:95 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:95-110 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:113-128 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:130-145 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:158-173 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:176-191 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:229 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:229-264 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:145-163 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:250-283 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:162-197 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:162-194 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:277 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:277-295 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:57-76 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:145-164 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:203-222 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:297-316 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:56 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:56-93 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:50-85 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt:47-75 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:49-79 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt:50-81 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:472 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:472-492 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:354-374 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:352-372 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:450-470 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:384-404 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:500 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:500-537 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:382-419 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:380-417 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:478-515 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:412-449 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:198 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:198-217 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:730-748 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:575-593 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:378-396 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:2079-2097 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:219 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:219-232 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:750-762 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:595-607 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:398-410 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:2099-2111 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1688 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1688-1733 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:789-835 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:783-869 | symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:484-569 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1330-1416 — 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) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:85 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:85-121 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:125-161 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:165-201 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:205-241 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:245-281 — 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 (17 corresponding lines) · ×10
  • Edited copy of a member (17 corresponding lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3638 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3638-3655 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2688-2704 — 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/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:96 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:96-112 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/KeyboardGeometryPreferences.kt:115-131 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:187 — core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:187-205 | core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:321-337 — 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:300 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:300-316 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:352-371 — 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/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryBinaryReader.kt:448 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryBinaryReader.kt:448-465 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryOverrideValidator.kt:72-88 — 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/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixTree.kt:13 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixTree.kt:13-29 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/with_term_id/PrefixTreeWithTermId.kt:14-32 — 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/kazumaproject/markdownhelperkeyboard/repository/CustomZeroQueryRepository.kt:46 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/CustomZeroQueryRepository.kt:46-62 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/ZeroQueryProvider.kt:102-119 — 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:631 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:631-647 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:775-791 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:708 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:708-724 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:700-716 — 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12902 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12902-12921 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12955-12971 — 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 · Duplicated block (12 lines × 2) · ×10
  • Duplicated block (12 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideViewModel.kt:272 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideViewModel.kt:272-283 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/CandidateOrderOverrideRepository.kt:132-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting 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/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:117 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:117-128 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:134-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:266 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:266-277 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:318-329 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/EditableFlickKeyboardView.kt:148 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/EditableFlickKeyboardView.kt:148-159 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:834-847 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/EditableFlickKeyboardView.kt:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CandidatePerfTrace.kt:23 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CandidatePerfTrace.kt:23-34 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CandidatePerfTrace.kt:40-51 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:196 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:196-207 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorController.kt:162-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:196` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3552 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3552-3563 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3626-3637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3552` it does not close everything it opens, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3623` calls `getPointerId` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3549` 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1740 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1740-1751 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2060-2071 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 before the matched lines, `tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2057` calls `dismiss`, `clearLongPressPresentation`, `cancel` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1738` 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:215 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutEditFragment.kt:215-226 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/ui/PhysicalKeyboardShortcutListFragment.kt:168-179 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:509 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:509-520 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:434-445 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×10
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zenz/ZenzaiDraftReview.kt:36 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateViewModel.kt:65 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:97 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:221 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:260 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:274 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryViewModel.kt:64 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/LearnRepository.kt:156 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontStore.kt:72 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontStore.kt:98 — `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.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×9
  • Edited copy of a member (7 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13253 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13253-13259 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_dictionary/FloatingDictionaryController.kt:72-82 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:165 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:165-171 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorSettings.kt:14-20 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:577 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:577-583 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:442-448 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26934 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26934-26940 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26942-26948 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:254 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:254-260 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1909-1915 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideStrokeNormalizer.kt:117 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideStrokeNormalizer.kt:117-123 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideWordPathScorer.kt:133-139 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchFragment.kt:170 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchFragment.kt:170-181 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingHomeFragment.kt:318-324 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateHeightDefaultsFragment.kt:133 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateHeightDefaultsFragment.kt:133-141 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_direct_input/KeyboardSizeDirectInputFragment.kt:164-170 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:95 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:95-101 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:149-156 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×9
  • Duplicated block (23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:69 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:69-91 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt:51-73 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:69` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:358 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:358-380 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:358-380 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:358` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:500 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:500-522 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:500-522 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:500` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4022 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4022-4044 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4325-4347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4022` it does not close everything it opens, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4156 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4156-4178 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4451-4473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4156` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (23 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CrossFlickPopupView.kt:256 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CrossFlickPopupView.kt:256-278 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CrossFlickPopupView.kt:308-330 — both copies are in the same file, so extract the 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 (23 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1688 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1688-1710 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2007-2029 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1688` it does not close everything it opens, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:26 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:26-48 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/tenkey_letter_size_setting/TenKeyCandidateLetterSizeFragment.kt:27-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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:26` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixNode.kt:10 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/PrefixNode.kt:10-32 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/prefix/with_term_id/PrefixNodeWithTermId.kt:19-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×8
  • Edited copy of a member (13 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:512 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:512-524 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:554-569 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:137 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:137-149 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortcutAddBottomSheetFragment.kt:119-131 — 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27123 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27123-27136 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27296-27308 — 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:32036 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:32036-32048 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:32050-32062 — 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30774 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30774-30788 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31001-31013 — 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/kazumaproject/markdownhelperkeyboard/zeroquery/ZeroQueryProvider.kt:157 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/ZeroQueryProvider.kt:157-169 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/ZeroQueryProvider.kt:171-183 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:423 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:423-435 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:415-427 — 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:38 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:38-50 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:56-68 — 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 (4 corresponding lines) · ×8
  • Edited copy of a member (4 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:116 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:116-119 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:203-206 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/enable_keyboard_setting/EnableKeyboardFragment.kt:73 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/enable_keyboard_setting/EnableKeyboardFragment.kt:73-76 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingHomeFragment.kt:460-463 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:45 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:45-48 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:42-45 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:41 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:41-44 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:65-68 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStylePreviewViews.kt:388 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStylePreviewViews.kt:388-391 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:286-289 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideController.kt:52 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideController.kt:52-55 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt:78-81 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:165 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:165-168 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:210-213 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/SystemUserDictionaryExternalParser.kt:134 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/SystemUserDictionaryExternalParser.kt:134-137 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:317-320 — 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 · Duplicated block (17 lines × 2) · ×8
  • Duplicated block (17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13970 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13970-13986 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27144-27160 — both copies are in the same file, so extract the 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 (17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23699 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23699-23715 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23809-23825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23699` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:892 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:892-908 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:884-900 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:410 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:410-426 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:336-352 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:410` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:477 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:477-493 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:517-533 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:477` it does not close everything it opens, so those exact lines 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) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:160 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:160-176 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:188-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:439 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:439-455 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:467-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:439` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:303 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:303-319 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:212-228 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:303` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D6 · Cohesion (LCOM4) · Low cohesion · ×8
  • Low cohesion: FloatingCandidateListAdapter (LCOM4 7) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/FloatingCandidateListAdapter.kt:27 — FloatingCandidateListAdapter's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CupertinoClassicSkin (LCOM4 7) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:23 — CupertinoClassicSkin's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: CupertinoSkin (LCOM4 6) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoSkin.kt:10 — CupertinoSkin's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ClipboardFileStore (LCOM4 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/database/ClipboardFileStore.kt:13 — ClipboardFileStore'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: TokenArray (LCOM4 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:20 — TokenArray'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: FindPath (LCOM4 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:32 — FindPath'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: GemmaHandwritingKeyboardView (LCOM4 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/handwriting/GemmaHandwritingKeyboardView.kt:22 — GemmaHandwritingKeyboardView'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: RomajiKanaConverter (LCOM4 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:8 — RomajiKanaConverter's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×7
  • Edited copy of a member (20 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19135 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19135-19154 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19158-19177 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2222 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2222-2245 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:866-885 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontSettingsViewModel.kt:95 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontSettingsViewModel.kt:95-114 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontSettingsViewModel.kt:137-168 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zenz/runtime/ZenzRuntimeClient.kt:135 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zenz/runtime/ZenzRuntimeClient.kt:135-155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zenz/runtime/ZenzRuntimeClient.kt:176-195 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:234 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:234-253 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:266-285 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/Converter.kt:21 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/Converter.kt:21-40 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/ConverterWithTermId.kt:24-45 — 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) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2324 — tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2324-2343 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2345-2364 — 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 (19 corresponding lines) · ×7
  • Edited copy of a member (19 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStylePreviewViews.kt:215 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStylePreviewViews.kt:215-241 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStylePreviewViews.kt:252-270 — 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/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:210 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:210-234 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/SystemUserDictionaryExternalParser.kt:41-59 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1734 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1734-1752 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2051-2077 — 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/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideWordPathScorer.kt:149 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideWordPathScorer.kt:149-167 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideWordPathScorer.kt:173-191 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1071 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1071-1089 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1091-1109 — 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) symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/ClipboardPagingSource.kt:10 — symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/ClipboardPagingSource.kt:10-28 | symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/SymbolPagingSource.kt:10-28 — 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/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderFragment.kt:280 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderFragment.kt:280-298 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:353-371 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×7
  • Edited copy of a member (21 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:189 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:189-209 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:212-232 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:1198 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:1198-1218 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/GemmaPreferenceFragment.kt:378-403 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:227 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:227-247 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:250-270 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1625 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1625-1645 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1941-1961 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:51 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:51-71 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:51-71 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21218 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21218-21238 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21243-21263 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1603 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1603-1623 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1919-1939 — 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 (15 corresponding lines) · ×7
  • Edited copy of a member (15 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:66 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:66-80 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:158-172 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18956 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18956-18970 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18974-18990 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:615 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:615-629 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:759-773 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:267 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:267-284 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1361-1375 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2473 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2473-2487 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2492-2509 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:726 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:726-740 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:718-732 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:162 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:162-177 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:161-175 — 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.
D15 · Churn × Complexity Hotspots · Repeated repair · ×6
  • Repeated repair: core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt:122 — core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt changed 8 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is SkinGuidePopup.configure at line 122), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix Cupertino Classic long-press and modifier keys”; “Fix Cupertino flick popup presentation”; “fix: align pre-29 split skin popups with IME window”; “fix: keep split flick bubbles aligned at screen edges”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- core/src/main/java/com/kazumaproject/core/ui/skin/SkinGuidePopup.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontRepository.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontRepository.kt:74 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontRepository.kt changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is LocalFontRepository.loadIfNeeded at line 74), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix asynchronous settings loading and per-screen progress”; “fix: skip cursor reads after cancellation”; “fix: close provider resources exactly once”; “fix: address local font review findings”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/LocalFontRepository.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: core/src/main/java/com/kazumaproject/core/domain/listener/QWERTYKeyListener.kt core/src/main/java/com/kazumaproject/core/domain/listener/QWERTYKeyListener.kt:37 — core/src/main/java/com/kazumaproject/core/domain/listener/QWERTYKeyListener.kt changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is QWERTYKeyListener.onCursorFlickQWERTYKey at line 37), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix vertical flicks on QWERTY cursor keys”; “fix: preserve qwerty caps lock across romaji boundaries”; “Fix QWERTY shift state synchronization”; “Fix QWERTY romaji after Caps Lock release”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- core/src/main/java/com/kazumaproject/core/domain/listener/QWERTYKeyListener.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt:15 — core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is SkinPopupWindowCompat.restoreScreenLayout at line 15), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: align pre-29 split skin popups with IME window”; “fix: keep split flick bubbles aligned at screen edges”; “fix: remove hidden PopupWindow API from split skin fallback”; “fix: support Cupertino flick popups in split panels”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupWindowCompat.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFontGlyphDrawable.kt core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFontGlyphDrawable.kt:117 — core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFontGlyphDrawable.kt changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is KeyboardFontGlyphDrawable.drawSizedBrackets at line 117), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix compact numeric sizing and synchronize settings previews”; “Fix inherited TenKey sizing and numeric bracket guides”; “Fix local font cancellation and glyph placement”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFontGlyphDrawable.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CustomToggleInputState.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CustomToggleInputState.kt:22 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CustomToggleInputState.kt changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is CustomToggleInputState.next at line 22), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “Fix custom keyboard toggle input and add kana template”; “fix: honor custom keyboard toggle wait time”; “Fix custom keyboard toggle state handling”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-17..2026-11-15, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-17 22:24:42 -05:00' --until='2026-11-15 22:24:42 -05:00' --full-history --no-merges -- app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/CustomToggleInputState.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×6
  • Edited copy of a member (26 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:182 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:182-207 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorController.kt:147-173 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13964 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13964-13990 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27138-27163 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2535 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2535-2562 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:1062-1087 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:179 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:179-204 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:171-196 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:393 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:393-418 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:286-311 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:466 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:466-494 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:830-855 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×6
  • Edited copy of a member (25 corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:443 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:443-467 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:480-515 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:160 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:160-184 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:183-207 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:99 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:99-131 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupFragment.kt:69-93 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:139 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:139-163 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:145-169 — 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) core/src/main/java/com/kazumaproject/core/domain/extensions/Char.kt:21 — core/src/main/java/com/kazumaproject/core/domain/extensions/Char.kt:21-45 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:476-501 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4941 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4941-4968 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4991-5015 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×6
  • Edited copy of a member (12 corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:306 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:306-317 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:176-187 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:418 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:418-429 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:431-444 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:327 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:327-338 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:319-330 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/candidate/CandidateStripContentResolver.kt:105 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/candidate/CandidateStripContentResolver.kt:105-116 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/candidate/CandidateStripContentResolver.kt:171-183 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28771 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28771-28782 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28787-28798 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:528 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:528-539 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:448-459 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (15–16 lines × 2) · ×6
  • Duplicated block (15–16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:697 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:697-711 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:951-966 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:697` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:967` calls `toInt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:712` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15–16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:91 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:91-106 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:163-177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:333 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:333-347 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:408-423 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:333` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15–16 lines × 2) core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:49 — core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:49-64 | core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:275-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:49` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–16 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5953 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5953-5967 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6306-6321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5953` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15–16 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3557 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3557-3571 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2249-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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3557` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×6
  • Duplicated block (12 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:460 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:460-471 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:698-710 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:744-756 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:460` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (12 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:218 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:218-229 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:599-610 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:533-544 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5743 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5743-5754 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7279-7290 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9225-9236 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5743` it begins part-way through the construct above it, so those exact lines 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6095 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6095-6106 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7629-7640 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7988-7999 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6095` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:289 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:289-300 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:287-298 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:319-330 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9312 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9312-9323 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9324-9335 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9336-9347 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9312` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×5
  • Edited copy of a member (23 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:154 — core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:154-185 | core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:297-319 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:208 — core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:208-232 | core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:255-277 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:80 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:80-102 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:103-125 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14395 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14395-14418 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29076-29098 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:24382 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:24382-24404 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:24428-24459 — 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 (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/keyboard_size/IndependentKeyboardSizePreferences.kt:32 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/keyboard_size/IndependentKeyboardSizePreferences.kt:32-45 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/keyboard_size/KeyboardSurfaceSizePreferences.kt:23-36 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:748 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:748-761 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:766-779 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1445 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1445-1458 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/FlexiblePlacementSolver.kt:312-325 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:83 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAddBottomSheetFragment.kt:83-96 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:52-66 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:191 — core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:191-204 | core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:210-223 — 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 (16 corresponding lines) · ×5
  • Edited copy of a member (16 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:276 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:276-300 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:165-180 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1359 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1359-1374 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyModels.kt:574-591 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21854 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21854-21869 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21873-21888 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/tokenArray/TokenArray.kt:86 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/tokenArray/TokenArray.kt:86-102 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/tokenArray/TokenArray.kt:133-148 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9699 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9699-9714 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9720-9735 — 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) · ×5
  • Edited copy of a member (6 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideSettings.kt:30 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideSettings.kt:30-36 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_dictionary/FloatingDictionaryController.kt:371-376 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:545 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:545-553 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:492-497 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:31 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:31-36 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:46-51 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/media/GemmaImagePickerActivity.kt:90 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/media/GemmaImagePickerActivity.kt:90-98 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/mushroom/MushroomActivity.kt:53-58 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:108 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryViewModel.kt:108-113 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupViewModel.kt:135-141 — 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 (5 corresponding lines) · ×5
  • Edited copy of a member (5 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:62 — core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:62-66 | core/src/main/java/com/kazumaproject/core/ui/skin/FeverSkin.kt:21-25 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputInjector.kt:111 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputInjector.kt:111-115 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:139-143 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/morse/MorseMapCodec.kt:11 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/morse/MorseMapCodec.kt:11-15 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/TextMacroRepository.kt:169-175 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsAdapter.kt:32 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsAdapter.kt:32-36 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsAdapter.kt:33-37 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15168 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15168-15178 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/ModeKeySizing.kt:12-16 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×5
  • Duplicated block (22 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2541 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2541-2562 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:1066-1087 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2541` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:72 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:72-93 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:74-95 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt: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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (22 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:231 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:231-252 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:231-252 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:231` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:191 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:191-212 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:263-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:191` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/ImageEffects.kt:8 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/ImageEffects.kt:8-29 | core/src/main/java/com/kazumaproject/core/ui/effect/Blur.kt:8-29 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/ImageEffects.kt` and `core/src/main/java/com/kazumaproject/core/ui/effect/Blur.kt` 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 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×5
  • Swallowed exception (empty catch) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:409 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:433 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:452 — 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8269 — 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/kazumaproject/markdownhelperkeyboard/converter/english/tokenArray/TokenArray.kt:177 — 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.
AX2 · Stateful singletons · Stateful singleton · ×4
  • Stateful singleton: DictionaryBinaryReader app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryBinaryReader.kt:36 — `DictionaryBinaryReader` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (browsingOnly; e.g. `browsingOnly` in `forBrowsing` at line 43).
  • Stateful singleton: GemmaRuntimeClient app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/runtime/GemmaRuntimeClient.kt:22 — `GemmaRuntimeClient` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (residentConfig, residentBackend; e.g. `residentConfig` in `initializeLocked` at line 110).
  • Stateful singleton: LearnRepository app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/LearnRepository.kt:16 — `LearnRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (conversionRevision; e.g. `conversionRevision` in `invalidateConversionSnapshot` at line 173).
  • Stateful singleton: UserDictionaryRepository app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/UserDictionaryRepository.kt:18 — `UserDictionaryRepository` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (conversionRevision; e.g. `conversionRevision` in `invalidateConversionSnapshot` at line 119).
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×4
  • Edited copy of a member (46 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:1075 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:1075-1120 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/KeyActionMapper.kt:221-267 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:108 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:108-155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitExpressionParser.kt:101-146 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:36 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:36-81 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:217-268 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:105 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:105-155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ShortcutToolbarAdapters.kt:110-155 — 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 (22 corresponding lines) · ×4
  • Edited copy of a member (22 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionaryDisplayState.kt:77 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionaryDisplayState.kt:77-98 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/external_dictionary/ExternalDictionaryDisplayState.kt:100-124 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:405 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:405-426 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:331-352 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:640 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:640-661 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:698-719 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:215 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:215-237 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:169-190 — 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) · ×4
  • Edited copy of a member (18 corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:485 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:485-502 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:410-427 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2735 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2735-2758 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2762-2779 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:872 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:872-889 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:864-881 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/handwriting/GemmaHandwritingKeyboardView.kt:320 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/handwriting/GemmaHandwritingKeyboardView.kt:320-339 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/handwriting/GemmaHandwritingKeyboardView.kt:341-358 — 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 (11 corresponding lines) · ×4
  • Edited copy of a member (11 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:107 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:107-117 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:215-225 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:558 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:558-568 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:230-241 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/KeyboardPopupOverlay.kt:156 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/KeyboardPopupOverlay.kt:156-166 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/PopupWindowAnchorLocation.kt:46-65 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:68 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:68-78 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:83-93 — 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.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×4
  • Duplicated block (24 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1296 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1296-1319 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1350-1373 — both copies are in the same file, so extract the 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 (24 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30919 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30919-30942 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30968-30991 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30919` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:54 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:54-77 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt:56-79 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 56 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:54` 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:302 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:302-325 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:294-317 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Duplicated block (16 lines × 3) · ×4
  • Duplicated block (16 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:144 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:144-160 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:172-187 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:339-354 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (16 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:273 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:273-288 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1919-1934 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1985-2000 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt` as WHOLE FILES: this scan already matched 8 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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:227 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:227-242 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:245-260 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:263-278 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:227` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3568 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3568-3583 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6585-6600 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8037-8052 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3568` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×4
  • Duplicated block (15 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:154 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:154-170 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:316-331 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:455-469 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (15 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20508 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20508-20522 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28426-28440 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28506-28520 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20508` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20523` calls `composeUtilityCandidates` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28441` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23185 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23185-23199 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23302-23316 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23417-23431 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5760 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5760-5774 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7295-7309 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9242-9256 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5760` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×4
  • Duplicated block (10–11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:849 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:849-859 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:1094-1103 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:849` it does not close everything it opens, so those 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26782 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26782-26792 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27655-27664 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27655` it does not close everything it opens, so those 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/FreeFlickKeyPicker.kt:26 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/FreeFlickKeyPicker.kt:26-35 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/FreeFlickKeyboardPreview.kt:63-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1207 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1207-1217 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1476-1485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1207` it does not close everything it opens, so those 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, `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1487` calls `getOutputChar` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1218` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 8) · ×4
  • Duplicated block (7 lines × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:740 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:740-746 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1023-1029 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1328-1334 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3769-3776 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4209-4216 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5654-5661 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7191-7198 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9136-9143 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:740` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3776` calls `Input`, `mapOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:746` 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 × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:749 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:749-755 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1032-1038 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1337-1343 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3777-3783 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4217-4223 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5662-5668 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7199-7205 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9144-9150 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:749` it begins part-way through the construct above it, so those 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 × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:758 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:758-764 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1041-1047 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1346-1352 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3784-3790 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4224-4230 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5669-5675 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7206-7212 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9151-9157 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:758` it begins part-way through the construct above it, so those 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 × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:767 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:767-773 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1050-1056 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1355-1361 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3791-3797 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4231-4237 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5676-5682 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7213-7219 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9158-9164 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:767` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×4
  • Duplicated block (6 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:16 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:16-22 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:44-50 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:318-323 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:359-364 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:70 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:70-75 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputInjector.kt:57-62 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:69-74 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:77-82 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt` as WHOLE FILES: this scan already matched 5 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:87 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:87-92 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt:77-82 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:81-86 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt:83-88 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:94 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:94-99 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt:84-89 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:88-93 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt:90-95 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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.
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: AppPreference.kt → ImePreferencesSnapshot.kt, CandidateHeightLandscapeSettingFragment.kt, CandidateViewHeightSettingFragment.kt, KeyboardThemeFragment.kt, CommonPreferenceFragment.kt, SumirePreferenceFragment.kt, CircularFlickSettingsFragment.kt, FlickKeyboardSizeSettingsFragment.kt, TenKeyCandidateLetterSizeFragment.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/AppPreference.kt` changes together with 9 other files — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SumirePreferenceFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_angle/CircularFlickSettingsFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_key_setting/FlickKeyboardSizeSettingsFragment.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/tenkey_letter_size_setting/TenKeyCandidateLetterSizeFragment.kt` — none of which declares a dependency on it: one file is the hub of 9 separate couplings, not 9 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 9.
  • Change-coupling hub: FlickKeyboardView.kt → CrossFlickPopupView.kt, DirectionalKeyPopupView.kt, FlickCirclePopupView.kt custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt — `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt` changes together with 3 other files — `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CrossFlickPopupView.kt`, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/DirectionalKeyPopupView.kt`, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickCirclePopupView.kt` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: IMEService.kt → Extenstions.kt, DataConverterExtensions.kt, InputTypeExtension.kt, StringExtenstion.kt, UserWordDao.kt, String.kt app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt` changes together with 6 other files — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeExtension.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/StringExtenstion.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_dictionary/database/UserWordDao.kt`, `core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt` — none of which declares a dependency on it: one file is the hub of 6 separate couplings, not 6 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 6.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×3
  • Edited copy of a member (34 corresponding lines) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1224 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1224-1257 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1259-1292 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:622 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:622-655 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:751-786 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:438 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:438-474 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:331-364 — 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 (29 corresponding lines) · ×3
  • Edited copy of a member (29 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:53 — core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:53-90 | core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:93-121 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31415 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31415-31444 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31451-31479 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:537 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:537-565 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:537-565 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 29+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 29+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26218 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26218-26247 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26249-26278 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26283-26311 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 29+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:77 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:77-110 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:127-155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:81-113 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 29+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:94 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:94-122 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:92-126 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:98-127 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 29 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×3
  • Edited copy of a member (33 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:318 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:318-350 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:373-405 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:230 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:230-262 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:230-262 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindowLayout.java:125 — core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindowLayout.java:125-157 | core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindowLayout.java:159-191 — 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 copies of one member (3 members, 18+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 18+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:103 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:103-120 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:100-117 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:102-119 — 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:279 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:279-296 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:125-145 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:147-164 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:591 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:591-612 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:796-817 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:976-993 — 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 copy of a member (9 corresponding lines) · ×3
  • Edited copy of a member (9 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/BackspaceHistoryCoordinator.kt:161 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/BackspaceHistoryCoordinator.kt:161-169 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ForwardDeleteCoordinator.kt:111-127 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:496 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:496-504 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:1072-1080 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_layout_edit/KeyboardLayoutEditState.kt:102 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_layout_edit/KeyboardLayoutEditState.kt:102-110 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_direct_input/KeyboardSizePreferenceAccessor.kt:167-175 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 12+ corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/DirectionalKeyPopupView.kt:229 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/DirectionalKeyPopupView.kt:229-240 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/DirectionalKeyPopupView.kt:247-259 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/DirectionalKeyPopupView.kt:266-277 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2316 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2316-2327 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2683-2694 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2696-2707 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:294 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:294-306 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:318-329 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:331-342 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×3
  • Duplicated block (27 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1985 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1985-2011 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:686-712 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1985` it does not close everything it opens, so those 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 `QuickActionsViewHolder` in one and `EmptyViewHolder` 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 (27 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:174 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:174-200 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:174-200 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:174` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/OtherDictionaryUserWordParser.kt:182 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/OtherDictionaryUserWordParser.kt:182-208 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/SystemUserDictionaryExternalParser.kt:95-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×3
  • Duplicated block (23–24 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:14 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:14-36 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/DicUtils.kt:42-65 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (23–24 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:775 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:775-798 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:1030-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:775` it begins part-way through the construct above it, so those exact lines 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–24 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6347 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6347-6369 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8240-8263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6347` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×3
  • Duplicated block (15–17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:985 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:985-999 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapDetailFragment.kt:67-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:985` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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–17 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:442 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:442-458 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:368-382 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:442` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15–17 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2088 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2088-2102 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2473-2489 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2088` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×3
  • Duplicated block (14 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:295 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:295-308 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:418-431 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:295-308 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:418-431 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:295` 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 × 4) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4007 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4007-4020 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4127-4140 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4217-4230 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4300-4313 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4007` it does not close everything it opens, so those 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, `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4126` calls `setKeysInJapaneseText` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4299` 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 × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:619 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:619-632 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:480-493 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:358-371 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:2057-2070 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:40 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:40-53 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_key_setting/FlickKeyboardSizeSettingsFragment.kt:28-41 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/tenkey_letter_size_setting/TenKeyCandidateLetterSizeFragment.kt:41-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt: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 (14 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3666 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3666-3679 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4127-4141 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4423-4436 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3666` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:163 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:163-176 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:160-173 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:162-175 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×3
  • Duplicated block (9–11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:715 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:715-725 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:903-911 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:715` it does not close everything it opens, so those 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–11 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:495 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:495-503 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:391-401 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:495` it begins part-way through the construct above it, so those exact lines 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–11 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7856 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7856-7864 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9059-9069 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7856` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 4) · ×3
  • Duplicated block (10 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:845 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:845-854 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1127-1136 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1430-1439 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1812-1821 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:845` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:857` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1139` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1426 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1426-1435 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1443-1452 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1808-1817 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1825-1834 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9350 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9350-9359 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9366-9375 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9382-9391 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9398-9407 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9350` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×3
  • Duplicated block (9 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29957 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29957-29965 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30005-30013 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30060-30068 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30090-30098 — 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 (9 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:252 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:252-260 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:251-259 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:346-354 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:282-290 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:507 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:507-515 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1783-1791 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2569-2577 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2572-2580 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×3
  • Duplicated block (8 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:191 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:191-198 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:178-185 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt:169-176 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:172-179 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt:174-181 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:387 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:387-394 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:270-277 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:268-275 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:364-371 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:300-307 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:65 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:65-72 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:74-81 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:64-71 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:73-80 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:65-72 — there are 5 copies across 3 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart.
D5 · Coupling · Off the main sequence · ×3
  • Off the main sequence: MarkdownHelperKeyboard:ai-runtime — MarkdownHelperKeyboard:ai-runtime: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: MarkdownHelperKeyboard:zenz — MarkdownHelperKeyboard:zenz: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: MarkdownHelperKeyboard:core — MarkdownHelperKeyboard:core: abstractness 0.04, instability 0.00, distance 0.96 — zone of pain — concrete and depended on by 7 project(s), so it's rigid to change.
D2 · Cognitive Complexity · LOUDSWithTermId.search (cognitive 17) · ×2
  • LOUDSWithTermId.search (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:610 — LOUDSWithTermId.search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (LOUDSWithTermId.search, LOUDSWithTermId.searchShortArray) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • LOUDSWithTermId.search (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:643 — LOUDSWithTermId.search has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (LOUDSWithTermId.search, LOUDSWithTermId.searchShortArray) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KeyboardFontApplicator.apply (cognitive 17) · ×2
  • KeyboardFontApplicator.apply (cognitive 17) core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:53 — KeyboardFontApplicator.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 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. This shape REPEATS in the file: one other method here (KeyboardFontApplicator.apply) 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.
  • KeyboardFontApplicator.apply (cognitive 17) core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFont.kt:93 — KeyboardFontApplicator.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 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. This shape REPEATS in the file: one other method here (KeyboardFontApplicator.apply) 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.
D4 · Code Duplication · Edited copy of a member (64 corresponding lines) · ×2
  • Edited copy of a member (64 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27814 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27814-27905 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27909-27997 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (64 corresponding lines) core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:25 — core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:25-88 | core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:248-315 — These two members are one piece of code written twice and then edited apart: 64 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (6 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:870 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:870-1338 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1356-1853 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1871-2351 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2369-2834 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2889-2909 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3394-3885 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14386 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14386-14392 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:699-705 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:840-846 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:876-882 | symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:1126-1132 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1504-1510 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (37 corresponding lines) · ×2
  • Edited copy of a member (37 corresponding lines) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:365 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:365-401 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:657-696 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:89 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:89-140 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryGroupFragment.kt:95-131 — 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 (32 corresponding lines) · ×2
  • Edited copy of a member (32 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:182 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:182-222 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ShortcutToolbarAdapters.kt:182-213 — 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1687 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1687-1718 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2006-2037 — 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 (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4655 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4655-4683 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4761-4787 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:632 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:632-658 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:624-650 — 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 (28 corresponding lines) · ×2
  • Edited copy of a member (28 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:71 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:71-98 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:73-100 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:73 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:73-101 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:73-100 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1493 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1493-1516 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1520-1543 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:84 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:84-107 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:84-107 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 14+ corresponding lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:20 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:20-38 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:44-57 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:63-76 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 14+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26886 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26886-26899 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27585-27600 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27602-27619 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 20+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30263 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30263-30290 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30292-30319 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30321-30340 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 20+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:977 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:977-999 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapDetailFragment.kt:64-83 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/qwerty_button_size/QwertyMarginSettingFragment.kt:243-264 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 15+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18134 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18134-18148 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31241-31259 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31263-31277 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/LearnRepository.kt:144 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/LearnRepository.kt:144-159 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryViewModel.kt:53-67 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateViewModel.kt:49-68 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:145 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:145-155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:162-175 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:372-385 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2277 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2277-2288 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2290-2300 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2302-2313 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:298 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:298-304 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:190-196 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:168-174 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UtilityCandidateComposer.kt:147 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UtilityCandidateComposer.kt:147-153 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/ZeroQueryLookupUseCase.kt:34-40 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/ZeroQueryProvider.kt:122-128 — 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 (3 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 13+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:649 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:649-662 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:745-757 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:793-806 — 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:250 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:250-262 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:660-673 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:288-300 — 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 · Duplicated block (51 lines × 2) · ×2
  • Duplicated block (51 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:115 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:115-165 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:107-157 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:115` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (51 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:578 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:578-628 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:512-562 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 183 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (47 lines × 2) · ×2
  • Duplicated block (47 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16471 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16471-16517 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17081-17127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16518` calls `stopDeleteLongPress` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17128` 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 (47 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4010 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4010-4056 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4303-4349 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×2
  • Duplicated block (45 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:272 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:272-316 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1918-1962 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt` as WHOLE FILES: this scan already matched 8 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. If that is what happened, the fix is to keep one copy and have the 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 (45 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:662 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:662-706 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:654-698 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Duplicated block (39 lines × 2) · ×2
  • Duplicated block (39 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12508 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12508-12546 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12710-12748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12508` 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 (39 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:572 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:572-610 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:572-610 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Duplicated block (38 lines × 2) · ×2
  • Duplicated block (38 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16363 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16363-16400 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16848-16885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16363` it begins part-way through the construct above it, so those exact lines 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) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2399 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2399-2436 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2875-2912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2399` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×2
  • Duplicated block (36 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23633 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23633-23668 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23773-23808 — both copies are in the same file, so extract the 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 (36 lines × 2) core/src/main/java/com/kazumaproject/core/domain/extensions/View.kt:27 — core/src/main/java/com/kazumaproject/core/domain/extensions/View.kt:27-62 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/View.kt:26-61 — before extracting anything, compare `core/src/main/java/com/kazumaproject/core/domain/extensions/View.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/View.kt` as WHOLE FILES: 97% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/kazumaproject/core/domain/extensions/View.kt:27` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29 lines × 2) · ×2
  • Duplicated block (29 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2052 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2052-2080 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2539-2567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2052` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (29 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12989 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12989-13017 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13040-13068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12989` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:207 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:207-234 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:199-226 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:843 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:843-870 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:835-862 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Duplicated block (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16445 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16445-16469 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17023-17047 — both copies are in the same file, so extract the 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 (25 lines × 2) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:845 — qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:845-869 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1392-1416 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:845` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×2
  • Duplicated block (16–20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:555 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:555-574 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:626-641 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:555` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16–20 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:639 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:639-658 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:708-723 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 148 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:639` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×2
  • Duplicated block (18–19 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4280 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4280-4297 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4351-4368 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4391-4409 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4280` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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 × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:281 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:281-299 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:457-474 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:381-398 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` 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. If that is what happened, the fix is to keep one copy and have the 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:281` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×2
  • Duplicated block (18 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1138 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1138-1155 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1637-1654 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2067-2084 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1138` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6112 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6112-6129 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7645-7662 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8005-8022 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6112` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–18 lines × 2) · ×2
  • Duplicated block (17–18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4662 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4662-4678 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4766-4783 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4662` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (17–18 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25875 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25875-25891 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25896-25913 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25875` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 5) · ×2
  • Duplicated block (17 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:279 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:279-295 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:60-76 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:148-164 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:206-222 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/popup_style/PopupStyleFragments.kt:300-316 — there are 5 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 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/ui/GemmaPromptTemplateFragment.kt:279` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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 × 5) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1187 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1187-1203 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2447-2463 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7870-7886 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8699-8715 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9075-9091 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1187` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×2
  • Duplicated block (16–17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2229 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2229-2245 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:870-885 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2229` it begins part-way through the construct above it, so those exact lines 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) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:183 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:183-198 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:461-477 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:183` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:144 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:144-158 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:163-177 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:188-202 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:207-221 — 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 (15 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10423 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10423-10437 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23023-23037 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26569-26583 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26917-26931 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10423` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (14 lines × 8) · ×2
  • Duplicated block (14 lines × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:776 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:776-789 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1059-1072 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1364-1377 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3798-3811 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4238-4251 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5683-5696 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7220-7233 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9165-9178 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:776` it begins part-way through the construct above it, so those 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 × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:808 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:808-821 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1091-1104 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1395-1408 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3824-3837 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4266-4279 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5711-5724 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7248-7261 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9193-9206 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:808` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:420 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:420-433 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:435-447 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:420` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21857 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21857-21869 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21875-21888 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21857` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 3) · ×2
  • Duplicated block (12–13 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18135 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18135-18147 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31242-31253 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31264-31276 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–13 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:759 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:759-770 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:741-753 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1287-1299 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:759` it does not close everything it opens, so those 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, `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:737` calls `setDrawableAlpha` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:755` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:571 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:571-583 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1857-1867 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–13 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1388 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1388-1400 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3910-3920 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1388` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12 lines × 4) · ×2
  • Duplicated block (12 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14136 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14136-14147 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22779-22790 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31615-31626 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31633-31644 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14136` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3305 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3305-3316 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6838-6849 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8753-8764 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9501-9512 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3305` 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8767` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6852` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×2
  • Duplicated block (11 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:840 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:840-850 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:857-867 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1122-1132 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1138-1148 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:839` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1121` 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 × 4) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:311 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:311-321 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:351-361 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:431-441 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:471-481 — 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 `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:311` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5297 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5297-5305 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5730-5739 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5297` 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–10 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1725 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1725-1733 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:826-835 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1725` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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.
D4 · Code Duplication · Duplicated block (9 lines × 6) · ×2
  • Duplicated block (9 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1034 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1034-1042 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1533-1541 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2048-2056 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2535-2543 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3080-3088 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3571-3579 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1034` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputInjector.kt:101 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputInjector.kt:101-109 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:120-128 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:130-138 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputInjector.kt:117-125 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:129-137 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:139-147 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt` as WHOLE FILES: this scan already matched 5 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×2
  • Duplicated block (9 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:96 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:96-104 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:114-122 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:131-139 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:159-167 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:177-185 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/Extensions.kt:96` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:36 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:36-44 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputCommandQueue.kt:38-46 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputCommandQueue.kt:36-44 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputCommandQueue.kt:36-44 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputCommandQueue.kt:36-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22056 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22056-22064 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22099-22107 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26779-26787 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22056` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:245 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:245-253 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingCardEditorController.kt:486-494 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ShortcutToolbarAdapters.kt:260-268 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardVisualStyle.kt:36 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardVisualStyle.kt:36-43 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardVisualStyle.kt:45-52 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardVisualStyle.kt:54-61 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardVisualStyle.kt:63-70 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardVisualStyle.kt:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:71 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:71-79 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputCommandQueue.kt:71-78 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputCommandQueue.kt:74-81 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputCommandQueue.kt:74-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:72 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:72-78 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:62-68 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:65-71 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortCutSettingFragment.kt:221-227 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt: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 (7 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1175 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1175-1181 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2435-2441 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7858-7864 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9063-9069 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1175` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:117 — core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:117-121 | core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:173-177 | core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoClassicSkin.kt:278-282 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:168 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:168-172 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:167-171 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:200-204 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt` as WHOLE FILES: this scan already matched 5 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:168` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:83 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:83-90 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:82-89 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:74-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (8 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:930 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:930-937 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:922-929 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/shortcut_toolbar_size/ShortcutToolbarSizeSettingFragment.kt:268-275 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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.
D1 · Cyclomatic Complexity · IMEService.configureFlickKeyboardView (cyclomatic 446) · ×1
  • IMEService.configureFlickKeyboardView (cyclomatic 446) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15731 — IMEService.configureFlickKeyboardView has cyclomatic complexity 446 (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 file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · CharExtensionKt.getNextInputChar (cyclomatic 279) · ×1
  • CharExtensionKt.getNextInputChar (cyclomatic 279) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:3 — CharExtensionKt.getNextInputChar has cyclomatic complexity 279 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · GraphBuilder.constructGraph (cyclomatic 130) · ×1
  • GraphBuilder.constructGraph (cyclomatic 130) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:322 — GraphBuilder.constructGraph has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GojuonKeyboardView.onTouchLegacy (cyclomatic 130) · ×1
  • GojuonKeyboardView.onTouchLegacy (cyclomatic 130) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1109 — GojuonKeyboardView.onTouchLegacy has cyclomatic complexity 130 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.setCurrentInputType (cyclomatic 129) · ×1
  • IMEService.setCurrentInputType (cyclomatic 129) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23178 — IMEService.setCurrentInputType has cyclomatic complexity 129 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.configureQwertyView (cyclomatic 105) · ×1
  • IMEService.configureQwertyView (cyclomatic 105) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25501 — IMEService.configureQwertyView has cyclomatic complexity 105 (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 file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.startScope (cyclomatic 100) · ×1
  • IMEService.startScope (cyclomatic 100) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19530 — IMEService.startScope has cyclomatic complexity 100 (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 file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · KeyboardPreviewView.createSurface (cyclomatic 81) · ×1
  • KeyboardPreviewView.createSurface (cyclomatic 81) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:218 — KeyboardPreviewView.createSurface has cyclomatic complexity 81 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FlickKeyboardView.attachKeyBehavior (cyclomatic 81) · ×1
  • FlickKeyboardView.attachKeyBehavior (cyclomatic 81) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1769 — FlickKeyboardView.attachKeyBehavior has cyclomatic complexity 81 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.updateKeyboardLayout (cyclomatic 66) · ×1
  • IMEService.updateKeyboardLayout (cyclomatic 66) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20926 — IMEService.updateKeyboardLayout has cyclomatic complexity 66 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · TenKey.setFlickInActionMove (cyclomatic 62) · ×1
  • TenKey.setFlickInActionMove (cyclomatic 62) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2763 — TenKey.setFlickInActionMove has cyclomatic complexity 62 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.show (cyclomatic 61) · ×1
  • FeverEffectView.show (cyclomatic 61) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:164 — FeverEffectView.show has cyclomatic complexity 61 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createHiraganaToggleLayout (cyclomatic 61) · ×1
  • KeyboardDefaultLayouts.createHiraganaToggleLayout (cyclomatic 61) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5032 — KeyboardDefaultLayouts.createHiraganaToggleLayout has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createHiraganaFlickLayout, KeyboardDefaultLayouts.createHiraganaEffectiveLayout) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createHiraganaFlickLayout (cyclomatic 61) · ×1
  • KeyboardDefaultLayouts.createHiraganaFlickLayout (cyclomatic 61) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6574 — KeyboardDefaultLayouts.createHiraganaFlickLayout has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createHiraganaToggleLayout, KeyboardDefaultLayouts.createHiraganaEffectiveLayout) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createHiraganaEffectiveLayout (cyclomatic 61) · ×1
  • KeyboardDefaultLayouts.createHiraganaEffectiveLayout (cyclomatic 61) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8467 — KeyboardDefaultLayouts.createHiraganaEffectiveLayout has cyclomatic complexity 61 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createHiraganaToggleLayout, KeyboardDefaultLayouts.createHiraganaFlickLayout) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.onTouchEvent (cyclomatic 58) · ×1
  • QWERTYKeyboardView.onTouchEvent (cyclomatic 58) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1667 — QWERTYKeyboardView.onTouchEvent has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.handleTapAndFlick (cyclomatic 53) · ×1
  • IMEService.handleTapAndFlick (cyclomatic 53) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12446 — IMEService.handleTapAndFlick has cyclomatic complexity 53 (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: one other method here (IMEService.handleTapAndFlickFloating) 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. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleTapAndFlickFloating (cyclomatic 53) · ×1
  • IMEService.handleTapAndFlickFloating (cyclomatic 53) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12646 — IMEService.handleTapAndFlickFloating has cyclomatic complexity 53 (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: one other method here (IMEService.handleTapAndFlick) 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. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · MorseKeyboardView.rebuildControls (cyclomatic 53) · ×1
  • MorseKeyboardView.rebuildControls (cyclomatic 53) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseKeyboardView.kt:159 — MorseKeyboardView.rebuildControls has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createSymbolToggleLayout (cyclomatic 52) · ×1
  • KeyboardDefaultLayouts.createSymbolToggleLayout (cyclomatic 52) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6131 — KeyboardDefaultLayouts.createSymbolToggleLayout has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createNumberEffectiveLayout) 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.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createSymbolFlickLayout (cyclomatic 52) · ×1
  • KeyboardDefaultLayouts.createSymbolFlickLayout (cyclomatic 52) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8025 — KeyboardDefaultLayouts.createSymbolFlickLayout has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createNumberEffectiveLayout (cyclomatic 52) · ×1
  • KeyboardDefaultLayouts.createNumberEffectiveLayout (cyclomatic 52) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9273 — KeyboardDefaultLayouts.createNumberEffectiveLayout has cyclomatic complexity 52 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createSymbolToggleLayout) 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.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createEnglishToggleLayout (cyclomatic 49) · ×1
  • KeyboardDefaultLayouts.createEnglishToggleLayout (cyclomatic 49) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5790 — KeyboardDefaultLayouts.createEnglishToggleLayout has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createEnglishFlickLayout (cyclomatic 49) · ×1
  • KeyboardDefaultLayouts.createEnglishFlickLayout (cyclomatic 49) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7326 — KeyboardDefaultLayouts.createEnglishFlickLayout has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createEnglishFlickLayoutEffective) 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.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createEnglishFlickLayoutEffective (cyclomatic 49) · ×1
  • KeyboardDefaultLayouts.createEnglishFlickLayoutEffective (cyclomatic 49) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7665 — KeyboardDefaultLayouts.createEnglishFlickLayoutEffective has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createEnglishFlickLayout) 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.
D1 · Cyclomatic Complexity · TenKey.onTouchLegacy (cyclomatic 49) · ×1
  • TenKey.onTouchLegacy (cyclomatic 49) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1655 — TenKey.onTouchLegacy has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FindPath.backwardAStarWithBunsetsu (cyclomatic 46) · ×1
  • FindPath.backwardAStarWithBunsetsu (cyclomatic 46) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1700 — FindPath.backwardAStarWithBunsetsu has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GojuonKeyboardView.setFlickInActionMove (cyclomatic 46) · ×1
  • GojuonKeyboardView.setFlickInActionMove (cyclomatic 46) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3718 — GojuonKeyboardView.setFlickInActionMove has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: GojuonKeyboardView.setKeyPressed (cyclomatic 71) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · SimpleFormulaParser.parseIdentifier (cyclomatic 41) · ×1
  • SimpleFormulaParser.parseIdentifier (cyclomatic 41) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:344 — SimpleFormulaParser.parseIdentifier has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: SimpleFormulaParser.simpleIdentifierSymbol (cyclomatic 89) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KeyEditorFragment.onDone (cyclomatic 41) · ×1
  • KeyEditorFragment.onDone (cyclomatic 41) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1879 — KeyEditorFragment.onDone has cyclomatic complexity 41 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CommonPreferenceFragment.onPreferencesReady (cyclomatic 40) · ×1
  • CommonPreferenceFragment.onPreferencesReady (cyclomatic 40) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:411 — CommonPreferenceFragment.onPreferencesReady has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EnglishEngine.getCandidates (cyclomatic 39) · ×1
  • EnglishEngine.getCandidates (cyclomatic 39) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:587 — EnglishEngine.getCandidates has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CandidateLabelPresentationKt.candidateLabelPresentation (cyclomatic 39) · ×1
  • CandidateLabelPresentationKt.candidateLabelPresentation (cyclomatic 39) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateLabelPresentation.kt:22 — CandidateLabelPresentationKt.candidateLabelPresentation has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.applyTopRightCharsJP (cyclomatic 38) · ×1
  • QWERTYKeyboardView.applyTopRightCharsJP (cyclomatic 38) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1224 — QWERTYKeyboardView.applyTopRightCharsJP has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.applyTopRightCharsEN (cyclomatic 38) · ×1
  • QWERTYKeyboardView.applyTopRightCharsEN (cyclomatic 38) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1259 — QWERTYKeyboardView.applyTopRightCharsEN has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.updateFloatingKeyboardSizeForMode (cyclomatic 36) · ×1
  • IMEService.updateFloatingKeyboardSizeForMode (cyclomatic 36) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11882 — IMEService.updateFloatingKeyboardSizeForMode has cyclomatic complexity 36 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.setSuggestionRecyclerView (cyclomatic 36) · ×1
  • IMEService.setSuggestionRecyclerView (cyclomatic 36) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23629 — IMEService.setSuggestionRecyclerView 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · PopupMapEditorCanvas.onTouchEvent (cyclomatic 36) · ×1
  • PopupMapEditorCanvas.onTouchEvent (cyclomatic 36) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt:171 — PopupMapEditorCanvas.onTouchEvent 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.
D1 · Cyclomatic Complexity · FlickKeyboardView.handleKeyboardTouchEvent (cyclomatic 36) · ×1
  • FlickKeyboardView.handleKeyboardTouchEvent (cyclomatic 36) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3477 — FlickKeyboardView.handleKeyboardTouchEvent 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.
D1 · Cyclomatic Complexity · CustomSymbolKeyboardView.buildCategoryTabs (cyclomatic 36) · ×1
  • CustomSymbolKeyboardView.buildCategoryTabs (cyclomatic 36) symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:750 — CustomSymbolKeyboardView.buildCategoryTabs has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · IMEService.onStartInputView (cyclomatic 35) · ×1
  • IMEService.onStartInputView (cyclomatic 35) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6582 — IMEService.onStartInputView has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · Evaluator.evaluateFunction (cyclomatic 34) · ×1
  • Evaluator.evaluateFunction (cyclomatic 34) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:364 — Evaluator.evaluateFunction has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KeyEditorFragment.setupUIListeners (cyclomatic 34) · ×1
  • KeyEditorFragment.setupUIListeners (cyclomatic 34) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:345 — KeyEditorFragment.setupUIListeners has cyclomatic complexity 34 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SizeHandles.onTouchEvent (cyclomatic 33) · ×1
  • SizeHandles.onTouchEvent (cyclomatic 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_geometry/UnifiedKeyboardSettingsFragment.kt:763 — SizeHandles.onTouchEvent has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PopupBoundsSnapper.constrain (cyclomatic 33) · ×1
  • PopupBoundsSnapper.constrain (cyclomatic 33) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/PopupBoundsSnapper.kt:56 — PopupBoundsSnapper.constrain has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClassifiedExactCandidates.mergeCandidates (cyclomatic 32) · ×1
  • ClassifiedExactCandidates.mergeCandidates (cyclomatic 32) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/ClassifiedExactCandidates.kt:49 — ClassifiedExactCandidates.mergeCandidates has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.updateSuggestionViewVisibility (cyclomatic 32) · ×1
  • IMEService.updateSuggestionViewVisibility (cyclomatic 32) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21619 — IMEService.updateSuggestionViewVisibility has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · CursorMovement.move (cyclomatic 32) · ×1
  • CursorMovement.move (cyclomatic 32) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/CursorMovement.kt:64 — CursorMovement.move has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IMEService.refreshGeometryCandidates (cyclomatic 31) · ×1
  • IMEService.refreshGeometryCandidates (cyclomatic 31) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20763 — IMEService.refreshGeometryCandidates has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · SuggestionAdapter.applyVerticalCandidate (cyclomatic 31) · ×1
  • SuggestionAdapter.applyVerticalCandidate (cyclomatic 31) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1609 — SuggestionAdapter.applyVerticalCandidate has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KanaKanjiEngine.getCandidatesOriginal (cyclomatic 30) · ×1
  • KanaKanjiEngine.getCandidatesOriginal (cyclomatic 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:854 — KanaKanjiEngine.getCandidatesOriginal has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginalWithBunsetsu, KanaKanjiEngine.getCandidatesWithoutPrediction, KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu) 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.
D1 · Cyclomatic Complexity · KanaKanjiEngine.getCandidatesOriginalWithBunsetsu (cyclomatic 30) · ×1
  • KanaKanjiEngine.getCandidatesOriginalWithBunsetsu (cyclomatic 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1340 — KanaKanjiEngine.getCandidatesOriginalWithBunsetsu has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginal, KanaKanjiEngine.getCandidatesWithoutPrediction, KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu) 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.
D1 · Cyclomatic Complexity · KanaKanjiEngine.getCandidatesWithoutPrediction (cyclomatic 30) · ×1
  • KanaKanjiEngine.getCandidatesWithoutPrediction (cyclomatic 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2911 — KanaKanjiEngine.getCandidatesWithoutPrediction has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginal, KanaKanjiEngine.getCandidatesOriginalWithBunsetsu, KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu) 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.
D1 · Cyclomatic Complexity · KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu (cyclomatic 30) · ×1
  • KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu (cyclomatic 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3379 — KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginal, KanaKanjiEngine.getCandidatesOriginalWithBunsetsu, KanaKanjiEngine.getCandidatesWithoutPrediction) 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.
D1 · Cyclomatic Complexity · PhraseConverter.lattice (cyclomatic 30) · ×1
  • PhraseConverter.lattice (cyclomatic 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt:203 — PhraseConverter.lattice has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.handleSpaceKeyClickInQWERTY (cyclomatic 30) · ×1
  • IMEService.handleSpaceKeyClickInQWERTY (cyclomatic 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29719 — IMEService.handleSpaceKeyClickInQWERTY 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · KeyEditorFragment.updateDoneButtonState (cyclomatic 29) · ×1
  • KeyEditorFragment.updateDoneButtonState (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1179 — KeyEditorFragment.updateDoneButtonState has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.showListPopup (cyclomatic 29) · ×1
  • IMEService.showListPopup (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14171 — IMEService.showListPopup 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.showResolvedKeyboard (cyclomatic 29) · ×1
  • IMEService.showResolvedKeyboard (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14815 — IMEService.showResolvedKeyboard 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.applyKeyboardLayoutParameters (cyclomatic 29) · ×1
  • IMEService.applyKeyboardLayoutParameters (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21279 — IMEService.applyKeyboardLayoutParameters has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.setKeyboardHeightWithAdditionalOriginal (cyclomatic 29) · ×1
  • IMEService.setKeyboardHeightWithAdditionalOriginal (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21397 — IMEService.setKeyboardHeightWithAdditionalOriginal has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ComposingGuideWindow.refresh (cyclomatic 29) · ×1
  • ComposingGuideWindow.refresh (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt:96 — ComposingGuideWindow.refresh has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.emit (cyclomatic 29) · ×1
  • FeverEffectView.emit (cyclomatic 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:128 — FeverEffectView.emit has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardViewGeometry.apply (cyclomatic 29) · ×1
  • KeyboardViewGeometry.apply (cyclomatic 29) core/src/main/java/com/kazumaproject/core/ui/geometry/KeyboardViewGeometry.kt:49 — KeyboardViewGeometry.apply has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MatrixRunner.onStart (cyclomatic 29) · ×1
  • MatrixRunner.onStart (cyclomatic 29) enter-parity-lab/src/main/java/com/kazumaproject/enterparity/MatrixRunner.java:22 — MatrixRunner.onStart has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ExtenstionsKt.addingStringToListForCommonPrefix (cyclomatic 28) · ×1
  • ExtenstionsKt.addingStringToListForCommonPrefix (cyclomatic 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:131 — ExtenstionsKt.addingStringToListForCommonPrefix has cyclomatic complexity 28 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EnglishPhraseDictionary.phrases (cyclomatic 28) · ×1
  • EnglishPhraseDictionary.phrases (cyclomatic 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt:86 — EnglishPhraseDictionary.phrases has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyEditorFragment.setupInitialState (cyclomatic 28) · ×1
  • KeyEditorFragment.setupInitialState (cyclomatic 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1280 — KeyEditorFragment.setupInitialState has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CandidateCharacterPresentationKt.candidateCharacterRanges (cyclomatic 28) · ×1
  • CandidateCharacterPresentationKt.candidateCharacterRanges (cyclomatic 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateCharacterPresentation.kt:18 — CandidateCharacterPresentationKt.candidateCharacterRanges has cyclomatic complexity 28 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MorseEngine.pressed (cyclomatic 28) · ×1
  • MorseEngine.pressed (cyclomatic 28) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseEngine.kt:35 — MorseEngine.pressed has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.tryHandleFlickAt (cyclomatic 28) · ×1
  • QWERTYKeyboardView.tryHandleFlickAt (cyclomatic 28) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2708 — QWERTYKeyboardView.tryHandleFlickAt has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.executePhysicalKeyboardShortcutAction (cyclomatic 27) · ×1
  • IMEService.executePhysicalKeyboardShortcutAction (cyclomatic 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9338 — IMEService.executePhysicalKeyboardShortcutAction has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · NumberExtenstionKt.parseJapaneseNumberValue (cyclomatic 27) · ×1
  • NumberExtenstionKt.parseJapaneseNumberValue (cyclomatic 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/NumberExtenstion.kt:68 — NumberExtenstionKt.parseJapaneseNumberValue has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.drawCandidateEnergy (cyclomatic 27) · ×1
  • FeverEffectView.drawCandidateEnergy (cyclomatic 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:335 — FeverEffectView.drawCandidateEnergy has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MorseGuide.setMap (cyclomatic 27) · ×1
  • MorseGuide.setMap (cyclomatic 27) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseGuide.kt:16 — MorseGuide.setMap has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CustomSymbolKeyboardView.updateSymbolsForCategory (cyclomatic 27) · ×1
  • CustomSymbolKeyboardView.updateSymbolsForCategory (cyclomatic 27) symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:903 — CustomSymbolKeyboardView.updateSymbolsForCategory has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KanaKanjiEngine.getCandidatesWithBunsetsuSeparation (cyclomatic 26) · ×1
  • KanaKanjiEngine.getCandidatesWithBunsetsuSeparation (cyclomatic 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1855 — KanaKanjiEngine.getCandidatesWithBunsetsuSeparation has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (KanaKanjiEngine.getCandidates) 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.
D1 · Cyclomatic Complexity · KanaKanjiEngine.getCandidates (cyclomatic 26) · ×1
  • KanaKanjiEngine.getCandidates (cyclomatic 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2353 — KanaKanjiEngine.getCandidates has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (KanaKanjiEngine.getCandidatesWithBunsetsuSeparation) 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.
D1 · Cyclomatic Complexity · IMEService.startSplitKeyboard (cyclomatic 26) · ×1
  • IMEService.startSplitKeyboard (cyclomatic 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3116 — IMEService.startSplitKeyboard has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · KeyboardSizeLandscapeFragment.bindResizeHandle (cyclomatic 26) · ×1
  • KeyboardSizeLandscapeFragment.bindResizeHandle (cyclomatic 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:394 — KeyboardSizeLandscapeFragment.bindResizeHandle has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardSettingFragment.bindResizeHandle (cyclomatic 26) · ×1
  • KeyboardSettingFragment.bindResizeHandle (cyclomatic 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:394 — KeyboardSettingFragment.bindResizeHandle has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PopupMapEditorFragment.onCreateView (cyclomatic 26) · ×1
  • PopupMapEditorFragment.onCreateView (cyclomatic 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:65 — PopupMapEditorFragment.onCreateView has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createFinalLayout (cyclomatic 26) · ×1
  • KeyboardDefaultLayouts.createFinalLayout (cyclomatic 26) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:169 — KeyboardDefaultLayouts.createFinalLayout has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FindPath.collectBunsetsuSplitPatterns (cyclomatic 25) · ×1
  • FindPath.collectBunsetsuSplitPatterns (cyclomatic 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2398 — FindPath.collectBunsetsuSplitPatterns has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.processInputString (cyclomatic 25) · ×1
  • IMEService.processInputString (cyclomatic 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21890 — IMEService.processInputString has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · InkTouchDispatchFrameLayout.dispatchKeyboardTouchEvent (cyclomatic 25) · ×1
  • InkTouchDispatchFrameLayout.dispatchKeyboardTouchEvent (cyclomatic 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/InkTouchDispatchFrameLayout.kt:65 — InkTouchDispatchFrameLayout.dispatchKeyboardTouchEvent has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RomajiKanaConverter.handleResolvedUnicode (cyclomatic 25) · ×1
  • RomajiKanaConverter.handleResolvedUnicode (cyclomatic 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:173 — RomajiKanaConverter.handleResolvedUnicode has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardThemeFragment.syncSearchAvailability (cyclomatic 25) · ×1
  • KeyboardThemeFragment.syncSearchAvailability (cyclomatic 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt:553 — KeyboardThemeFragment.syncSearchAvailability has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CompositionRegressionRunner.onStart (cyclomatic 25) · ×1
  • CompositionRegressionRunner.onStart (cyclomatic 25) enter-parity-lab/src/main/java/com/kazumaproject/enterparity/CompositionRegressionRunner.java:18 — CompositionRegressionRunner.onStart has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FindPath.backwardAStar (cyclomatic 24) · ×1
  • FindPath.backwardAStar (cyclomatic 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1094 — FindPath.backwardAStar has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlickGridEditorView.onDraw (cyclomatic 24) · ×1
  • FlickGridEditorView.onDraw (cyclomatic 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:164 — FlickGridEditorView.onDraw has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BackspaceHistoryCoordinator.enqueue (cyclomatic 24) · ×1
  • BackspaceHistoryCoordinator.enqueue (cyclomatic 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/BackspaceHistoryCoordinator.kt:71 — BackspaceHistoryCoordinator.enqueue has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.onKeyDown (cyclomatic 24) · ×1
  • IMEService.onKeyDown (cyclomatic 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9003 — IMEService.onKeyDown has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · PhraseConverter.convert (cyclomatic 23) · ×1
  • PhraseConverter.convert (cyclomatic 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt:82 — PhraseConverter.convert has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.configureMorseView (cyclomatic 23) · ×1
  • IMEService.configureMorseView (cyclomatic 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12221 — IMEService.configureMorseView has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.switchNextKeyboard (cyclomatic 23) · ×1
  • IMEService.switchNextKeyboard (cyclomatic 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31162 — IMEService.switchNextKeyboard has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · SuggestionAdapter.styleFloatingItem (cyclomatic 23) · ×1
  • SuggestionAdapter.styleFloatingItem (cyclomatic 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1741 — SuggestionAdapter.styleFloatingItem has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.drawParticles (cyclomatic 23) · ×1
  • FeverEffectView.drawParticles (cyclomatic 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:496 — FeverEffectView.drawParticles has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TextMacroCompiler.compile (cyclomatic 23) · ×1
  • TextMacroCompiler.compile (cyclomatic 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/TextMacroCompiler.kt:149 — TextMacroCompiler.compile has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyWindows.initPath (cyclomatic 23) · ×1
  • KeyWindows.initPath (cyclomatic 23) core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:89 — KeyWindows.initPath has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SimpleFormulaParser.parsePrimary (cyclomatic 22) · ×1
  • SimpleFormulaParser.parsePrimary (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:293 — SimpleFormulaParser.parsePrimary 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. This is NOT this file's highest cyclomatic complexity: SimpleFormulaParser.simpleIdentifierSymbol (cyclomatic 89) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · IMEService.syncSplitPresentation (cyclomatic 22) · ×1
  • IMEService.syncSplitPresentation (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3352 — IMEService.syncSplitPresentation has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleJapaneseCharacterKeyFloating (cyclomatic 22) · ×1
  • IMEService.handleJapaneseCharacterKeyFloating (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9770 — IMEService.handleJapaneseCharacterKeyFloating 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.renderKeyboardMode (cyclomatic 22) · ×1
  • IMEService.renderKeyboardMode (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10717 — IMEService.renderKeyboardMode has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · FloatingPanelFrame.renderChrome (cyclomatic 22) · ×1
  • FloatingPanelFrame.renderChrome (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/FloatingPanelFrame.kt:131 — FloatingPanelFrame.renderChrome has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FeverController.position (cyclomatic 22) · ×1
  • FeverController.position (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverController.kt:134 — FeverController.position has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FeverFeedback.playEvent (cyclomatic 22) · ×1
  • FeverFeedback.playEvent (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverFeedback.kt:52 — FeverFeedback.playEvent has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CursorInputSynchronization.verify (cyclomatic 22) · ×1
  • CursorInputSynchronization.verify (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/CursorInputSynchronization.kt:85 — CursorInputSynchronization.verify has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GeometryCandidateHost.show (cyclomatic 22) · ×1
  • GeometryCandidateHost.show (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/GeometryCandidateHost.kt:149 — GeometryCandidateHost.show has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PopupMapEditorFragment.refresh (cyclomatic 22) · ×1
  • PopupMapEditorFragment.refresh (cyclomatic 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:228 — PopupMapEditorFragment.refresh has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CustomAngleFlickController.handleTouchEvent (cyclomatic 22) · ×1
  • CustomAngleFlickController.handleTouchEvent (cyclomatic 22) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt:209 — CustomAngleFlickController.handleTouchEvent has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.showKeyPreview (cyclomatic 22) · ×1
  • QWERTYKeyboardView.showKeyPreview (cyclomatic 22) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2840 — QWERTYKeyboardView.showKeyPreview has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · UtilityCandidateComposer.compose (cyclomatic 21) · ×1
  • UtilityCandidateComposer.compose (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UtilityCandidateComposer.kt:13 — UtilityCandidateComposer.compose has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · IMEService.queueCursorMove (cyclomatic 21) · ×1
  • IMEService.queueCursorMove (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3920 — IMEService.queueCursorMove 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleSoftwareSpecialAction (cyclomatic 21) · ×1
  • IMEService.handleSoftwareSpecialAction (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17217 — IMEService.handleSoftwareSpecialAction has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.setCandidatesOriginal (cyclomatic 21) · ×1
  • IMEService.setCandidatesOriginal (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28310 — IMEService.setCandidatesOriginal 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · CandidateSurfaceHost.refreshAppearance (cyclomatic 21) · ×1
  • CandidateSurfaceHost.refreshAppearance (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/CandidateSurfaceHost.kt:115 — CandidateSurfaceHost.refreshAppearance has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.onDraw (cyclomatic 21) · ×1
  • FeverEffectView.onDraw (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:247 — FeverEffectView.onDraw has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardSizeLandscapeFragment.setupMoveHandle (cyclomatic 21) · ×1
  • KeyboardSizeLandscapeFragment.setupMoveHandle (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:270 — KeyboardSizeLandscapeFragment.setupMoveHandle has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardSettingFragment.setupMoveHandle (cyclomatic 21) · ×1
  • KeyboardSettingFragment.setupMoveHandle (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:270 — KeyboardSettingFragment.setupMoveHandle has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SettingSearchIndex.legacyRelatedKeys (cyclomatic 21) · ×1
  • SettingSearchIndex.legacyRelatedKeys (cyclomatic 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:623 — SettingSearchIndex.legacyRelatedKeys has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.handleQwertyGlideTouchEvent (cyclomatic 21) · ×1
  • QWERTYKeyboardView.handleQwertyGlideTouchEvent (cyclomatic 21) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1905 — QWERTYKeyboardView.handleQwertyGlideTouchEvent has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhraseGrammar.forEachNounPhrase (cyclomatic 20) · ×1
  • PhraseGrammar.forEachNounPhrase (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt:211 — PhraseGrammar.forEachNounPhrase has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyEditorFragment.showEditorForMode (cyclomatic 20) · ×1
  • KeyEditorFragment.showEditorForMode (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:802 — KeyEditorFragment.showEditorForMode has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyboardEditorFragment.updateUi (cyclomatic 20) · ×1
  • KeyboardEditorFragment.updateUi (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorFragment.kt:310 — KeyboardEditorFragment.updateUi has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FloatingCandidatePanel.refresh (cyclomatic 20) · ×1
  • FloatingCandidatePanel.refresh (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:106 — FloatingCandidatePanel.refresh has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IMEService.setCandidates (cyclomatic 20) · ×1
  • IMEService.setCandidates (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28212 — IMEService.setCandidates 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.deleteLongPress (cyclomatic 20) · ×1
  • IMEService.deleteLongPress (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29349 — IMEService.deleteLongPress 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · InputTypeExtensionKt.getTextRelatedInputType (cyclomatic 20) · ×1
  • InputTypeExtensionKt.getTextRelatedInputType (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeExtension.kt:46 — InputTypeExtensionKt.getTextRelatedInputType has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KeyboardPreviewView.reload (cyclomatic 20) · ×1
  • KeyboardPreviewView.reload (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:131 — KeyboardPreviewView.reload has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DictionaryBrowserFragment.onViewCreated (cyclomatic 20) · ×1
  • DictionaryBrowserFragment.onViewCreated (cyclomatic 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_browser/DictionaryBrowserFragment.kt:37 — DictionaryBrowserFragment.onViewCreated has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FeverKeyDrawable.draw (cyclomatic 20) · ×1
  • FeverKeyDrawable.draw (cyclomatic 20) core/src/main/java/com/kazumaproject/core/ui/skin/FeverKeyPulse.kt:79 — FeverKeyDrawable.draw has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CustomAngleFlickPopupView.onDraw (cyclomatic 20) · ×1
  • CustomAngleFlickPopupView.onDraw (cyclomatic 20) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:196 — CustomAngleFlickPopupView.onDraw has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MorseKeyboardView.applyAppearance (cyclomatic 20) · ×1
  • MorseKeyboardView.applyAppearance (cyclomatic 20) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseKeyboardView.kt:524 — MorseKeyboardView.applyAppearance has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · run_floating_panel_matrix.main (cyclomatic 20) · ×1
  • run_floating_panel_matrix.main (cyclomatic 20) REDACTED:15 — run_floating_panel_matrix.main has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Lexer.tokenize (cyclomatic 19) · ×1
  • Lexer.tokenize (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:71 — Lexer.tokenize has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Lexer.readNumber (cyclomatic 19) · ×1
  • Lexer.readNumber (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:108 — Lexer.readNumber has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnitExpressionParser.readNumber (cyclomatic 19) · ×1
  • UnitExpressionParser.readNumber (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitExpressionParser.kt:101 — UnitExpressionParser.readNumber has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlickGridEditorView.getActiveArrows (cyclomatic 19) · ×1
  • FlickGridEditorView.getActiveArrows (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:339 — FlickGridEditorView.getActiveArrows has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ForwardDeleteCoordinator.enqueue (cyclomatic 19) · ×1
  • ForwardDeleteCoordinator.enqueue (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ForwardDeleteCoordinator.kt:52 — ForwardDeleteCoordinator.enqueue has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · IMEService.onUpdateSelection (cyclomatic 19) · ×1
  • IMEService.onUpdateSelection (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8859 — IMEService.onUpdateSelection 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.createNewKeyboardLayoutForSumire (cyclomatic 19) · ×1
  • IMEService.createNewKeyboardLayoutForSumire (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15072 — IMEService.createNewKeyboardLayoutForSumire has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.requiresOriginalInputProtectionDelay (cyclomatic 19) · ×1
  • IMEService.requiresOriginalInputProtectionDelay (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22236 — IMEService.requiresOriginalInputProtectionDelay has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.setMainSuggestionColumn (cyclomatic 19) · ×1
  • IMEService.setMainSuggestionColumn (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23918 — IMEService.setMainSuggestionColumn has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.setCandidatesWithoutPrediction (cyclomatic 19) · ×1
  • IMEService.setCandidatesWithoutPrediction (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28409 — IMEService.setCandidatesWithoutPrediction 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · PopupShapeEditorView.onTouchEvent (cyclomatic 19) · ×1
  • PopupShapeEditorView.onTouchEvent (cyclomatic 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupShapeEditorView.kt:135 — PopupShapeEditorView.onTouchEvent has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GojuonKeyboardView.setFlickActionPointerDown (cyclomatic 19) · ×1
  • GojuonKeyboardView.setFlickActionPointerDown (cyclomatic 19) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3891 — GojuonKeyboardView.setFlickActionPointerDown 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. This is NOT this file's highest cyclomatic complexity: GojuonKeyboardView.setKeyPressed (cyclomatic 71) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · MorseGlyphView.onDraw (cyclomatic 19) · ×1
  • MorseGlyphView.onDraw (cyclomatic 19) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseGlyphView.kt:58 — MorseGlyphView.onDraw has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UnitExpressionParser.parse (cyclomatic 18) · ×1
  • UnitExpressionParser.parse (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitExpressionParser.kt:26 — UnitExpressionParser.parse has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KeyEditorFragment.handleInputStyleUi (cyclomatic 18) · ×1
  • KeyEditorFragment.handleInputStyleUi (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:630 — KeyEditorFragment.handleInputStyleUi has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DictionarySourceResolver.resolveCategoryLoadState (cyclomatic 18) · ×1
  • DictionarySourceResolver.resolveCategoryLoadState (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionarySourceResolver.kt:116 — DictionarySourceResolver.resolveCategoryLoadState has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IMEService.setupKeyboardView (cyclomatic 18) · ×1
  • IMEService.setupKeyboardView (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8550 — IMEService.setupKeyboardView has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.dispatchMorseCommand (cyclomatic 18) · ×1
  • IMEService.dispatchMorseCommand (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12321 — IMEService.dispatchMorseCommand has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleLongPress (cyclomatic 18) · ×1
  • IMEService.handleLongPress (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12973 — IMEService.handleLongPress 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.shouldApplyZenzLiveResultToComposingText (cyclomatic 18) · ×1
  • IMEService.shouldApplyZenzLiveResultToComposingText (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18846 — IMEService.shouldApplyZenzLiveResultToComposingText has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleForceSpaceOrConvert (cyclomatic 18) · ×1
  • IMEService.handleForceSpaceOrConvert (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29859 — IMEService.handleForceSpaceOrConvert 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · KeyboardCornerRoundingKt.applyClassicKeyboardCornerRounding (cyclomatic 18) · ×1
  • KeyboardCornerRoundingKt.applyClassicKeyboardCornerRounding (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/KeyboardCornerRounding.kt:7 — KeyboardCornerRoundingKt.applyClassicKeyboardCornerRounding has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · CandidateRubyAnnotationsKt.alignSegment (cyclomatic 18) · ×1
  • CandidateRubyAnnotationsKt.alignSegment (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateRubyAnnotations.kt:44 — CandidateRubyAnnotationsKt.alignSegment has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FloatingCursorController.refresh (cyclomatic 18) · ×1
  • FloatingCursorController.refresh (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorController.kt:70 — FloatingCursorController.refresh has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SideCandidateFlowLayoutManager.scrollMetrics (cyclomatic 18) · ×1
  • SideCandidateFlowLayoutManager.scrollMetrics (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/GeometryCandidateHost.kt:55 — SideCandidateFlowLayoutManager.scrollMetrics has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SplitKeyboardPresentationKt.renderSplitKeyboardPresentation (cyclomatic 18) · ×1
  • SplitKeyboardPresentationKt.renderSplitKeyboardPresentation (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/split_keyboard/SplitKeyboardPresentation.kt:57 — SplitKeyboardPresentationKt.renderSplitKeyboardPresentation has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AiVoiceInputController.start (cyclomatic 18) · ×1
  • AiVoiceInputController.start (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/voice_input/AiVoiceInputController.kt:81 — AiVoiceInputController.start has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SfntFontValidator.validate (cyclomatic 18) · ×1
  • SfntFontValidator.validate (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/local_font/SfntFontValidator.kt:49 — SfntFontValidator.validate has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FlickKeyboardSizeSettingsFragment.onViewCreated (cyclomatic 18) · ×1
  • FlickKeyboardSizeSettingsFragment.onViewCreated (cyclomatic 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_key_setting/FlickKeyboardSizeSettingsFragment.kt:24 — FlickKeyboardSizeSettingsFragment.onViewCreated has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PopupMapValidator.conflicts (cyclomatic 18) · ×1
  • PopupMapValidator.conflicts (cyclomatic 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/PopupMap.kt:73 — PopupMapValidator.conflicts has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createEnglishLayoutToggle (cyclomatic 18) · ×1
  • KeyboardDefaultLayouts.createEnglishLayoutToggle (cyclomatic 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1842 — KeyboardDefaultLayouts.createEnglishLayoutToggle 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. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createEnglishLayoutFlick, KeyboardDefaultLayouts.createEnglishLayoutFlickEffective) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: KeyboardDefaultLayouts.stableSpecialKeyBaseId (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createEnglishLayoutFlick (cyclomatic 18) · ×1
  • KeyboardDefaultLayouts.createEnglishLayoutFlick (cyclomatic 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2133 — KeyboardDefaultLayouts.createEnglishLayoutFlick 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. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createEnglishLayoutToggle, KeyboardDefaultLayouts.createEnglishLayoutFlickEffective) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: KeyboardDefaultLayouts.stableSpecialKeyBaseId (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · KeyboardDefaultLayouts.createEnglishLayoutFlickEffective (cyclomatic 18) · ×1
  • KeyboardDefaultLayouts.createEnglishLayoutFlickEffective (cyclomatic 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2432 — KeyboardDefaultLayouts.createEnglishLayoutFlickEffective 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. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createEnglishLayoutToggle, KeyboardDefaultLayouts.createEnglishLayoutFlick) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: KeyboardDefaultLayouts.stableSpecialKeyBaseId (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · FlickKeyboardView.onIndependentCursorTouchEvent (cyclomatic 18) · ×1
  • FlickKeyboardView.onIndependentCursorTouchEvent (cyclomatic 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3725 — FlickKeyboardView.onIndependentCursorTouchEvent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlickKeyboardView.onIndependentTouchEvent (cyclomatic 18) · ×1
  • FlickKeyboardView.onIndependentTouchEvent (cyclomatic 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3770 — FlickKeyboardView.onIndependentTouchEvent has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MorseGlyphView.sharedIcon (cyclomatic 18) · ×1
  • MorseGlyphView.sharedIcon (cyclomatic 18) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseGlyphView.kt:15 — MorseGlyphView.sharedIcon has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · QWERTYKeyboardView.onLayout (cyclomatic 18) · ×1
  • QWERTYKeyboardView.onLayout (cyclomatic 18) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:198 — QWERTYKeyboardView.onLayout has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AppCompatButtonExtensionKt.setTenKeyTextNumber (cyclomatic 18) · ×1
  • AppCompatButtonExtensionKt.setTenKeyTextNumber (cyclomatic 18) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:406 — AppCompatButtonExtensionKt.setTenKeyTextNumber has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ExactInputCandidatePromoter.promote (cyclomatic 17) · ×1
  • ExactInputCandidatePromoter.promote (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/candidate/ExactInputCandidatePromotionPolicy.kt:17 — ExactInputCandidatePromoter.promote has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GemmaFloatingWindow.refresh (cyclomatic 17) · ×1
  • GemmaFloatingWindow.refresh (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:80 — GemmaFloatingWindow.refresh has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GemmaHandwritingController.recognize (cyclomatic 17) · ×1
  • GemmaHandwritingController.recognize (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/handwriting/GemmaHandwritingController.kt:161 — GemmaHandwritingController.recognize has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IMEService.applyImePreferences (cyclomatic 17) · ×1
  • IMEService.applyImePreferences (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:4676 — IMEService.applyImePreferences 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.applyCandidateAppearance (cyclomatic 17) · ×1
  • IMEService.applyCandidateAppearance (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8371 — IMEService.applyCandidateAppearance 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleConversionKeyFloating (cyclomatic 17) · ×1
  • IMEService.handleConversionKeyFloating (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9483 — IMEService.handleConversionKeyFloating 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.handleLongPressFloating (cyclomatic 17) · ×1
  • IMEService.handleLongPressFloating (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13026 — IMEService.handleLongPressFloating has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.showNgWordRegistrationPopup (cyclomatic 17) · ×1
  • IMEService.showNgWordRegistrationPopup (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13404 — IMEService.showNgWordRegistrationPopup 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. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · EnglishVerbForms.suggest (cyclomatic 17) · ×1
  • EnglishVerbForms.suggest (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/english/EnglishGrammarCorrection.kt:13 — EnglishVerbForms.suggest has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · FeverEffectView.drawInputLayers (cyclomatic 17) · ×1
  • FeverEffectView.drawInputLayers (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:546 — FeverEffectView.drawInputLayers has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RomajiKanaConverter.hiraganaToRomaji (cyclomatic 17) · ×1
  • RomajiKanaConverter.hiraganaToRomaji (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:54 — RomajiKanaConverter.hiraganaToRomaji 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. This is NOT this file's highest cyclomatic complexity: RomajiKanaConverter.legacyRomajiUnicode (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · GojuonSizeSettingsFragment.onViewCreated (cyclomatic 17) · ×1
  • GojuonSizeSettingsFragment.onViewCreated (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:23 — GojuonSizeSettingsFragment.onViewCreated has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PopupMapEditorFragment.showProperties (cyclomatic 17) · ×1
  • PopupMapEditorFragment.showProperties (cyclomatic 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:326 — PopupMapEditorFragment.showProperties has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SkinPopupPlacement.show (cyclomatic 17) · ×1
  • SkinPopupPlacement.show (cyclomatic 17) core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupPlacement.kt:55 — SkinPopupPlacement.show has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlickKeyboardView.findNearestKeyTarget (cyclomatic 17) · ×1
  • FlickKeyboardView.findNearestKeyTarget (cyclomatic 17) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3324 — FlickKeyboardView.findNearestKeyTarget has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MorseEngine.nextElement (cyclomatic 17) · ×1
  • MorseEngine.nextElement (cyclomatic 17) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseEngine.kt:92 — MorseEngine.nextElement has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TenKey.applyModeLetterSize (cyclomatic 17) · ×1
  • TenKey.applyModeLetterSize (cyclomatic 17) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2374 — TenKey.applyModeLetterSize has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PhraseGrammar.predicate (cyclomatic 16) · ×1
  • PhraseGrammar.predicate (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt:136 — PhraseGrammar.predicate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PackedSystemNgramDictionary.matches (cyclomatic 16) · ×1
  • PackedSystemNgramDictionary.matches (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:84 — PackedSystemNgramDictionary.matches has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UnitRegistry.resolveAmbiguity (cyclomatic 16) · ×1
  • UnitRegistry.resolveAmbiguity (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitRegistry.kt:101 — UnitRegistry.resolveAmbiguity has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · InsertionTargetMapper.mapPointer (cyclomatic 16) · ×1
  • InsertionTargetMapper.mapPointer (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/InsertionTargetMapper.kt:10 — InsertionTargetMapper.mapPointer has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · GemmaRuntimeClient.generateLocked (cyclomatic 16) · ×1
  • GemmaRuntimeClient.generateLocked (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/runtime/GemmaRuntimeClient.kt:211 — GemmaRuntimeClient.generateLocked has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · IMEService.onCustomKeyboardLayoutsChanged (cyclomatic 16) · ×1
  • IMEService.onCustomKeyboardLayoutsChanged (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15476 — IMEService.onCustomKeyboardLayoutsChanged 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 is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.scheduleExpandedSideCandidateFirstRow (cyclomatic 16) · ×1
  • IMEService.scheduleExpandedSideCandidateFirstRow (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21745 — IMEService.scheduleExpandedSideCandidateFirstRow has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · IMEService.sendCharTap (cyclomatic 16) · ×1
  • IMEService.sendCharTap (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30914 — IMEService.sendCharTap 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 is NOT this file's highest cyclomatic complexity: IMEService.handleJapaneseKeyDown (cyclomatic 48) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score. This file is where this pass's cyclomatic complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 49 of the 207 methods over the threshold — including the worst — and 1168 of the 3517 points over it (33%), 3.1× the next-largest file (custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt at 371). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · ImePreferencesSnapshot.from (cyclomatic 16) · ×1
  • ImePreferencesSnapshot.from (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ImePreferencesSnapshot.kt:347 — ImePreferencesSnapshot.from has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · EditorEnterPolicy.label (cyclomatic 16) · ×1
  • EditorEnterPolicy.label (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/editor/EditorEnterPolicy.kt:51 — EditorEnterPolicy.label has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.drawAward (cyclomatic 16) · ×1
  • FeverEffectView.drawAward (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:386 — FeverEffectView.drawAward has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FeverEffectView.drawOrnaments (cyclomatic 16) · ×1
  • FeverEffectView.drawOrnaments (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:580 — FeverEffectView.drawOrnaments has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MapAdapter.onBindViewHolder (cyclomatic 16) · ×1
  • MapAdapter.onBindViewHolder (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/morse/MorseMapListFragment.kt:163 — MapAdapter.onBindViewHolder has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KeyboardRepository.findMoveToCustomKeyboardReferences (cyclomatic 16) · ×1
  • KeyboardRepository.findMoveToCustomKeyboardReferences (cyclomatic 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:579 — KeyboardRepository.findMoveToCustomKeyboardReferences 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 is NOT this file's highest cyclomatic complexity: KeyboardRepository.drawableResIdForAction (cyclomatic 42) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · GojuonKeyboardView.setTapInActionMove (cyclomatic 16) · ×1
  • GojuonKeyboardView.setTapInActionMove (cyclomatic 16) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3668 — GojuonKeyboardView.setTapInActionMove 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 is NOT this file's highest cyclomatic complexity: GojuonKeyboardView.setKeyPressed (cyclomatic 71) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · TenKey.onLongPressed (cyclomatic 16) · ×1
  • TenKey.onLongPressed (cyclomatic 16) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2624 — TenKey.onLongPressed has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TenKey.setTapInActionMove (cyclomatic 16) · ×1
  • TenKey.setTapInActionMove (cyclomatic 16) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2719 — TenKey.setTapInActionMove has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · IMEService.configureFlickKeyboardView (cognitive 354) · ×1
  • IMEService.configureFlickKeyboardView (cognitive 354) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15731 — IMEService.configureFlickKeyboardView has cognitive complexity 354 (threshold 15). Drivers by points: if/else 177 (330 pts), match/switch 11 (17 pts), boolean chains 7 (nesting depth added 159). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · GraphBuilder.constructGraph (cognitive 326) · ×1
  • GraphBuilder.constructGraph (cognitive 326) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:322 — GraphBuilder.constructGraph has cognitive complexity 326 (threshold 15). Drivers by points: if/else 102 (236 pts), loops 13 (33 pts), match/switch 7 (31 pts), boolean chains 26 (nesting depth added 178). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GojuonKeyboardView.onTouchLegacy (cognitive 321) · ×1
  • GojuonKeyboardView.onTouchLegacy (cognitive 321) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1109 — GojuonKeyboardView.onTouchLegacy has cognitive complexity 321 (threshold 15). Drivers by points: if/else 71 (252 pts), match/switch 9 (46 pts), boolean chains 23 (nesting depth added 218). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IMEService.configureQwertyView (cognitive 174) · ×1
  • IMEService.configureQwertyView (cognitive 174) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25501 — IMEService.configureQwertyView has cognitive complexity 174 (threshold 15). Drivers by points: if/else 94 (160 pts), boolean chains 7, match/switch 4 (7 pts) (nesting depth added 69). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · TenKey.setFlickInActionMove (cognitive 141) · ×1
  • TenKey.setFlickInActionMove (cognitive 141) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2763 — TenKey.setFlickInActionMove has cognitive complexity 141 (threshold 15). Drivers by points: if/else 47 (121 pts), match/switch 7 (18 pts), boolean chains 2 (nesting depth added 85). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CharExtensionKt.getNextInputChar (cognitive 141) · ×1
  • CharExtensionKt.getNextInputChar (cognitive 141) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:3 — CharExtensionKt.getNextInputChar has cognitive complexity 141 (threshold 15). Drivers by points: boolean chains 139, if/else 1, match/switch 1. The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · IMEService.startScope (cognitive 136) · ×1
  • IMEService.startScope (cognitive 136) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19530 — IMEService.startScope has cognitive complexity 136 (threshold 15). Drivers by points: if/else 53 (84 pts), boolean chains 28, match/switch 9 (18 pts), error handling 4 (6 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyboardPreviewView.createSurface (cognitive 125) · ×1
  • KeyboardPreviewView.createSurface (cognitive 125) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:218 — KeyboardPreviewView.createSurface has cognitive complexity 125 (threshold 15). Drivers by points: if/else 78 (100 pts), boolean chains 18, match/switch 5 (6 pts), loops 1 (nesting depth added 23). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FlickKeyboardView.attachKeyBehavior (cognitive 123) · ×1
  • FlickKeyboardView.attachKeyBehavior (cognitive 123) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1769 — FlickKeyboardView.attachKeyBehavior has cognitive complexity 123 (threshold 15). Drivers by points: if/else 50 (90 pts), match/switch 13 (27 pts), boolean chains 6 (nesting depth added 54). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TenKey.onTouchLegacy (cognitive 112) · ×1
  • TenKey.onTouchLegacy (cognitive 112) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1655 — TenKey.onTouchLegacy has cognitive complexity 112 (threshold 15). Drivers by points: if/else 33 (96 pts), match/switch 3 (9 pts), boolean chains 7 (nesting depth added 69). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · QWERTYKeyboardView.onTouchEvent (cognitive 109) · ×1
  • QWERTYKeyboardView.onTouchEvent (cognitive 109) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1667 — QWERTYKeyboardView.onTouchEvent has cognitive complexity 109 (threshold 15). Drivers by points: if/else 33 (83 pts), boolean chains 14, loops 3 (9 pts), match/switch 2 (3 pts) (nesting depth added 57). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.updateKeyboardLayout (cognitive 98) · ×1
  • IMEService.updateKeyboardLayout (cognitive 98) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20926 — IMEService.updateKeyboardLayout has cognitive complexity 98 (threshold 15). Drivers by points: if/else 64 (74 pts), boolean chains 19, match/switch 5 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FeverEffectView.show (cognitive 98) · ×1
  • FeverEffectView.show (cognitive 98) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:164 — FeverEffectView.show has cognitive complexity 98 (threshold 15). Drivers by points: if/else 58 (85 pts), match/switch 4 (7 pts), boolean chains 5, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindPath.backwardAStarWithBunsetsu (cognitive 96) · ×1
  • FindPath.backwardAStarWithBunsetsu (cognitive 96) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1700 — FindPath.backwardAStarWithBunsetsu has cognitive complexity 96 (threshold 15). Drivers by points: if/else 43 (74 pts), boolean chains 13, loops 3 (9 pts) (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GojuonKeyboardView.setFlickInActionMove (cognitive 93) · ×1
  • GojuonKeyboardView.setFlickInActionMove (cognitive 93) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3718 — GojuonKeyboardView.setFlickInActionMove has cognitive complexity 93 (threshold 15). Drivers by points: if/else 29 (75 pts), match/switch 6 (16 pts), boolean chains 2 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.handleTapAndFlick (cognitive 90) · ×1
  • IMEService.handleTapAndFlick (cognitive 90) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12446 — IMEService.handleTapAndFlick has cognitive complexity 90 (threshold 15). Drivers by points: if/else 40 (75 pts), match/switch 4 (9 pts), boolean chains 6 (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 (IMEService.handleTapAndFlickFloating) 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleTapAndFlickFloating (cognitive 90) · ×1
  • IMEService.handleTapAndFlickFloating (cognitive 90) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12646 — IMEService.handleTapAndFlickFloating has cognitive complexity 90 (threshold 15). Drivers by points: if/else 40 (75 pts), match/switch 4 (9 pts), boolean chains 6 (nesting depth added 40). To reduce it, split the body into named stages: move each independent 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 (IMEService.handleTapAndFlick) 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyEditorFragment.onDone (cognitive 85) · ×1
  • KeyEditorFragment.onDone (cognitive 85) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1879 — KeyEditorFragment.onDone has cognitive complexity 85 (threshold 15). Drivers by points: if/else 42 (74 pts), boolean chains 10, match/switch 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.handleSpaceKeyClickInQWERTY (cognitive 81) · ×1
  • IMEService.handleSpaceKeyClickInQWERTY (cognitive 81) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29719 — IMEService.handleSpaceKeyClickInQWERTY has cognitive complexity 81 (threshold 15). Drivers by points: if/else 33 (73 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · PopupBoundsSnapper.constrain (cognitive 75) · ×1
  • PopupBoundsSnapper.constrain (cognitive 75) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/PopupBoundsSnapper.kt:56 — PopupBoundsSnapper.constrain has cognitive complexity 75 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 6 (16 pts), boolean chains 10 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MorseKeyboardView.rebuildControls (cognitive 75) · ×1
  • MorseKeyboardView.rebuildControls (cognitive 75) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseKeyboardView.kt:159 — MorseKeyboardView.rebuildControls has cognitive complexity 75 (threshold 15). Drivers by points: if/else 44 (60 pts), boolean chains 9, match/switch 4 (6 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.
D2 · Cognitive Complexity · PhraseConverter.lattice (cognitive 74) · ×1
  • PhraseConverter.lattice (cognitive 74) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt:203 — PhraseConverter.lattice has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (51 pts), loops 4 (12 pts), boolean chains 11 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopupMapEditorCanvas.onTouchEvent (cognitive 72) · ×1
  • PopupMapEditorCanvas.onTouchEvent (cognitive 72) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt:171 — PopupMapEditorCanvas.onTouchEvent has cognitive complexity 72 (threshold 15). Drivers by points: if/else 32 (60 pts), boolean chains 6, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnglishEngine.getCandidates (cognitive 69) · ×1
  • EnglishEngine.getCandidates (cognitive 69) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:587 — EnglishEngine.getCandidates has cognitive complexity 69 (threshold 15). Drivers by points: if/else 31 (46 pts), boolean chains 11, match/switch 3 (7 pts), loops 3 (5 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindPath.collectBunsetsuSplitPatterns (cognitive 67) · ×1
  • FindPath.collectBunsetsuSplitPatterns (cognitive 67) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2398 — FindPath.collectBunsetsuSplitPatterns has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (59 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 39). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ClassifiedExactCandidates.mergeCandidates (cognitive 61) · ×1
  • ClassifiedExactCandidates.mergeCandidates (cognitive 61) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/ClassifiedExactCandidates.kt:49 — ClassifiedExactCandidates.mergeCandidates has cognitive complexity 61 (threshold 15). Drivers by points: if/else 22 (45 pts), boolean chains 11, loops 4 (5 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.onStartInputView (cognitive 60) · ×1
  • IMEService.onStartInputView (cognitive 60) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6582 — IMEService.onStartInputView has cognitive complexity 60 (threshold 15). Drivers by points: if/else 38 (52 pts), match/switch 4 (6 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FlickKeyboardView.handleKeyboardTouchEvent (cognitive 60) · ×1
  • FlickKeyboardView.handleKeyboardTouchEvent (cognitive 60) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3477 — FlickKeyboardView.handleKeyboardTouchEvent has cognitive complexity 60 (threshold 15). Drivers by points: if/else 25 (50 pts), boolean chains 5, match/switch 2 (3 pts), loops 1 (2 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.setKeyboardHeightWithAdditionalOriginal (cognitive 54) · ×1
  • IMEService.setKeyboardHeightWithAdditionalOriginal (cognitive 54) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21397 — IMEService.setKeyboardHeightWithAdditionalOriginal has cognitive complexity 54 (threshold 15). Drivers by points: if/else 42 (47 pts), boolean chains 4, match/switch 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FlickGridEditorView.onDraw (cognitive 53) · ×1
  • FlickGridEditorView.onDraw (cognitive 53) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:164 — FlickGridEditorView.onDraw has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (36 pts), match/switch 2 (8 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomSymbolKeyboardView.updateSymbolsForCategory (cognitive 53) · ×1
  • CustomSymbolKeyboardView.updateSymbolsForCategory (cognitive 53) symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:903 — CustomSymbolKeyboardView.updateSymbolsForCategory has cognitive complexity 53 (threshold 15). Drivers by points: if/else 22 (40 pts), match/switch 5 (9 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnglishPhraseDictionary.phrases (cognitive 52) · ×1
  • EnglishPhraseDictionary.phrases (cognitive 52) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt:86 — EnglishPhraseDictionary.phrases has cognitive complexity 52 (threshold 15). Drivers by points: if/else 27 (42 pts), boolean chains 7, loops 2 (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.
D2 · Cognitive Complexity · IMEService.processInputString (cognitive 52) · ×1
  • IMEService.processInputString (cognitive 52) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21890 — IMEService.processInputString has cognitive complexity 52 (threshold 15). Drivers by points: if/else 26 (44 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleForceSpaceOrConvert (cognitive 51) · ×1
  • IMEService.handleForceSpaceOrConvert (cognitive 51) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29859 — IMEService.handleForceSpaceOrConvert has cognitive complexity 51 (threshold 15). Drivers by points: if/else 21 (42 pts), match/switch 3 (9 pts) (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · TextMacroCompiler.compile (cognitive 50) · ×1
  • TextMacroCompiler.compile (cognitive 50) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/TextMacroCompiler.kt:149 — TextMacroCompiler.compile has cognitive complexity 50 (threshold 15). Drivers by points: if/else 16 (37 pts), match/switch 2 (5 pts), error handling 1 (4 pts), boolean chains 3, loops 1 (nesting depth added 27). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createEnglishLayoutToggle (cognitive 50) · ×1
  • KeyboardDefaultLayouts.createEnglishLayoutToggle (cognitive 50) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1842 — KeyboardDefaultLayouts.createEnglishLayoutToggle has cognitive complexity 50 (threshold 15). Drivers by points: if/else 34 (50 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. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createEnglishLayoutFlick, KeyboardDefaultLayouts.createEnglishLayoutFlickEffective) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createEnglishLayoutFlick (cognitive 50) · ×1
  • KeyboardDefaultLayouts.createEnglishLayoutFlick (cognitive 50) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2133 — KeyboardDefaultLayouts.createEnglishLayoutFlick has cognitive complexity 50 (threshold 15). Drivers by points: if/else 34 (50 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. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createEnglishLayoutToggle, KeyboardDefaultLayouts.createEnglishLayoutFlickEffective) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createEnglishLayoutFlickEffective (cognitive 50) · ×1
  • KeyboardDefaultLayouts.createEnglishLayoutFlickEffective (cognitive 50) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2432 — KeyboardDefaultLayouts.createEnglishLayoutFlickEffective has cognitive complexity 50 (threshold 15). Drivers by points: if/else 34 (50 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. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createEnglishLayoutToggle, KeyboardDefaultLayouts.createEnglishLayoutFlick) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PhraseConverter.convert (cognitive 49) · ×1
  • PhraseConverter.convert (cognitive 49) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseConverter.kt:82 — PhraseConverter.convert has cognitive complexity 49 (threshold 15). Drivers by points: if/else 16 (31 pts), loops 4 (10 pts), boolean chains 8 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MatrixRunner.onStart (cognitive 49) · ×1
  • MatrixRunner.onStart (cognitive 49) enter-parity-lab/src/main/java/com/kazumaproject/enterparity/MatrixRunner.java:22 — MatrixRunner.onStart has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (31 pts), boolean chains 6, error handling 4 (5 pts), loops 3 (5 pts), ternaries 1 (2 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindPath.backwardAStar (cognitive 48) · ×1
  • FindPath.backwardAStar (cognitive 48) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1094 — FindPath.backwardAStar has cognitive complexity 48 (threshold 15). Drivers by points: if/else 23 (34 pts), loops 3 (9 pts), boolean chains 5 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyEditorFragment.setupInitialState (cognitive 48) · ×1
  • KeyEditorFragment.setupInitialState (cognitive 48) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1280 — KeyEditorFragment.setupInitialState has cognitive complexity 48 (threshold 15). Drivers by points: if/else 29 (42 pts), boolean chains 6 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SizeHandles.onTouchEvent (cognitive 48) · ×1
  • SizeHandles.onTouchEvent (cognitive 48) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_geometry/UnifiedKeyboardSettingsFragment.kt:763 — SizeHandles.onTouchEvent has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (36 pts), boolean chains 7, match/switch 3 (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.
D2 · Cognitive Complexity · CompositionRegressionRunner.onStart (cognitive 48) · ×1
  • CompositionRegressionRunner.onStart (cognitive 48) enter-parity-lab/src/main/java/com/kazumaproject/enterparity/CompositionRegressionRunner.java:18 — CompositionRegressionRunner.onStart has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 6 (13 pts), boolean chains 4, error handling 2, ternaries 1 (2 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SuggestionAdapter.applyVerticalCandidate (cognitive 47) · ×1
  • SuggestionAdapter.applyVerticalCandidate (cognitive 47) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1609 — SuggestionAdapter.applyVerticalCandidate has cognitive complexity 47 (threshold 15). Drivers by points: if/else 32 (39 pts), boolean chains 5, match/switch 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KeyboardViewGeometry.apply (cognitive 47) · ×1
  • KeyboardViewGeometry.apply (cognitive 47) core/src/main/java/com/kazumaproject/core/ui/geometry/KeyboardViewGeometry.kt:49 — KeyboardViewGeometry.apply has cognitive complexity 47 (threshold 15). Drivers by points: if/else 24 (35 pts), boolean chains 6, loops 3 (5 pts), match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KanaKanjiEngine.getCandidatesOriginal (cognitive 46) · ×1
  • KanaKanjiEngine.getCandidatesOriginal (cognitive 46) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:854 — KanaKanjiEngine.getCandidatesOriginal has cognitive complexity 46 (threshold 15). Drivers by points: if/else 33 (36 pts), boolean chains 6, match/switch 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. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginalWithBunsetsu, KanaKanjiEngine.getCandidatesWithoutPrediction, KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu) 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.
D2 · Cognitive Complexity · KanaKanjiEngine.getCandidatesOriginalWithBunsetsu (cognitive 46) · ×1
  • KanaKanjiEngine.getCandidatesOriginalWithBunsetsu (cognitive 46) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1340 — KanaKanjiEngine.getCandidatesOriginalWithBunsetsu has cognitive complexity 46 (threshold 15). Drivers by points: if/else 33 (36 pts), boolean chains 6, match/switch 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. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginal, KanaKanjiEngine.getCandidatesWithoutPrediction, KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu) 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.
D2 · Cognitive Complexity · KanaKanjiEngine.getCandidatesWithoutPrediction (cognitive 46) · ×1
  • KanaKanjiEngine.getCandidatesWithoutPrediction (cognitive 46) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2911 — KanaKanjiEngine.getCandidatesWithoutPrediction has cognitive complexity 46 (threshold 15). Drivers by points: if/else 33 (36 pts), boolean chains 6, match/switch 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. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginal, KanaKanjiEngine.getCandidatesOriginalWithBunsetsu, KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu) 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.
D2 · Cognitive Complexity · KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu (cognitive 46) · ×1
  • KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu (cognitive 46) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3379 — KanaKanjiEngine.getCandidatesWithoutPredictionWithBunsetsu has cognitive complexity 46 (threshold 15). Drivers by points: if/else 33 (36 pts), boolean chains 6, match/switch 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. This shape REPEATS in the file: 3 other methods here (KanaKanjiEngine.getCandidatesOriginal, KanaKanjiEngine.getCandidatesOriginalWithBunsetsu, KanaKanjiEngine.getCandidatesWithoutPrediction) 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.
D2 · Cognitive Complexity · MorseEngine.pressed (cognitive 46) · ×1
  • MorseEngine.pressed (cognitive 46) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseEngine.kt:35 — MorseEngine.pressed has cognitive complexity 46 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 11, match/switch 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackspaceHistoryCoordinator.enqueue (cognitive 45) · ×1
  • BackspaceHistoryCoordinator.enqueue (cognitive 45) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/BackspaceHistoryCoordinator.kt:71 — BackspaceHistoryCoordinator.enqueue has cognitive complexity 45 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 4 (9 pts), boolean chains 5 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NumberExtenstionKt.parseJapaneseNumberValue (cognitive 45) · ×1
  • NumberExtenstionKt.parseJapaneseNumberValue (cognitive 45) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/NumberExtenstion.kt:68 — NumberExtenstionKt.parseJapaneseNumberValue has cognitive complexity 45 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 7, match/switch 2 (4 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RomajiKanaConverter.hiraganaToRomaji (cognitive 45) · ×1
  • RomajiKanaConverter.hiraganaToRomaji (cognitive 45) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:54 — RomajiKanaConverter.hiraganaToRomaji has cognitive complexity 45 (threshold 15). Drivers by points: if/else 11 (36 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RomajiKanaConverter.handleResolvedUnicode (cognitive 45) · ×1
  • RomajiKanaConverter.handleResolvedUnicode (cognitive 45) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:173 — RomajiKanaConverter.handleResolvedUnicode has cognitive complexity 45 (threshold 15). Drivers by points: if/else 29 (38 pts), match/switch 1 (4 pts), boolean chains 2, loops 1 (nesting depth added 12). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IMEService.showResolvedKeyboard (cognitive 44) · ×1
  • IMEService.showResolvedKeyboard (cognitive 44) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14815 — IMEService.showResolvedKeyboard has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (35 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyboardSizeLandscapeFragment.bindResizeHandle (cognitive 44) · ×1
  • KeyboardSizeLandscapeFragment.bindResizeHandle (cognitive 44) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:394 — KeyboardSizeLandscapeFragment.bindResizeHandle has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · KeyboardSettingFragment.bindResizeHandle (cognitive 44) · ×1
  • KeyboardSettingFragment.bindResizeHandle (cognitive 44) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:394 — KeyboardSettingFragment.bindResizeHandle has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (35 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · IMEService.updateFloatingKeyboardSizeForMode (cognitive 43) · ×1
  • IMEService.updateFloatingKeyboardSizeForMode (cognitive 43) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11882 — IMEService.updateFloatingKeyboardSizeForMode has cognitive complexity 43 (threshold 15). Drivers by points: if/else 25 (31 pts), boolean chains 11, match/switch 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleSpaceLongAction (cognitive 43) · ×1
  • IMEService.handleSpaceLongAction (cognitive 43) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14511 — IMEService.handleSpaceLongAction has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (43 pts) (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.refreshGeometryCandidates (cognitive 43) · ×1
  • IMEService.refreshGeometryCandidates (cognitive 43) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:20763 — IMEService.refreshGeometryCandidates has cognitive complexity 43 (threshold 15). Drivers by points: if/else 23 (31 pts), boolean chains 8, match/switch 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyboardSizeLandscapeFragment.setupMoveHandle (cognitive 43) · ×1
  • KeyboardSizeLandscapeFragment.setupMoveHandle (cognitive 43) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:270 — KeyboardSizeLandscapeFragment.setupMoveHandle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 3, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · KeyboardSettingFragment.setupMoveHandle (cognitive 43) · ×1
  • KeyboardSettingFragment.setupMoveHandle (cognitive 43) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:270 — KeyboardSettingFragment.setupMoveHandle has cognitive complexity 43 (threshold 15). Drivers by points: if/else 19 (39 pts), boolean chains 3, match/switch 1 (nesting depth added 20). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ComposingGuideWindow.refresh (cognitive 42) · ×1
  • ComposingGuideWindow.refresh (cognitive 42) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt:96 — ComposingGuideWindow.refresh has cognitive complexity 42 (threshold 15). Drivers by points: if/else 21 (31 pts), boolean chains 11 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomAngleFlickController.handleTouchEvent (cognitive 42) · ×1
  • CustomAngleFlickController.handleTouchEvent (cognitive 42) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt:209 — CustomAngleFlickController.handleTouchEvent has cognitive complexity 42 (threshold 15). Drivers by points: if/else 17 (39 pts), boolean chains 2, match/switch 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · IMEService.deleteLongPress (cognitive 41) · ×1
  • IMEService.deleteLongPress (cognitive 41) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29349 — IMEService.deleteLongPress has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (36 pts), boolean chains 4, loops 1 (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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KanaKanjiEngine.getCandidatesWithBunsetsuSeparation (cognitive 40) · ×1
  • KanaKanjiEngine.getCandidatesWithBunsetsuSeparation (cognitive 40) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1855 — KanaKanjiEngine.getCandidatesWithBunsetsuSeparation has cognitive complexity 40 (threshold 15). Drivers by points: if/else 29 (32 pts), boolean chains 4, match/switch 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. This shape REPEATS in the file: one other method here (KanaKanjiEngine.getCandidates) 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.
D2 · Cognitive Complexity · KanaKanjiEngine.getCandidates (cognitive 40) · ×1
  • KanaKanjiEngine.getCandidates (cognitive 40) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2353 — KanaKanjiEngine.getCandidates has cognitive complexity 40 (threshold 15). Drivers by points: if/else 29 (32 pts), boolean chains 4, match/switch 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. This shape REPEATS in the file: one other method here (KanaKanjiEngine.getCandidatesWithBunsetsuSeparation) 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.
D2 · Cognitive Complexity · SuggestionAdapter.styleFloatingItem (cognitive 40) · ×1
  • SuggestionAdapter.styleFloatingItem (cognitive 40) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:1741 — SuggestionAdapter.styleFloatingItem has cognitive complexity 40 (threshold 15). Drivers by points: if/else 23 (34 pts), boolean chains 5, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeverEffectView.drawCandidateEnergy (cognitive 40) · ×1
  • FeverEffectView.drawCandidateEnergy (cognitive 40) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:335 — FeverEffectView.drawCandidateEnergy has cognitive complexity 40 (threshold 15). Drivers by points: if/else 24 (33 pts), match/switch 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CursorMovement.move (cognitive 40) · ×1
  • CursorMovement.move (cognitive 40) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/CursorMovement.kt:64 — CursorMovement.move has cognitive complexity 40 (threshold 15). Drivers by points: if/else 22 (25 pts), boolean chains 14, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KeyEditorFragment.updateDoneButtonState (cognitive 39) · ×1
  • KeyEditorFragment.updateDoneButtonState (cognitive 39) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1179 — KeyEditorFragment.updateDoneButtonState has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 16, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeometryCandidateHost.show (cognitive 39) · ×1
  • GeometryCandidateHost.show (cognitive 39) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/GeometryCandidateHost.kt:149 — GeometryCandidateHost.show has cognitive complexity 39 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 7 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardRepository.findMoveToCustomKeyboardReferences (cognitive 38) · ×1
  • KeyboardRepository.findMoveToCustomKeyboardReferences (cognitive 38) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:579 — KeyboardRepository.findMoveToCustomKeyboardReferences has cognitive complexity 38 (threshold 15). Drivers by points: if/else 7 (25 pts), loops 4 (9 pts), boolean chains 4 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyEditorFragment.setupUIListeners (cognitive 37) · ×1
  • KeyEditorFragment.setupUIListeners (cognitive 37) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:345 — KeyEditorFragment.setupUIListeners has cognitive complexity 37 (threshold 15). Drivers by points: if/else 26 (31 pts), boolean chains 4, match/switch 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.
D2 · Cognitive Complexity · IMEService.queueCursorMove (cognitive 36) · ×1
  • IMEService.queueCursorMove (cognitive 36) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3920 — IMEService.queueCursorMove has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 2 (7 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FeverFeedback.playEvent (cognitive 36) · ×1
  • FeverFeedback.playEvent (cognitive 36) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverFeedback.kt:52 — FeverFeedback.playEvent has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (30 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QWERTYKeyboardView.tryHandleFlickAt (cognitive 36) · ×1
  • QWERTYKeyboardView.tryHandleFlickAt (cognitive 36) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2708 — QWERTYKeyboardView.tryHandleFlickAt has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 9, match/switch 4 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlickGridEditorView.getActiveArrows (cognitive 35) · ×1
  • FlickGridEditorView.getActiveArrows (cognitive 35) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:339 — FlickGridEditorView.getActiveArrows has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 2 (6 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CandidateCharacterPresentationKt.candidateCharacterRanges (cognitive 35) · ×1
  • CandidateCharacterPresentationKt.candidateCharacterRanges (cognitive 35) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateCharacterPresentation.kt:18 — CandidateCharacterPresentationKt.candidateCharacterRanges has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 10, loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.handleJapaneseCharacterKeyFloating (cognitive 34) · ×1
  • IMEService.handleJapaneseCharacterKeyFloating (cognitive 34) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9770 — IMEService.handleJapaneseCharacterKeyFloating has cognitive complexity 34 (threshold 15). Drivers by points: if/else 22 (32 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CandidateSurfaceHost.refreshAppearance (cognitive 34) · ×1
  • CandidateSurfaceHost.refreshAppearance (cognitive 34) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/CandidateSurfaceHost.kt:115 — CandidateSurfaceHost.refreshAppearance has cognitive complexity 34 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopupMapEditorFragment.onCreateView (cognitive 34) · ×1
  • PopupMapEditorFragment.onCreateView (cognitive 34) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:65 — PopupMapEditorFragment.onCreateView has cognitive complexity 34 (threshold 15). Drivers by points: if/else 26 (30 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IMEService.applyKeyboardLayoutParameters (cognitive 33) · ×1
  • IMEService.applyKeyboardLayoutParameters (cognitive 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21279 — IMEService.applyKeyboardLayoutParameters has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 12 (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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.setSuggestionRecyclerView (cognitive 33) · ×1
  • IMEService.setSuggestionRecyclerView (cognitive 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23629 — IMEService.setSuggestionRecyclerView has cognitive complexity 33 (threshold 15). Drivers by points: if/else 19 (28 pts), match/switch 4, 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleSpaceKeyClick (cognitive 33) · ×1
  • IMEService.handleSpaceKeyClick (cognitive 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29614 — IMEService.handleSpaceKeyClick has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (26 pts), match/switch 2 (6 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FloatingPanelFrame.renderChrome (cognitive 33) · ×1
  • FloatingPanelFrame.renderChrome (cognitive 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/FloatingPanelFrame.kt:131 — FloatingPanelFrame.renderChrome has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29, boolean chains 3, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · InkTouchDispatchFrameLayout.dispatchKeyboardTouchEvent (cognitive 33) · ×1
  • InkTouchDispatchFrameLayout.dispatchKeyboardTouchEvent (cognitive 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/InkTouchDispatchFrameLayout.kt:65 — InkTouchDispatchFrameLayout.dispatchKeyboardTouchEvent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (23 pts), boolean chains 10 (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.
D2 · Cognitive Complexity · CommonPreferenceFragment.onPreferencesReady (cognitive 33) · ×1
  • CommonPreferenceFragment.onPreferencesReady (cognitive 33) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/CommonPreferenceFragment.kt:411 — CommonPreferenceFragment.onPreferencesReady has cognitive complexity 33 (threshold 15). Drivers by points: if/else 27, match/switch 5, 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.
D2 · Cognitive Complexity · QWERTYKeyboardView.applyTopRightCharsEN (cognitive 33) · ×1
  • QWERTYKeyboardView.applyTopRightCharsEN (cognitive 33) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1259 — QWERTYKeyboardView.applyTopRightCharsEN has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (32 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QWERTYKeyboardView.handleQwertyGlideTouchEvent (cognitive 33) · ×1
  • QWERTYKeyboardView.handleQwertyGlideTouchEvent (cognitive 33) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1905 — QWERTYKeyboardView.handleQwertyGlideTouchEvent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (30 pts), boolean chains 2, 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.
D2 · Cognitive Complexity · QWERTYKeyboardView.showKeyPreview (cognitive 33) · ×1
  • QWERTYKeyboardView.showKeyPreview (cognitive 33) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2840 — QWERTYKeyboardView.showKeyPreview has cognitive complexity 33 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 4, match/switch 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IMEService.updateSuggestionViewVisibility (cognitive 32) · ×1
  • IMEService.updateSuggestionViewVisibility (cognitive 32) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21619 — IMEService.updateSuggestionViewVisibility has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (24 pts), match/switch 3 (6 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createHiraganaToggleLayout (cognitive 32) · ×1
  • KeyboardDefaultLayouts.createHiraganaToggleLayout (cognitive 32) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5032 — KeyboardDefaultLayouts.createHiraganaToggleLayout has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (20 pts), match/switch 12 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createHiraganaFlickLayout, KeyboardDefaultLayouts.createHiraganaEffectiveLayout) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createHiraganaFlickLayout (cognitive 32) · ×1
  • KeyboardDefaultLayouts.createHiraganaFlickLayout (cognitive 32) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6574 — KeyboardDefaultLayouts.createHiraganaFlickLayout has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (20 pts), match/switch 12 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createHiraganaToggleLayout, KeyboardDefaultLayouts.createHiraganaEffectiveLayout) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createHiraganaEffectiveLayout (cognitive 32) · ×1
  • KeyboardDefaultLayouts.createHiraganaEffectiveLayout (cognitive 32) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8467 — KeyboardDefaultLayouts.createHiraganaEffectiveLayout has cognitive complexity 32 (threshold 15). Drivers by points: if/else 18 (20 pts), match/switch 12 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This shape REPEATS in the file: 2 other methods here (KeyboardDefaultLayouts.createHiraganaToggleLayout, KeyboardDefaultLayouts.createHiraganaFlickLayout) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomAngleFlickPopupView.onDraw (cognitive 32) · ×1
  • CustomAngleFlickPopupView.onDraw (cognitive 32) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:196 — CustomAngleFlickPopupView.onDraw has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (26 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MorseKeyboardView.applyAppearance (cognitive 32) · ×1
  • MorseKeyboardView.applyAppearance (cognitive 32) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseKeyboardView.kt:524 — MorseKeyboardView.applyAppearance has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27 (28 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EditorEnterPolicy.label (cognitive 31) · ×1
  • EditorEnterPolicy.label (cognitive 31) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/editor/EditorEnterPolicy.kt:51 — EditorEnterPolicy.label has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (28 pts), match/switch 2 (3 pts) (nesting depth added 14). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createEnglishToggleLayout (cognitive 31) · ×1
  • KeyboardDefaultLayouts.createEnglishToggleLayout (cognitive 31) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5790 — KeyboardDefaultLayouts.createEnglishToggleLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19 (20 pts), match/switch 11 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createSymbolToggleLayout (cognitive 31) · ×1
  • KeyboardDefaultLayouts.createSymbolToggleLayout (cognitive 31) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6131 — KeyboardDefaultLayouts.createSymbolToggleLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (19 pts), match/switch 12 (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. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createNumberEffectiveLayout) 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.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createEnglishFlickLayout (cognitive 31) · ×1
  • KeyboardDefaultLayouts.createEnglishFlickLayout (cognitive 31) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7326 — KeyboardDefaultLayouts.createEnglishFlickLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (19 pts), match/switch 12 (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. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createEnglishFlickLayoutEffective) 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.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createEnglishFlickLayoutEffective (cognitive 31) · ×1
  • KeyboardDefaultLayouts.createEnglishFlickLayoutEffective (cognitive 31) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7665 — KeyboardDefaultLayouts.createEnglishFlickLayoutEffective has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (19 pts), match/switch 12 (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. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createEnglishFlickLayout) 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.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createSymbolFlickLayout (cognitive 31) · ×1
  • KeyboardDefaultLayouts.createSymbolFlickLayout (cognitive 31) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8025 — KeyboardDefaultLayouts.createSymbolFlickLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (18 pts), match/switch 13 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createNumberEffectiveLayout (cognitive 31) · ×1
  • KeyboardDefaultLayouts.createNumberEffectiveLayout (cognitive 31) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9273 — KeyboardDefaultLayouts.createNumberEffectiveLayout has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (19 pts), match/switch 12 (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. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createSymbolToggleLayout) 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.
D2 · Cognitive Complexity · QWERTYKeyboardView.applyTopRightCharsJP (cognitive 31) · ×1
  • QWERTYKeyboardView.applyTopRightCharsJP (cognitive 31) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:1224 — QWERTYKeyboardView.applyTopRightCharsJP has cognitive complexity 31 (threshold 15). Drivers by points: if/else 20 (30 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Lexer.readNumber (cognitive 30) · ×1
  • Lexer.readNumber (cognitive 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:108 — Lexer.readNumber has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitExpressionParser.parse (cognitive 30) · ×1
  • UnitExpressionParser.parse (cognitive 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitExpressionParser.kt:26 — UnitExpressionParser.parse has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 3, match/switch 1 (2 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnitExpressionParser.readNumber (cognitive 30) · ×1
  • UnitExpressionParser.readNumber (cognitive 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitExpressionParser.kt:101 — UnitExpressionParser.readNumber has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 5 (10 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.configureMorseView (cognitive 30) · ×1
  • IMEService.configureMorseView (cognitive 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12221 — IMEService.configureMorseView has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, boolean chains 3, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CandidateRubyAnnotationsKt.alignSegment (cognitive 30) · ×1
  • CandidateRubyAnnotationsKt.alignSegment (cognitive 30) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateRubyAnnotations.kt:44 — CandidateRubyAnnotationsKt.alignSegment has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GojuonKeyboardView.handleClickInputModeSwitch (cognitive 30) · ×1
  • GojuonKeyboardView.handleClickInputModeSwitch (cognitive 30) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4002 — GojuonKeyboardView.handleClickInputModeSwitch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 1, match/switch 1 (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · KeyEditorFragment.handleInputStyleUi (cognitive 29) · ×1
  • KeyEditorFragment.handleInputStyleUi (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:630 — KeyEditorFragment.handleInputStyleUi has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19 (29 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.syncSplitPresentation (cognitive 29) · ×1
  • IMEService.syncSplitPresentation (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3352 — IMEService.syncSplitPresentation has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 3, match/switch 2 (3 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.applyCandidateAppearance (cognitive 29) · ×1
  • IMEService.applyCandidateAppearance (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8371 — IMEService.applyCandidateAppearance has cognitive complexity 29 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.applyFloatingModeState (cognitive 29) · ×1
  • IMEService.applyFloatingModeState (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10529 — IMEService.applyFloatingModeState has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (25 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.showListPopup (cognitive 29) · ×1
  • IMEService.showListPopup (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14171 — IMEService.showListPopup has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (22 pts), match/switch 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.setCandidatesWithoutPrediction (cognitive 29) · ×1
  • IMEService.setCandidatesWithoutPrediction (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28409 — IMEService.setCandidatesWithoutPrediction has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyboardPreviewView.reload (cognitive 29) · ×1
  • KeyboardPreviewView.reload (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:131 — KeyboardPreviewView.reload has cognitive complexity 29 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 4, error handling 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PopupShapeEditorView.onTouchEvent (cognitive 29) · ×1
  • PopupShapeEditorView.onTouchEvent (cognitive 29) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupShapeEditorView.kt:135 — PopupShapeEditorView.onTouchEvent has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 2, loops 1 (2 pts), match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GojuonKeyboardView.setFlickActionPointerDown (cognitive 29) · ×1
  • GojuonKeyboardView.setFlickActionPointerDown (cognitive 29) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3891 — GojuonKeyboardView.setFlickActionPointerDown has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (21 pts), match/switch 2 (7 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.
D2 · Cognitive Complexity · run_floating_panel_matrix.main (cognitive 29) · ×1
  • run_floating_panel_matrix.main (cognitive 29) REDACTED:15 — run_floating_panel_matrix.main has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 5 (7 pts), boolean chains 4, ternaries 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.
D2 · Cognitive Complexity · IMEService.setCandidatesOriginal (cognitive 28) · ×1
  • IMEService.setCandidatesOriginal (cognitive 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28310 — IMEService.setCandidatesOriginal has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FeverEffectView.emit (cognitive 28) · ×1
  • FeverEffectView.emit (cognitive 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:128 — FeverEffectView.emit has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22 (26 pts), match/switch 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.
D2 · Cognitive Complexity · PopupMapEditorFragment.refresh (cognitive 28) · ×1
  • PopupMapEditorFragment.refresh (cognitive 28) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:228 — PopupMapEditorFragment.refresh has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (23 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SkinPopupPlacement.show (cognitive 28) · ×1
  • SkinPopupPlacement.show (cognitive 28) core/src/main/java/com/kazumaproject/core/ui/skin/SkinPopupPlacement.kt:55 — SkinPopupPlacement.show has cognitive complexity 28 (threshold 15). Drivers by points: if/else 16 (24 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MorseGuide.setMap (cognitive 28) · ×1
  • MorseGuide.setMap (cognitive 28) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseGuide.kt:16 — MorseGuide.setMap has cognitive complexity 28 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 5 (8 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SimpleFormulaParser.parsePrimary (cognitive 27) · ×1
  • SimpleFormulaParser.parsePrimary (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/FormulaParser.kt:293 — SimpleFormulaParser.parsePrimary has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlexiblePlacementSolver.resolveOverlaps (cognitive 27) · ×1
  • FlexiblePlacementSolver.resolveOverlaps (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/FlexiblePlacementSolver.kt:258 — FlexiblePlacementSolver.resolveOverlaps has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (13 pts), match/switch 2 (8 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ForwardDeleteCoordinator.enqueue (cognitive 27) · ×1
  • ForwardDeleteCoordinator.enqueue (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/ForwardDeleteCoordinator.kt:52 — ForwardDeleteCoordinator.enqueue has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 8, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.handleSoftwareSpecialAction (cognitive 27) · ×1
  • IMEService.handleSoftwareSpecialAction (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17217 — IMEService.handleSoftwareSpecialAction has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 7, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleDeleteKeyTap (cognitive 27) · ×1
  • IMEService.handleDeleteKeyTap (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29561 — IMEService.handleDeleteKeyTap has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CandidateDisplayMerger.merge (cognitive 27) · ×1
  • CandidateDisplayMerger.merge (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/candidate/CandidateDisplayMerger.kt:12 — CandidateDisplayMerger.merge has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 7, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CursorInputSynchronization.verify (cognitive 27) · ×1
  • CursorInputSynchronization.verify (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/CursorInputSynchronization.kt:85 — CursorInputSynchronization.verify has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 12 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SettingSearchIndex.readPreferenceXml (cognitive 27) · ×1
  • SettingSearchIndex.readPreferenceXml (cognitive 27) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:493 — SettingSearchIndex.readPreferenceXml has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 5, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.setupKeyboardView (cognitive 26) · ×1
  • IMEService.setupKeyboardView (cognitive 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8550 — IMEService.setupKeyboardView has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4, match/switch 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.setCandidates (cognitive 26) · ×1
  • IMEService.setCandidates (cognitive 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28212 — IMEService.setCandidates has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 6 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · KeyboardCornerRoundingKt.applyClassicKeyboardCornerRounding (cognitive 26) · ×1
  • KeyboardCornerRoundingKt.applyClassicKeyboardCornerRounding (cognitive 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/KeyboardCornerRounding.kt:7 — KeyboardCornerRoundingKt.applyClassicKeyboardCornerRounding has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FeverEffectView.drawParticles (cognitive 26) · ×1
  • FeverEffectView.drawParticles (cognitive 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:496 — FeverEffectView.drawParticles has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeverEffectView.drawInputLayers (cognitive 26) · ×1
  • FeverEffectView.drawInputLayers (cognitive 26) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:546 — FeverEffectView.drawInputLayers has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlickKeyboardView.onIndependentCursorTouchEvent (cognitive 26) · ×1
  • FlickKeyboardView.onIndependentCursorTouchEvent (cognitive 26) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3725 — FlickKeyboardView.onIndependentCursorTouchEvent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 3, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PhraseGrammar.forEachNounPhrase (cognitive 25) · ×1
  • PhraseGrammar.forEachNounPhrase (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt:211 — PhraseGrammar.forEachNounPhrase has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 8, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.setTenkeyIconsInHenkan (cognitive 25) · ×1
  • IMEService.setTenkeyIconsInHenkan (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27814 — IMEService.setTenkeyIconsInHenkan has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (20 pts), match/switch 2 (4 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.setSuggestionComposingText (cognitive 25) · ×1
  • IMEService.setSuggestionComposingText (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31567 — IMEService.setSuggestionComposingText has cognitive complexity 25 (threshold 15). Drivers by points: if/else 18 (23 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CandidateCharacterTextView.onDraw (cognitive 25) · ×1
  • CandidateCharacterTextView.onDraw (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateCharacterPresentation.kt:130 — CandidateCharacterTextView.onDraw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (18 pts), loops 2 (3 pts), match/switch 1 (3 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.
D2 · Cognitive Complexity · FeverController.position (cognitive 25) · ×1
  • FeverController.position (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverController.kt:134 — FeverController.position has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, loops 2 (4 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FeverEffectView.onDraw (cognitive 25) · ×1
  • FeverEffectView.onDraw (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:247 — FeverEffectView.onDraw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 9 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SplitKeyboardPresentationKt.renderSplitKeyboardPresentation (cognitive 25) · ×1
  • SplitKeyboardPresentationKt.renderSplitKeyboardPresentation (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/split_keyboard/SplitKeyboardPresentation.kt:57 — SplitKeyboardPresentationKt.renderSplitKeyboardPresentation has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PopupMapEditorFragment.showProperties (cognitive 25) · ×1
  • PopupMapEditorFragment.showProperties (cognitive 25) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:326 — PopupMapEditorFragment.showProperties has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 5, match/switch 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.
D2 · Cognitive Complexity · FeverKeyDrawable.draw (cognitive 25) · ×1
  • FeverKeyDrawable.draw (cognitive 25) core/src/main/java/com/kazumaproject/core/ui/skin/FeverKeyPulse.kt:79 — FeverKeyDrawable.draw has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 7 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TenKey.setPopupViewTheme (cognitive 25) · ×1
  • TenKey.setPopupViewTheme (cognitive 25) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:511 — TenKey.setPopupViewTheme has cognitive complexity 25 (threshold 15). Drivers by points: if/else 20 (25 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.
D2 · Cognitive Complexity · TenKey.onLongPressed (cognitive 25) · ×1
  • TenKey.onLongPressed (cognitive 25) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2624 — TenKey.onLongPressed has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), match/switch 1 (2 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.
D2 · Cognitive Complexity · EnglishEngine.buildGlideDictionaryEntries (cognitive 24) · ×1
  • EnglishEngine.buildGlideDictionaryEntries (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:451 — EnglishEngine.buildGlideDictionaryEntries has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts), match/switch 1 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser.parsePrimary (cognitive 24) · ×1
  • Parser.parsePrimary (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:244 — Parser.parsePrimary has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (20 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.
D2 · Cognitive Complexity · HorizontalCursorMoveHandler.resolveMove (cognitive 24) · ×1
  • HorizontalCursorMoveHandler.resolveMove (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/HorizontalCursorMoveHandler.kt:81 — HorizontalCursorMoveHandler.resolveMove has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (22 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.
D2 · Cognitive Complexity · IMEService.startSplitKeyboard (cognitive 24) · ×1
  • IMEService.startSplitKeyboard (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3116 — IMEService.startSplitKeyboard has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11, boolean chains 7, match/switch 4, error handling 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleConversionKeyFloating (cognitive 24) · ×1
  • IMEService.handleConversionKeyFloating (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9483 — IMEService.handleConversionKeyFloating has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), match/switch 3 (7 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.setTenkeyIconsInHenkanFloating (cognitive 24) · ×1
  • IMEService.setTenkeyIconsInHenkanFloating (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27907 — IMEService.setTenkeyIconsInHenkanFloating has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (20 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FeverEffectView.drawAward (cognitive 24) · ×1
  • FeverEffectView.drawAward (cognitive 24) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:386 — FeverEffectView.drawAward has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (20 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createFinalLayout (cognitive 24) · ×1
  • KeyboardDefaultLayouts.createFinalLayout (cognitive 24) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:169 — KeyboardDefaultLayouts.createFinalLayout has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 6 (11 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createFlickEnglishTemplateLayout (cognitive 24) · ×1
  • KeyboardDefaultLayouts.createFlickEnglishTemplateLayout (cognitive 24) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4322 — KeyboardDefaultLayouts.createFlickEnglishTemplateLayout has cognitive complexity 24 (threshold 15). Drivers by points: if/else 24. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · QWERTYKeyboardView.getVariationInfo (cognitive 24) · ×1
  • QWERTYKeyboardView.getVariationInfo (cognitive 24) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:3131 — QWERTYKeyboardView.getVariationInfo has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.handleSpaceLongActionSumire (cognitive 23) · ×1
  • IMEService.handleSpaceLongActionSumire (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14589 — IMEService.handleSpaceLongActionSumire has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 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. This shape REPEATS in the file: one other method here (IMEService.handleSpaceLongActionFloating) 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleSpaceLongActionFloating (cognitive 23) · ×1
  • IMEService.handleSpaceLongActionFloating (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14653 — IMEService.handleSpaceLongActionFloating has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 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. This shape REPEATS in the file: one other method here (IMEService.handleSpaceLongActionSumire) 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleCustomToggleText (cognitive 23) · ×1
  • IMEService.handleCustomToggleText (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17474 — IMEService.handleCustomToggleText has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, match/switch 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.commitBunsetsuConversionUntilFocusedSegment (cognitive 23) · ×1
  • IMEService.commitBunsetsuConversionUntilFocusedSegment (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26506 — IMEService.commitBunsetsuConversionUntilFocusedSegment has cognitive complexity 23 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · CandidateLabelPresentationKt.candidateLabelPresentation (cognitive 23) · ×1
  • CandidateLabelPresentationKt.candidateLabelPresentation (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/CandidateLabelPresentation.kt:22 — CandidateLabelPresentationKt.candidateLabelPresentation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (20 pts), match/switch 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.
D2 · Cognitive Complexity · CursorPadGesture.move (cognitive 23) · ×1
  • CursorPadGesture.move (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/CursorMovement.kt:33 — CursorPadGesture.move has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SideCandidateFlowLayoutManager.scrollMetrics (cognitive 23) · ×1
  • SideCandidateFlowLayoutManager.scrollMetrics (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/keyboard_geometry/GeometryCandidateHost.kt:55 — SideCandidateFlowLayoutManager.scrollMetrics has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardRepository.convertLayout (cognitive 23) · ×1
  • KeyboardRepository.convertLayout (cognitive 23) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:757 — KeyboardRepository.convertLayout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 20 (21 pts), match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PopupMapInputController.attach (cognitive 23) · ×1
  • PopupMapInputController.attach (cognitive 23) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/PopupMapInputController.kt:98 — PopupMapInputController.attach has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (2 pts), boolean chains 1, match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FlickKeyboardView.refreshModifierKeyPresentation (cognitive 23) · ×1
  • FlickKeyboardView.refreshModifierKeyPresentation (cognitive 23) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:977 — FlickKeyboardView.refreshModifierKeyPresentation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), match/switch 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.
D2 · Cognitive Complexity · FlickKeyboardView.createKeyView (cognitive 23) · ×1
  • FlickKeyboardView.createKeyView (cognitive 23) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1537 — FlickKeyboardView.createKeyView has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlickKeyboardView.findNearestKeyTarget (cognitive 23) · ×1
  • FlickKeyboardView.findNearestKeyTarget (cognitive 23) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3324 — FlickKeyboardView.findNearestKeyTarget has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 7, 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.
D2 · Cognitive Complexity · GojuonKeyboardView.setTapInActionMove (cognitive 23) · ×1
  • GojuonKeyboardView.setTapInActionMove (cognitive 23) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3668 — GojuonKeyboardView.setTapInActionMove has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TenKey.setTapInActionMove (cognitive 23) · ×1
  • TenKey.setTapInActionMove (cognitive 23) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2719 — TenKey.setTapInActionMove has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnglishPhraseDictionary.complete (cognitive 22) · ×1
  • EnglishPhraseDictionary.complete (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt:50 — EnglishPhraseDictionary.complete has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, 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.
D2 · Cognitive Complexity · LOUDSWithTermId.advanceTypoCorrectionSearch (cognitive 22) · ×1
  • LOUDSWithTermId.advanceTypoCorrectionSearch (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:1013 — LOUDSWithTermId.advanceTypoCorrectionSearch has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindPath.backwardAStarWithBunsetsuWithLog (cognitive 22) · ×1
  • FindPath.backwardAStarWithBunsetsuWithLog (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2108 — FindPath.backwardAStarWithBunsetsuWithLog has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FindPath.latticeMayContainSystemNgram (cognitive 22) · ×1
  • FindPath.latticeMayContainSystemNgram (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:2369 — FindPath.latticeMayContainSystemNgram has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 4 (10 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtilityCandidateProvider.provideCalculation (cognitive 22) · ×1
  • UtilityCandidateProvider.provideCalculation (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UtilityCandidateProvider.kt:104 — UtilityCandidateProvider.provideCalculation has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IMEService.onKeyDown (cognitive 22) · ×1
  • IMEService.onKeyDown (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9003 — IMEService.onKeyDown has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 9, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleJapaneseSpaceFloating (cognitive 22) · ×1
  • IMEService.handleJapaneseSpaceFloating (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9604 — IMEService.handleJapaneseSpaceFloating has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (21 pts), match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · FeverEffectView.drawMeter (cognitive 22) · ×1
  • FeverEffectView.drawMeter (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:696 — FeverEffectView.drawMeter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DictionaryBrowserFragment.onViewCreated (cognitive 22) · ×1
  • DictionaryBrowserFragment.onViewCreated (cognitive 22) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_browser/DictionaryBrowserFragment.kt:37 — DictionaryBrowserFragment.onViewCreated has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 6, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CupertinoSurfaceDrawable.onBoundsChange (cognitive 22) · ×1
  • CupertinoSurfaceDrawable.onBoundsChange (cognitive 22) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoSurfaceDrawable.kt:22 — CupertinoSurfaceDrawable.onBoundsChange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4, 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.
D2 · Cognitive Complexity · CrossFlickInputController.handleTouchEvent (cognitive 22) · ×1
  • CrossFlickInputController.handleTouchEvent (cognitive 22) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CrossFlickInputController.kt:235 — CrossFlickInputController.handleTouchEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PopupMapSession.resolve (cognitive 22) · ×1
  • PopupMapSession.resolve (cognitive 22) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/PopupMap.kt:176 — PopupMapSession.resolve has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createDefaultFlickLayout (cognitive 22) · ×1
  • KeyboardDefaultLayouts.createDefaultFlickLayout (cognitive 22) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3557 — KeyboardDefaultLayouts.createDefaultFlickLayout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createFlickKanaTemplateLayout) 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.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.createFlickKanaTemplateLayout (cognitive 22) · ×1
  • KeyboardDefaultLayouts.createFlickKanaTemplateLayout (cognitive 22) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4019 — KeyboardDefaultLayouts.createFlickKanaTemplateLayout has cognitive complexity 22 (threshold 15). Drivers by points: if/else 22. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (KeyboardDefaultLayouts.createDefaultFlickLayout) 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.
D2 · Cognitive Complexity · FlickKeyboardView.onIndependentTouchEvent (cognitive 22) · ×1
  • FlickKeyboardView.onIndependentTouchEvent (cognitive 22) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3770 — FlickKeyboardView.onIndependentTouchEvent has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 2, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ExactInputCandidatePromoter.promote (cognitive 21) · ×1
  • ExactInputCandidatePromoter.promote (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/candidate/ExactInputCandidatePromotionPolicy.kt:17 — ExactInputCandidatePromoter.promote has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, loops 3, match/switch 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · JsonParser.parseNumber (cognitive 21) · ×1
  • JsonParser.parseNumber (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitTargetSettingsJsonCodec.kt:227 — JsonParser.parseNumber has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditableFlickKeyboardView.createKeyView (cognitive 21) · ×1
  • EditableFlickKeyboardView.createKeyView (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/EditableFlickKeyboardView.kt:567 — EditableFlickKeyboardView.createKeyView has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (18 pts), match/switch 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FloatingCandidatePanel.refresh (cognitive 21) · ×1
  • FloatingCandidatePanel.refresh (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:106 — FloatingCandidatePanel.refresh has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, boolean chains 5, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · IMEService.showNgWordRegistrationPopup (cognitive 21) · ×1
  • IMEService.showNgWordRegistrationPopup (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13404 — IMEService.showNgWordRegistrationPopup has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.createNewKeyboardLayoutForSumire (cognitive 21) · ×1
  • IMEService.createNewKeyboardLayoutForSumire (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15072 — IMEService.createNewKeyboardLayoutForSumire has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), match/switch 3 (5 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · GridSpacingItemDecoration.getItemOffsets (cognitive 21) · ×1
  • GridSpacingItemDecoration.getItemOffsets (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/GridSpacingItemDecoration.kt:14 — GridSpacingItemDecoration.getItemOffsets has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (21 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeverEffectView.drawOrnaments (cognitive 21) · ×1
  • FeverEffectView.drawOrnaments (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverEffectView.kt:580 — FeverEffectView.drawOrnaments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MapAdapter.onBindViewHolder (cognitive 21) · ×1
  • MapAdapter.onBindViewHolder (cognitive 21) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/morse/MorseMapListFragment.kt:163 — MapAdapter.onBindViewHolder 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.
D2 · Cognitive Complexity · InputModeSwitchKt.resolveInputModeSwitchIconResId (cognitive 21) · ×1
  • InputModeSwitchKt.resolveInputModeSwitchIconResId (cognitive 21) core/src/main/java/com/kazumaproject/core/ui/input_mode_witch/InputModeSwitch.kt:105 — InputModeSwitchKt.resolveInputModeSwitchIconResId has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), match/switch 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TfbiGuidePopupView.drawActiveLabel (cognitive 21) · ×1
  • TfbiGuidePopupView.drawActiveLabel (cognitive 21) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/TfbiGuidePopupView.kt:252 — TfbiGuidePopupView.drawActiveLabel has cognitive complexity 21 (threshold 15). Drivers by points: if/else 21. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MorseGuideWindow.show (cognitive 21) · ×1
  • MorseGuideWindow.show (cognitive 21) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseGuideWindow.kt:30 — MorseGuideWindow.show has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · QWERTYKeyboardView.scheduleLongPressForPointer (cognitive 21) · ×1
  • QWERTYKeyboardView.scheduleLongPressForPointer (cognitive 21) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:3173 — QWERTYKeyboardView.scheduleLongPressForPointer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 4 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · KeyWindows.initPath (cognitive 21) · ×1
  • KeyWindows.initPath (cognitive 21) core/src/main/java/com/kazumaproject/core/ui/key_window/KeyWindows.java:89 — KeyWindows.initPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 4, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SuccinctBitVector.select1 (cognitive 20) · ×1
  • SuccinctBitVector.select1 (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/SuccinctBitVector.kt:122 — SuccinctBitVector.select1 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LOUDSWithTermId.prefixesMatchingJoinedInput (cognitive 20) · ×1
  • LOUDSWithTermId.prefixesMatchingJoinedInput (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:140 — LOUDSWithTermId.prefixesMatchingJoinedInput has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (17 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnglishPhraseDictionaryKt.phraseContinuations (cognitive 20) · ×1
  • EnglishPhraseDictionaryKt.phraseContinuations (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/EnglishPhraseDictionary.kt:173 — EnglishPhraseDictionaryKt.phraseContinuations has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LoudsTermIterator.hasNext (cognitive 20) · ×1
  • LoudsTermIterator.hasNext (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LoudsTermIterator.kt:22 — LoudsTermIterator.hasNext has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Evaluator.evaluateFunction (cognitive 20) · ×1
  • Evaluator.evaluateFunction (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/CalculationParser.kt:364 — Evaluator.evaluateFunction has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyEditorFragment.showEditorForMode (cognitive 20) · ×1
  • KeyEditorFragment.showEditorForMode (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:802 — KeyEditorFragment.showEditorForMode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, match/switch 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardEditorViewModel.applyTemplate (cognitive 20) · ×1
  • KeyboardEditorViewModel.applyTemplate (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1614 — KeyboardEditorViewModel.applyTemplate has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, boolean chains 2, match/switch 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · IMEService.applyImePreferences (cognitive 20) · ×1
  • IMEService.applyImePreferences (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:4676 — IMEService.applyImePreferences has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.onUpdateSelection (cognitive 20) · ×1
  • IMEService.onUpdateSelection (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8859 — IMEService.onUpdateSelection has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.onCustomKeyboardLayoutsChanged (cognitive 20) · ×1
  • IMEService.onCustomKeyboardLayoutsChanged (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15476 — IMEService.onCustomKeyboardLayoutsChanged 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.shouldApplyZenzLiveResultToComposingText (cognitive 20) · ×1
  • IMEService.shouldApplyZenzLiveResultToComposingText (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18846 — IMEService.shouldApplyZenzLiveResultToComposingText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.deleteWordOrSymbolsBeforeCursor (cognitive 20) · ×1
  • IMEService.deleteWordOrSymbolsBeforeCursor (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29255 — IMEService.deleteWordOrSymbolsBeforeCursor has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleNonEmptyInputEnterKey (cognitive 20) · ×1
  • IMEService.handleNonEmptyInputEnterKey (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30104 — IMEService.handleNonEmptyInputEnterKey has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 2 (4 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · SuggestionAdapter.setSideCandidateVerticalText (cognitive 20) · ×1
  • SuggestionAdapter.setSideCandidateVerticalText (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:423 — SuggestionAdapter.setSideCandidateVerticalText has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 5 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · RomajiKanaConverter.convertQWERTY (cognitive 20) · ×1
  • RomajiKanaConverter.convertQWERTY (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:451 — RomajiKanaConverter.convertQWERTY has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RomajiKanaConverter.convertQWERTYZenkaku) 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.
D2 · Cognitive Complexity · RomajiKanaConverter.convertQWERTYZenkaku (cognitive 20) · ×1
  • RomajiKanaConverter.convertQWERTYZenkaku (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:519 — RomajiKanaConverter.convertQWERTYZenkaku has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (RomajiKanaConverter.convertQWERTY) 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.
D2 · Cognitive Complexity · SettingSearchIndex.legacyRelatedKeys (cognitive 20) · ×1
  • SettingSearchIndex.legacyRelatedKeys (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:623 — SettingSearchIndex.legacyRelatedKeys has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PopupMapEditorFragment.newMap (cognitive 20) · ×1
  • PopupMapEditorFragment.newMap (cognitive 20) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorFragment.kt:414 — PopupMapEditorFragment.newMap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CustomSymbolKeyboardView.buildCategoryTabs (cognitive 20) · ×1
  • CustomSymbolKeyboardView.buildCategoryTabs (cognitive 20) symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:750 — CustomSymbolKeyboardView.buildCategoryTabs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 3 (7 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhraseGrammar.predicate (cognitive 19) · ×1
  • PhraseGrammar.predicate (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt:136 — PhraseGrammar.predicate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PackedSystemNgramDictionary.matches (cognitive 19) · ×1
  • PackedSystemNgramDictionary.matches (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:84 — PackedSystemNgramDictionary.matches has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ConstrainedDraftSearch.find (cognitive 19) · ×1
  • ConstrainedDraftSearch.find (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/ConstrainedDraftSearch.kt:43 — ConstrainedDraftSearch.find has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 3 (6 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.
D2 · Cognitive Complexity · EditableFlickKeyboardView.setKeyboard (cognitive 19) · ×1
  • EditableFlickKeyboardView.setKeyboard (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/EditableFlickKeyboardView.kt:92 — EditableFlickKeyboardView.setKeyboard has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardEditorFragment.updateUi (cognitive 19) · ×1
  • KeyboardEditorFragment.updateUi (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorFragment.kt:310 — KeyboardEditorFragment.updateUi has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 6, match/switch 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DictionaryCompatibilityValidator.validateSources (cognitive 19) · ×1
  • DictionaryCompatibilityValidator.validateSources (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryCompatibilityValidator.kt:95 — DictionaryCompatibilityValidator.validateSources has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 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.
D2 · Cognitive Complexity · DictionarySourceResolver.resolveCategoryLoadState (cognitive 19) · ×1
  • DictionarySourceResolver.resolveCategoryLoadState (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionarySourceResolver.kt:116 — DictionarySourceResolver.resolveCategoryLoadState has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 9 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ExternalDictionaryZipImporter.importFromUri (cognitive 19) · ×1
  • ExternalDictionaryZipImporter.importFromUri (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/ExternalDictionaryZipImporter.kt:12 — ExternalDictionaryZipImporter.importFromUri has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 1, loops 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.
D2 · Cognitive Complexity · GemmaHandwritingController.recognize (cognitive 19) · ×1
  • GemmaHandwritingController.recognize (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/handwriting/GemmaHandwritingController.kt:161 — GemmaHandwritingController.recognize has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IMEService.onCreate (cognitive 19) · ×1
  • IMEService.onCreate (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:3505 — IMEService.onCreate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.onKeyUp (cognitive 19) · ×1
  • IMEService.onKeyUp (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10044 — IMEService.onKeyUp has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.renderKeyboardMode (cognitive 19) · ×1
  • IMEService.renderKeyboardMode (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10717 — IMEService.renderKeyboardMode has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, match/switch 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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.scheduleExpandedSideCandidateFirstRow (cognitive 19) · ×1
  • IMEService.scheduleExpandedSideCandidateFirstRow (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21745 — IMEService.scheduleExpandedSideCandidateFirstRow has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · ClipboardUtil.getClipboardImageBitmap (cognitive 19) · ×1
  • ClipboardUtil.getClipboardImageBitmap (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/clipboard/ClipboardUtil.kt:143 — ClipboardUtil.getClipboardImageBitmap has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (4 pts), error handling 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AiVoiceInputController.start (cognitive 19) · ×1
  • AiVoiceInputController.start (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/voice_input/AiVoiceInputController.kt:81 — AiVoiceInputController.start has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GojuonSizeSettingsFragment.onViewCreated (cognitive 19) · ×1
  • GojuonSizeSettingsFragment.onViewCreated (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/gojuon_size_setting/GojuonSizeSettingsFragment.kt:23 — GojuonSizeSettingsFragment.onViewCreated has cognitive complexity 19 (threshold 15). Drivers by points: if/else 16 (17 pts), loops 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SettingSearchIndex.readLegacyPreferenceXml (cognitive 19) · ×1
  • SettingSearchIndex.readLegacyPreferenceXml (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:558 — SettingSearchIndex.readLegacyPreferenceXml has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 3, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FlickKeyboardSizeSettingsFragment.onViewCreated (cognitive 19) · ×1
  • FlickKeyboardSizeSettingsFragment.onViewCreated (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/sumire_custom_key_setting/FlickKeyboardSizeSettingsFragment.kt:24 — FlickKeyboardSizeSettingsFragment.onViewCreated has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 1, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PopupMapEditorCanvas.onDraw (cognitive 19) · ×1
  • PopupMapEditorCanvas.onDraw (cognitive 19) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/PopupMapEditorCanvas.kt:114 — PopupMapEditorCanvas.onDraw has cognitive complexity 19 (threshold 15). Drivers by points: if/else 14, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TfbiInputController.handleTouchMove (cognitive 19) · ×1
  • TfbiInputController.handleTouchMove (cognitive 19) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:239 — TfbiInputController.handleTouchMove has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 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.
D2 · Cognitive Complexity · GojuonKeyboardView.resetLayout (cognitive 19) · ×1
  • GojuonKeyboardView.resetLayout (cognitive 19) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4212 — GojuonKeyboardView.resetLayout has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CompositionRegressionRunner.tapResource (cognitive 19) · ×1
  • CompositionRegressionRunner.tapResource (cognitive 19) enter-parity-lab/src/main/java/com/kazumaproject/enterparity/CompositionRegressionRunner.java:112 — CompositionRegressionRunner.tapResource has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (12 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CandidateOrderOverrideFragment.observeUiState (cognitive 18) · ×1
  • CandidateOrderOverrideFragment.observeUiState (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:166 — CandidateOrderOverrideFragment.observeUiState 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.
D2 · Cognitive Complexity · SuccinctBitVector.select0 (cognitive 18) · ×1
  • SuccinctBitVector.select0 (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/SuccinctBitVector.kt:178 — SuccinctBitVector.select0 has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3, 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.
D2 · Cognitive Complexity · QwertyGlideDecoder.decode (cognitive 18) · ×1
  • QwertyGlideDecoder.decode (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideDecoder.kt:21 — QwertyGlideDecoder.decode has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwertyGlideWordPathScorer.score (cognitive 18) · ×1
  • QwertyGlideWordPathScorer.score (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/glide/QwertyGlideWordPathScorer.kt:34 — QwertyGlideWordPathScorer.score has cognitive complexity 18 (threshold 15). Drivers by points: loops 7 (10 pts), if/else 3 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PackedSystemNgramDictionary.mayMatchFirstPair (cognitive 18) · ×1
  • PackedSystemNgramDictionary.mayMatchFirstPair (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:125 — PackedSystemNgramDictionary.mayMatchFirstPair has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (12 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InsertionTargetMapper.mapPointer (cognitive 18) · ×1
  • InsertionTargetMapper.mapPointer (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/InsertionTargetMapper.kt:10 — InsertionTargetMapper.mapPointer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 5, match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · IMEService.dispatchMorseOutput (cognitive 18) · ×1
  • IMEService.dispatchMorseOutput (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12282 — IMEService.dispatchMorseOutput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.resolveZenzLiveRequestInput (cognitive 18) · ×1
  • IMEService.resolveZenzLiveRequestInput (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:19179 — IMEService.resolveZenzLiveRequestInput has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 5 (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. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · EnglishVerbForms.suggest (cognitive 18) · ×1
  • EnglishVerbForms.suggest (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/english/EnglishGrammarCorrection.kt:13 — EnglishVerbForms.suggest has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NumberExtenstionKt.toKanji (cognitive 18) · ×1
  • NumberExtenstionKt.toKanji (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/NumberExtenstion.kt:241 — NumberExtenstionKt.toKanji has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 2 (4 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.
D2 · Cognitive Complexity · FloatingCursorController.refresh (cognitive 18) · ×1
  • FloatingCursorController.refresh (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorController.kt:70 — FloatingCursorController.refresh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, boolean chains 5, error handling 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardThemeFragment.syncSearchAvailability (cognitive 18) · ×1
  • KeyboardThemeFragment.syncSearchAvailability (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardThemeFragment.kt:553 — KeyboardThemeFragment.syncSearchAvailability has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6, match/switch 3. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · SettingsPreferenceAdapter.onBindViewHolder (cognitive 18) · ×1
  • SettingsPreferenceAdapter.onBindViewHolder (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingsPreferenceAdapter.kt:21 — SettingsPreferenceAdapter.onBindViewHolder has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SystemUserDictionaryBuilderViewModel.importFromInternalSources (cognitive 18) · ×1
  • SystemUserDictionaryBuilderViewModel.importFromInternalSources (cognitive 18) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/system_user_dictionary/ui/SystemUserDictionaryBuilderViewModel.kt:116 — SystemUserDictionaryBuilderViewModel.importFromInternalSources has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InputModeSwitchIconDrawable.draw (cognitive 18) · ×1
  • InputModeSwitchIconDrawable.draw (cognitive 18) core/src/main/java/com/kazumaproject/core/ui/input_mode_witch/InputModeSwitchIconDrawable.kt:91 — InputModeSwitchIconDrawable.draw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QwertyKeyInputController.attach (cognitive 18) · ×1
  • QwertyKeyInputController.attach (cognitive 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/QwertyKeyInputController.kt:71 — QwertyKeyInputController.attach has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · PopupOutline.isValid (cognitive 18) · ×1
  • PopupOutline.isValid (cognitive 18) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/PopupOutline.kt:18 — PopupOutline.isValid has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GojuonKeyboardView.onLongPressed (cognitive 18) · ×1
  • GojuonKeyboardView.onLongPressed (cognitive 18) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3591 — GojuonKeyboardView.onLongPressed has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), match/switch 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.
D2 · Cognitive Complexity · QWERTYKeyboardView.onLayout (cognitive 18) · ×1
  • QWERTYKeyboardView.onLayout (cognitive 18) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:198 — QWERTYKeyboardView.onLayout has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · TenKey.applyModeLetterSize (cognitive 18) · ×1
  • TenKey.applyModeLetterSize (cognitive 18) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:2374 — TenKey.applyModeLetterSize has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 6, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExtenstionsKt.addingStringToListForCommonPrefix (cognitive 17) · ×1
  • ExtenstionsKt.addingStringToListForCommonPrefix (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt:131 — ExtenstionsKt.addingStringToListForCommonPrefix has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 3 (6 pts), match/switch 1 (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.
D2 · Cognitive Complexity · LOUDSWithTermId.searchShortArray (cognitive 17) · ×1
  • LOUDSWithTermId.searchShortArray (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:692 — LOUDSWithTermId.searchShortArray has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 2 other methods here (LOUDSWithTermId.search, LOUDSWithTermId.search) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · FindPath.forwardDp (cognitive 17) · ×1
  • FindPath.forwardDp (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1286 — FindPath.forwardDp has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtilityCandidateComposer.compose (cognitive 17) · ×1
  • UtilityCandidateComposer.compose (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UtilityCandidateComposer.kt:13 — UtilityCandidateComposer.compose has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GemmaFloatingWindow.refresh (cognitive 17) · ×1
  • GemmaFloatingWindow.refresh (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:80 — GemmaFloatingWindow.refresh has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 4, error handling 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · IMEService.launchMushroom (cognitive 17) · ×1
  • IMEService.launchMushroom (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:24922 — IMEService.launchMushroom has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 2, error handling 2, match/switch 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.getSuggestionList (cognitive 17) · ×1
  • IMEService.getSuggestionList (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28641 — IMEService.getSuggestionList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleSpaceKeyClickFloating (cognitive 17) · ×1
  • IMEService.handleSpaceKeyClickFloating (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29676 — IMEService.handleSpaceKeyClickFloating has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (15 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · HandleView.onDraw (cognitive 17) · ×1
  • HandleView.onDraw (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/FloatingPanelFrame.kt:266 — HandleView.onDraw has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 2 (5 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.
D2 · Cognitive Complexity · FeverController.configure (cognitive 17) · ×1
  • FeverController.configure (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverController.kt:103 — FeverController.configure has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FeverController.touch (cognitive 17) · ×1
  • FeverController.touch (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/fever/FeverController.kt:205 — FeverController.touch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (15 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.
D2 · Cognitive Complexity · CursorMovement.isEmojiInternalBoundary (cognitive 17) · ×1
  • CursorMovement.isEmojiInternalBoundary (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/CursorMovement.kt:151 — CursorMovement.isEmojiInternalBoundary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RomajiKanaConverter.convert (cognitive 17) · ×1
  • RomajiKanaConverter.convert (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:317 — RomajiKanaConverter.convert 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.
D2 · Cognitive Complexity · KeyboardContainerPresentation.apply (cognitive 17) · ×1
  • KeyboardContainerPresentation.apply (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:28 — KeyboardContainerPresentation.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), match/switch 2 (3 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MushroomTarget.capture (cognitive 17) · ×1
  • MushroomTarget.capture (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/mushroom/MushroomTarget.kt:47 — MushroomTarget.capture has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomZeroQueryRepository.importEntries (cognitive 17) · ×1
  • CustomZeroQueryRepository.importEntries (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/CustomZeroQueryRepository.kt:205 — CustomZeroQueryRepository.importEntries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardRepository.convertToUiModel (cognitive 17) · ×1
  • KeyboardRepository.convertToUiModel (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:833 — KeyboardRepository.convertToUiModel has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 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.
D2 · Cognitive Complexity · SizeHandles.drawResizeGrip (cognitive 17) · ×1
  • SizeHandles.drawResizeGrip (cognitive 17) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_geometry/UnifiedKeyboardSettingsFragment.kt:690 — SizeHandles.drawResizeGrip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 14, match/switch 2, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CupertinoIllumination.shader (cognitive 17) · ×1
  • CupertinoIllumination.shader (cognitive 17) core/src/main/java/com/kazumaproject/core/ui/skin/CupertinoIllumination.kt:22 — CupertinoIllumination.shader has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PopupMapValidator.conflicts (cognitive 17) · ×1
  • PopupMapValidator.conflicts (cognitive 17) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/data/PopupMap.kt:73 — PopupMapValidator.conflicts has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 8, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GojuonKeyboardView.setKeysInEnglishText (cognitive 17) · ×1
  • GojuonKeyboardView.setKeysInEnglishText (cognitive 17) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4442 — GojuonKeyboardView.setKeysInEnglishText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (17 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MorseEngine.nextElement (cognitive 17) · ×1
  • MorseEngine.nextElement (cognitive 17) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseEngine.kt:92 — MorseEngine.nextElement has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · QWERTYKeyboardView.findButtonUnder (cognitive 17) · ×1
  • QWERTYKeyboardView.findButtonUnder (cognitive 17) qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:2984 — QWERTYKeyboardView.findButtonUnder has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnglishEngine.getConversionCandidates (cognitive 16) · ×1
  • EnglishEngine.getConversionCandidates (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/EnglishEngine.kt:531 — EnglishEngine.getConversionCandidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PhraseGrammar.simpleClause (cognitive 16) · ×1
  • PhraseGrammar.simpleClause (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt:109 — PhraseGrammar.simpleClause 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.
D2 · Cognitive Complexity · PackedSystemNgramDictionary.encodeQuery (cognitive 16) · ×1
  • PackedSystemNgramDictionary.encodeQuery (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt:362 — PackedSystemNgramDictionary.encodeQuery has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), match/switch 2 (4 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.
D2 · Cognitive Complexity · NgramRuleScorer.score (cognitive 16) · ×1
  • NgramRuleScorer.score (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/NgramRuleScorer.kt:61 — NgramRuleScorer.score has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UtilityCandidateProvider.looksLikeUnitExpression (cognitive 16) · ×1
  • UtilityCandidateProvider.looksLikeUnitExpression (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UtilityCandidateProvider.kt:62 — UtilityCandidateProvider.looksLikeUnitExpression has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (5 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.
D2 · Cognitive Complexity · FlickGridEditorView.computeNewTwoStepMode (cognitive 16) · ×1
  • FlickGridEditorView.computeNewTwoStepMode (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:525 — FlickGridEditorView.computeNewTwoStepMode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 3 (5 pts) (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FlickGridEditorView.updateTwoStepLabels (cognitive 16) · ×1
  • FlickGridEditorView.updateTwoStepLabels (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/FlickGridEditorView.kt:740 — FlickGridEditorView.updateTwoStepLabels has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 4, loops 2 (3 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyEditorFragment.updateCustomKeyboardTargetVisibility (cognitive 16) · ×1
  • KeyEditorFragment.updateCustomKeyboardTargetVisibility (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1126 — KeyEditorFragment.updateCustomKeyboardTargetVisibility has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GemmaRuntimeClient.generateLocked (cognitive 16) · ×1
  • GemmaRuntimeClient.generateLocked (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/runtime/GemmaRuntimeClient.kt:211 — GemmaRuntimeClient.generateLocked has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 4. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · IMEService.applyDictionaryOverrideRevisionIfNeeded (cognitive 16) · ×1
  • IMEService.applyDictionaryOverrideRevisionIfNeeded (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5135 — IMEService.applyDictionaryOverrideRevisionIfNeeded has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.createKeyboardBackgroundDrawable (cognitive 16) · ×1
  • IMEService.createKeyboardBackgroundDrawable (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6482 — IMEService.createKeyboardBackgroundDrawable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.configureGojuonKeyView (cognitive 16) · ×1
  • IMEService.configureGojuonKeyView (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12359 — IMEService.configureGojuonKeyView has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (15 pts), match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.showSelectionActions (cognitive 16) · ×1
  • IMEService.showSelectionActions (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13576 — IMEService.showSelectionActions has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.showQwertyGlideCandidates (cognitive 16) · ×1
  • IMEService.showQwertyGlideCandidates (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26137 — IMEService.showQwertyGlideCandidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.updateUIinHenkan (cognitive 16) · ×1
  • IMEService.updateUIinHenkan (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27999 — IMEService.updateUIinHenkan has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (10 pts), match/switch 2 (4 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent 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 file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.setCandidatesEnglishKana (cognitive 16) · ×1
  • IMEService.setCandidatesEnglishKana (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28490 — IMEService.setCandidatesEnglishKana has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.executeTextMacro (cognitive 16) · ×1
  • IMEService.executeTextMacro (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29104 — IMEService.executeTextMacro has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · IMEService.handleLeftKeyPress (cognitive 16) · ×1
  • IMEService.handleLeftKeyPress (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30502 — IMEService.handleLeftKeyPress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This file is where this pass's cognitive complexity CONCENTRATES: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt holds 70 of the 323 methods over the threshold — including the worst — and 1641 of the 6252 points over it (26%), 3.8× the next-largest file (gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt at 430). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D2 · Cognitive Complexity · EnglishCorrectionEditor.capture (cognitive 16) · ×1
  • EnglishCorrectionEditor.capture (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/english/EnglishCorrectionEditor.kt:37 — EnglishCorrectionEditor.capture has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KeyboardContainerPresentation.createKeyboardBackgroundDrawable (cognitive 16) · ×1
  • KeyboardContainerPresentation.createKeyboardBackgroundDrawable (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardContainerPresentation.kt:139 — KeyboardContainerPresentation.createKeyboardBackgroundDrawable has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardPreviewView.createSplit (cognitive 16) · ×1
  • KeyboardPreviewView.createSplit (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:445 — KeyboardPreviewView.createSplit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, match/switch 1 (2 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardPreviewView.onLayout (cognitive 16) · ×1
  • KeyboardPreviewView.onLayout (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/keyboard_presentation/KeyboardPreviewView.kt:522 — KeyboardPreviewView.onLayout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UnifiedKeyboardSettingsFragment.updateWarning (cognitive 16) · ×1
  • UnifiedKeyboardSettingsFragment.updateWarning (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_geometry/UnifiedKeyboardSettingsFragment.kt:463 — UnifiedKeyboardSettingsFragment.updateWarning has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ThemeAdapter.onBindViewHolder (cognitive 16) · ×1
  • ThemeAdapter.onBindViewHolder (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_theme/KeyboardSkinSelectionFragment.kt:60 — ThemeAdapter.onBindViewHolder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 15 (16 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TenKeyCandidateLetterSizeFragment.onViewCreated (cognitive 16) · ×1
  • TenKeyCandidateLetterSizeFragment.onViewCreated (cognitive 16) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/tenkey_letter_size_setting/TenKeyCandidateLetterSizeFragment.kt:24 — TenKeyCandidateLetterSizeFragment.onViewCreated has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.applyDeleteKeyFlickSettings (cognitive 16) · ×1
  • KeyboardDefaultLayouts.applyDeleteKeyFlickSettings (cognitive 16) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:90 — KeyboardDefaultLayouts.applyDeleteKeyFlickSettings has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · KeyboardDefaultLayouts.ensureSumireSpecialKeyCrossFlickAttach (cognitive 16) · ×1
  • KeyboardDefaultLayouts.ensureSumireSpecialKeyCrossFlickAttach (cognitive 16) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:325 — KeyboardDefaultLayouts.ensureSumireSpecialKeyCrossFlickAttach 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.
D2 · Cognitive Complexity · FlickKeyboardView.findGeometryTarget (cognitive 16) · ×1
  • FlickKeyboardView.findGeometryTarget (cognitive 16) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3288 — FlickKeyboardView.findGeometryTarget has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · StandardFlickPopupView.resolveDirectionalColor (cognitive 16) · ×1
  • StandardFlickPopupView.resolveDirectionalColor (cognitive 16) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/StandardFlickPopupView.kt:375 — StandardFlickPopupView.resolveDirectionalColor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), error handling 1 (3 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MorseKanaModifier.apply (cognitive 16) · ×1
  • MorseKanaModifier.apply (cognitive 16) morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseKanaModifier.kt:7 — MorseKanaModifier.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 128 shared lines) · ×1
  • Near-duplicate member family (5 members, 128 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3559 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3559-3879 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4021-4320 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5034-5788 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6576-7324 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8469-9271 — These 5 members are variants of one another: a block of 128 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 158 shared lines) · ×1
  • Near-duplicate member family (4 members, 158 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3275 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3275-3555 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6133-6572 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8027-8465 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9275-9752 — These 4 members are variants of one another: a block of 158 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, 143 shared lines) · ×1
  • Near-duplicate member family (4 members, 143 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1173 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1173-1473 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5034-5788 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6576-7324 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8469-9271 — These 4 members are variants of one another: a block of 143 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, 88 shared lines) · ×1
  • Near-duplicate member family (4 members, 88 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4324 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4324-4578 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5792-6129 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7328-7663 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7667-8023 — These 4 members are variants of one another: a block of 88 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 41 shared lines) · ×1
  • Near-duplicate member family (3 members, 41 shared lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:714 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:714-782 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:696-774 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1236-1321 — These 3 members are variants of one another: a block of 41 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (399 shared lines) · ×1
  • Near-duplicate member pair (399 shared lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228-2702 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2704-3178 — These two members are variants of one another: 399 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 · Near-duplicate member pair (273 shared lines) · ×1
  • Near-duplicate member pair (273 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2135 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2135-2430 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2434-2759 — These two members are variants of one another: 273 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 · Near-duplicate member pair (246 shared lines) · ×1
  • Near-duplicate member pair (246 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1844 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1844-2131 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2434-2759 — These two members are variants of one another: 246 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 · Near-duplicate member pair (226 shared lines) · ×1
  • Near-duplicate member pair (226 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1844 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1844-2131 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2135-2430 — These two members are variants of one another: 226 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 · Near-duplicate member pair (218 shared lines) · ×1
  • Near-duplicate member pair (218 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2763 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2763-3027 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3032-3271 — These two members are variants of one another: 218 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 · Near-duplicate member pair (134 shared lines) · ×1
  • Near-duplicate member pair (134 shared lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4002 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4002-4210 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4212-4413 — These two members are variants of one another: 134 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 · Near-duplicate member pair (128 shared lines) · ×1
  • Near-duplicate member pair (128 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893-1169 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6576-7324 — These two members are variants of one another: 128 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 · Near-duplicate member pair (119 shared lines) · ×1
  • Near-duplicate member pair (119 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893-1169 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4021-4320 — These two members are variants of one another: 119 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 · Near-duplicate member pair (118 shared lines) · ×1
  • Near-duplicate member pair (118 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893-1169 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5034-5788 — These two members are variants of one another: 118 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 · Near-duplicate member pair (115 shared lines) · ×1
  • Near-duplicate member pair (115 shared lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:893-1169 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3559-3879 — These two members are variants of one another: 115 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 · Near-duplicate member pair (95 shared lines) · ×1
  • Near-duplicate member pair (95 shared lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12455 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12455-12644 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12655-12847 — These two members are variants of one another: 95 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 · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:476 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:476-559 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:366-459 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (29 shared lines) · ×1
  • Near-duplicate member pair (29 shared lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:496 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:496-556 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:561-621 — These two members are variants of one another: 29 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 (137 corresponding lines) · ×1
  • Edited copy of a member (137 corresponding lines) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:170 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:170-335 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:337-473 — These two members are one piece of code written twice and then edited apart: 137 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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 (15 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (15 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9571 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9571-9602 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10406-10439 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10443-10484 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18531-18569 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21892-22047 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22052-22086 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22117-22161 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22201-22217 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22283-22306 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22864-22900 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22993-23062 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26140-26187 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26509-26616 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26901-26932 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30437-30476 — These 15 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 15 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 15 times.
D4 · Code Duplication · Members sharing a duplicated core (10 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (10 members, 50+ identical tokens) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:604 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:604-888 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1475-1840 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1844-2131 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2763-3027 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3559-3879 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5034-5788 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5792-6129 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6133-6572 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6576-7324 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8469-9271 — These 10 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 10 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 10 times.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:870 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:870-1338 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1356-1853 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1871-2351 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2369-2834 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2926-3377 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3394-3885 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3990-4088 — These 7 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 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Edited copy of a member (360 corresponding lines) · ×1
  • Edited copy of a member (360 corresponding lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228-2702 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3180-3539 — These two members are one piece of code written twice and then edited apart: 360 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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, 51+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 51+ corresponding lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/AppCompatButton.kt:8 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/AppCompatButton.kt:8-74 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/AppCompatButton.kt:76-134 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/AppCompatButton.kt:136-197 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/AppCompatButton.kt:199-249 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 51 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (120 corresponding lines) · ×1
  • Edited copy of a member (120 corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3883 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3883-4017 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4580-4699 — 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 (84 corresponding lines) · ×1
  • Edited copy of a member (84 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:80 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:80-163 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt:106-201 — These two members are one piece of code written twice and then edited apart: 84 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2394 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2394-2469 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:979-1057 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (90 corresponding lines) · ×1
  • Edited copy of a member (90 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28549 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28549-28639 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28803-28892 — 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 (123 corresponding lines) · ×1
  • Edited copy of a member (123 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5651 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5651-5773 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5777-5899 — These two members are one piece of code written twice and then edited apart: 123 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:36 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:36-106 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:108-177 — 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 (93 corresponding lines) · ×1
  • Edited copy of a member (93 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28216 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28216-28308 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28314-28407 — These two members are one piece of code written twice and then edited apart: 93 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (66 corresponding lines) · ×1
  • Edited copy of a member (66 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:59 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:59-136 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:160-225 — These two members are one piece of code written twice and then edited apart: 66 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:148 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:148-200 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:148-200 — 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 (57 corresponding lines) · ×1
  • Edited copy of a member (57 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:109 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:109-165 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:101-157 — These two members are one piece of code written twice and then edited apart: 57 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:143 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:143-210 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:425-489 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 61+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 61+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14511 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14511-14587 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14589-14651 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14653-14713 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 61 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or 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 (54 corresponding lines) · ×1
  • Edited copy of a member (54 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:46 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsAdapters.kt:46-99 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ShortcutToolbarAdapters.kt:54-108 — 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 copies of one member (3 members, 30+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 30+ corresponding lines) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:270 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:270-299 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:432-474 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:358-398 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 30 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:112 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:112-158 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:115-161 — 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 (67 corresponding lines) · ×1
  • Edited copy of a member (67 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:92 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/FrequentSettingsEditFragment.kt:92-158 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/ui/ShortCutSettingFragment.kt:68-140 — These two members are one piece of code written twice and then edited apart: 67 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 58+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 58+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:641 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:641-699 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:495-556 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:271-328 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1917-1974 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 58 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:407 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:407-446 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:448-487 — 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 (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/SuccinctBitVector.kt:122 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/SuccinctBitVector.kt:122-173 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/bitset/SuccinctBitVector.kt:178-234 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 41+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 41+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:140 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:140-182 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:184-226 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/session/KanaKanjiConversionSession.kt:228-268 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6029 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6029-6087 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6099-6154 — 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 (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12975 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12975-13024 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:13028-13075 — 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 copies of one member (3 members, 70+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 70+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:5 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:5-74 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:76-145 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/extensions/InputTypeForIME.kt:147-217 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 70 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or 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 (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29255 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29255-29299 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29307-29347 — 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 (4 members, 41+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 41+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:182 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:182-222 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:179-224 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:181-229 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:181-225 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 41 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:342 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:342-382 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:245-275 — 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 (5 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 43+ corresponding lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:218 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:218-262 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:88-135 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:275-317 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:373-417 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/PopupWindowExtension.kt:496-540 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (39 corresponding lines) · ×1
  • Edited copy of a member (39 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11544 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:11544-11589 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15405-15443 — 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 (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:488 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:488-531 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/import_export/KeyboardBackupPipeline.kt:542-585 — 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) · ×1
  • Edited copy of a member (49 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18358 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18358-18420 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18425-18473 — 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 (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27999 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27999-28073 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28077-28138 — 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 copies of one member (3 members, 43+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 43+ corresponding lines) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:122 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:122-164 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:170-212 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/extenstions/PopupWindow.kt:339-383 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 43 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:819 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:819-853 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:995-1031 — 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 (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:30 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidPerformanceGovernor.kt:30-58 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRipplePerformanceGovernor.kt:29-57 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintPerformanceGovernor.kt:35-58 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 33+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 33+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:285 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:285-320 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:283-319 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:196-228 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 33 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:109 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:109-146 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:109-146 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 26+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:546 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:546-574 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:581-607 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:630-658 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:616-641 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:648-675 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:698-723 — These 6 members are one piece of code written 6 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 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/QwertyGlideInputCoordinator.kt:49 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/QwertyGlideInputCoordinator.kt:49-78 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/QwertyGlideInputCoordinator.kt:83-112 — 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 (3 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 6+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:173 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_clipboard/FloatingClipboardController.kt:173-180 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_cursor/FloatingCursorSettings.kt:21-27 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_dictionary/FloatingDictionaryController.kt:377-382 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 24+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputInjector.kt:76 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputInjector.kt:76-99 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputInjector.kt:89-115 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:100-127 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:109-137 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:55 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:55-77 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:82-101 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:169-187 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/dictionary/TokenArray.kt:192-209 — 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 (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:302 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:302-313 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:132-143 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:146-160 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:146-160 — 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, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:71 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:71-87 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:61-77 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:64-80 — 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 (3 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:41 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:41-67 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputInjector.kt:41-66 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:47-74 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 13+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:346 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:346-359 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:367-380 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:387-400 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:431-444 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:452-465 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:473-487 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:533-545 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 25+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:9 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:9-33 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputCommandQueue.kt:9-33 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputCommandQueue.kt:9-33 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputCommandQueue.kt:9-33 — These 4 members are one piece of code written 4 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 4 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:306 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:306-321 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:323-338 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:523-538 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:344-359 — 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 (5 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 15+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:410 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:410-427 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:467-481 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:483-497 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:503-517 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/with_term_id/LOUDSWithTermId.kt:489-503 — These 5 members are one piece of code written 5 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 5 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) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/circular_slot/CircularSlotActionSettingFragment.kt:132 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/circular_slot/CircularSlotActionSettingFragment.kt:132-148 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_direct_input/KeyboardSizeDirectInputFragment.kt:59-75 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/opensource/OpenSourceFragment.kt:140-161 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/qwerty_number_key_flick/QwertyNumberKeyFlickSettingFragment.kt:60-76 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 19+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:112 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:112-131 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/LOUDS.kt:136-154 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:135-154 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/louds/LOUDS.kt:159-177 — 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, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:160 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:160-169 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:163-176 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/text_macro/ui/TextMacroEditorFragment.kt:271-279 — 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 (5 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 14+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:56 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveInputCommandQueue.kt:56-69 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputCommandQueue.kt:56-70 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputCommandQueue.kt:56-69 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobInputCommandQueue.kt:56-72 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputCommandQueue.kt:56-72 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 9+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:396 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:396-404 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:279-287 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:277-285 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:373-381 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:309-317 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 8+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:233 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/clipboard_history/ui/ClipboardHistoryFragment.kt:233-240 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardListFragment.kt:205-212 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:212-219 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:115-122 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:222-229 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:312-319 — These 6 members are one piece of code written 6 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 6 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:140 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInputInjector.kt:140-144 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleInputInjector.kt:127-131 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintInputInjector.kt:149-153 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×1
  • Edited copy of a member (1 corresponding lines) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_geometry/UnifiedKeyboardSettingsFragment.kt:267 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_geometry/UnifiedKeyboardSettingsFragment.kt:267-267 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/sumire_popup/FreeFlickLayoutsFragment.kt:50-50 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (239 lines × 3) · ×1
  • Duplicated block (239 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5349 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5349-5587 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6894-7132 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8811-9049 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5349` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (223–224 lines × 3) · ×1
  • Duplicated block (223–224 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2479 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2479-2702 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2955-3178 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3317-3539 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2479` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (170–171 lines × 3) · ×1
  • Duplicated block (170–171 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1887 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1887-2057 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2180-2349 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2507-2676 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1887` it begins part-way through the construct above it, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2059` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2351` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (117 lines × 6) · ×1
  • Duplicated block (117 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1207 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1207-1323 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1714-1830 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2210-2326 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2704-2820 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3247-3363 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3746-3862 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1205` calls `buildPredictiveCandidatesIncludingSystemUser` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3245` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (117 lines × 3) · ×1
  • Duplicated block (117 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5071 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5071-5187 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6612-6728 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8506-8622 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5071` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (114 lines × 2) · ×1
  • Duplicated block (114 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6161 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6161-6274 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8054-8167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (104–105 lines × 3) · ×1
  • Duplicated block (104–105 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228-2332 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2704-2808 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3180-3283 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2228` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (99 lines × 6) · ×1
  • Duplicated block (99 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:919 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:919-1017 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1407-1505 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1922-2020 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2418-2516 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2966-3064 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3445-3543 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:919` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (85–96 lines × 4) · ×1
  • Duplicated block (85–96 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2818 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2818-2912 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2924-3019 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3075-3169 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3179-3263 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2818` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (93–94 lines × 2) · ×1
  • Duplicated block (93–94 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3586 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3586-3678 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4047-4140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3586` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (143–149 lines × 3) · ×1
  • Duplicated block (143–149 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:691 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:691-838 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:973-1121 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1281-1423 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:691` 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:840` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1123` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (93 lines × 3) · ×1
  • Duplicated block (93 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5829 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5829-5921 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7364-7456 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7703-7795 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5829` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (80–83 lines × 2) · ×1
  • Duplicated block (80–83 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28226 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28226-28308 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28328-28407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28226` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (81 lines × 2) · ×1
  • Duplicated block (81 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:395 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:395-475 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:395-475 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (75 lines × 2) · ×1
  • Duplicated block (75 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25328 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25328-25402 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25410-25484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:25328` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (70 lines × 2) · ×1
  • Duplicated block (70 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3884 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3884-3953 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4581-4650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3884` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (67 lines × 8) · ×1
  • Duplicated block (67 lines × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3339 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3339-3405 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3450-3516 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6400-6466 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6495-6561 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8293-8359 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8387-8453 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9535-9601 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9646-9712 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3339` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (64–66 lines × 2) · ×1
  • Duplicated block (64–66 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27839 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27839-27904 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27934-27997 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:27839` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (66 lines × 2) · ×1
  • Duplicated block (66 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:271 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:271-336 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt:271-336 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 406 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (65 lines × 6) · ×1
  • Duplicated block (65 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1044 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1044-1108 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1543-1607 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2096-2160 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2598-2662 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3090-3154 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3581-3645 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1110` calls `d` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3156` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (62 lines × 2) · ×1
  • Duplicated block (62 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4130 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4130-4191 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4220-4281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (49–61 lines × 2) · ×1
  • Duplicated block (49–61 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31044 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31044-31092 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31099-31159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (55–57 lines × 2) · ×1
  • Duplicated block (55–57 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:79 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:79-135 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:168-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (54 lines × 3) · ×1
  • Duplicated block (54 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1839 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1839-1892 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2298-2351 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:2386-2439 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (51–52 lines × 2) · ×1
  • Duplicated block (51–52 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28550 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28550-28601 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28804-28854 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28550` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7803 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7803-7851 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8624-8672 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7803` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (47–48 lines × 2) · ×1
  • Duplicated block (47–48 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2422 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2422-2469 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:1011-1057 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2422` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (77 lines × 4) · ×1
  • Duplicated block (77 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4480 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4480-4556 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6008-6084 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7543-7619 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7901-7977 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4480` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (45–46 lines × 3) · ×1
  • Duplicated block (45–46 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14535 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14535-14580 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14600-14644 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14664-14708 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14535` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (46 lines × 2) · ×1
  • Duplicated block (46 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28027 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28027-28072 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28093-28138 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28027` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (45–46 lines × 2) · ×1
  • Duplicated block (45–46 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28417 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28417-28461 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28497-28542 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28417` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:796 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:796-838 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:788-830 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Duplicated block (25–42 lines × 5) · ×1
  • Duplicated block (25–42 lines × 5) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1696 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1696-1721 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:799-823 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:799-840 | symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:504-540 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1346-1387 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:1696` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:47 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:47-88 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/DataConverterExtensions.kt:118-159 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12594 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12594-12634 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12797-12837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:12594` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:367 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:367-406 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:359-398 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:367` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36–40 lines × 2) · ×1
  • Duplicated block (36–40 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3560 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3560-3599 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6577-6612 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3560` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (39 lines × 3) · ×1
  • Duplicated block (39 lines × 3) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:486 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:486-524 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:529-567 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:615-653 — 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 `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:486` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37 lines × 5) · ×1
  • Duplicated block (37 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:501 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:501-537 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:383-419 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:381-417 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:479-515 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:413-449 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (36–37 lines × 3) · ×1
  • Duplicated block (36–37 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:654 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:654-689 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:935-971 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1243-1279 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:654` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28603 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28603-28639 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28856-28892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28603` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 5) · ×1
  • Duplicated block (36 lines × 5) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:86 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:86-121 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:126-161 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:166-201 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:206-241 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:246-281 — 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 `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35 lines × 3) · ×1
  • Duplicated block (35 lines × 3) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:326 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:326-360 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:406-440 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:446-480 — 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 `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:326` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (27–34 lines × 2) · ×1
  • Duplicated block (27–34 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/GridSpacingItemDecoration.kt:20 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/GridSpacingItemDecoration.kt:20-53 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateHeightPreviewUtils.kt:40-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/GridSpacingItemDecoration.kt:20` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:449 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:449-482 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt:441-474 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt` as WHOLE FILES: this scan already matched 34 separate duplicated blocks between them, totalling at least 619 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 · Duplicated block (33 lines × 5) · ×1
  • Duplicated block (33 lines × 5) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3771 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3771-3803 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4211-4243 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5656-5688 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7193-7225 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9138-9170 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3771` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31–33 lines × 4) · ×1
  • Duplicated block (31–33 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1112 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1112-1142 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1611-1641 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3154-3186 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3645-3677 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (31–33 lines × 2) · ×1
  • Duplicated block (31–33 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2030 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2030-2062 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:759-789 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2030` it begins part-way through the construct above it, so those 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 `state` to `QuickActionsState` in one and `HelperActionsState` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:757` calls `applyEmptyHelperTextColor` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2030` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (32 lines × 4) · ×1
  • Duplicated block (32 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3680 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3680-3711 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6745-6776 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7479-7510 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8190-8221 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3680` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6777` calls `when` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3713` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31–32 lines × 3) · ×1
  • Duplicated block (31–32 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2366 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2366-2397 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2842-2873 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:3281-3311 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:2366` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (32 lines × 2) · ×1
  • Duplicated block (32 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:366 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:366-397 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:658-689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/MaterialTextExtension.kt:366` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (29–31 lines × 6) · ×1
  • Duplicated block (29–31 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1174 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1174-1204 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1681-1711 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2177-2207 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2671-2701 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3217-3245 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3716-3744 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (30–31 lines × 2) · ×1
  • Duplicated block (30–31 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23025 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23025-23054 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26571-26601 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23025` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23055` calls `set` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26602` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×1
  • Duplicated block (31 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:642 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:642-672 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:496-526 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:642` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28–30 lines × 3) · ×1
  • Duplicated block (28–30 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:338 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:338-367 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:481-508 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:549-576 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:338` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26–30 lines × 2) · ×1
  • Duplicated block (26–30 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:383 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/CustomAngleFlickPopupView.kt:383-408 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickCirclePopupView.kt:411-440 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
D4 · Code Duplication · Duplicated block (26–29 lines × 15) · ×1
  • Duplicated block (26–29 lines × 15) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:626 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:626-651 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:905-932 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1213-1240 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2146-2173 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2473-2500 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3276-3303 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3734-3761 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4180-4208 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5259-5284 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5621-5646 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6810-6836 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7156-7183 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8725-8751 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9101-9128 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9472-9499 — all 15 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:626` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (28 lines × 6) · ×1
  • Duplicated block (28 lines × 6) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2060 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2060-2087 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2094-2121 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2351-2378 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2384-2411 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2679-2706 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2713-2740 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2058` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2349` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (25–27 lines × 10) · ×1
  • Duplicated block (25–27 lines × 10) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1541 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1541-1567 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5179-5203 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5919-5943 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6272-6296 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6720-6744 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7454-7478 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7793-7817 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8165-8189 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8614-8638 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9416-9440 — all 10 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1541` it begins part-way through the construct above it, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9441` calls `InputText`, `KeyData` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5204` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4128 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4128-4154 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4424-4449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4128` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (23–26 lines × 3) · ×1
  • Duplicated block (23–26 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5325 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5325-5347 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6868-6893 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8785-8810 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5325` it does not close everything it opens, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6894` calls `mapOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5347` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–26 lines × 2) · ×1
  • Duplicated block (18–26 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1639 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1639-1656 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:771-796 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1639` 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.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31419 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31419-31444 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31454-31479 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31419` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31418` calls `d` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31453` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7826 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7826-7849 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8647-8670 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9442-9465 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7826` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23 lines × 5) · ×1
  • Duplicated block (23 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:871 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:871-893 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1357-1379 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1872-1894 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2370-2392 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3395-3417 — 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.
D4 · Code Duplication · Duplicated block (23 lines × 4) · ×1
  • Duplicated block (23 lines × 4) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:146 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:146-168 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:194-216 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:366-388 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:415-437 — 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 `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/AppCompatButtonExtension.kt:146` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–23 lines × 3) · ×1
  • Duplicated block (19–23 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:260 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:260-278 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:173-195 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:173-192 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:278` calls `show` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:195` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–23 lines × 2) · ×1
  • Duplicated block (15–23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16428 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16428-16442 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16942-16964 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16428` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22806 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22806-22826 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31672-31694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22806` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–23 lines × 2) · ×1
  • Duplicated block (17–23 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29982 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29982-29998 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30036-30058 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:29982` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1247 — tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1247-1268 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1438-1460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–22 lines × 2) · ×1
  • Duplicated block (18–22 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:344 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:344-365 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:246-263 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:344` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 3) · ×1
  • Duplicated block (21 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28263 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28263-28283 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28363-28383 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28447-28467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:28263` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2082 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2082-2102 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt:713-733 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 284 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2082` it does not close everything it opens, so those 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 `state` to `ClipboardPreviewState` in one and `HelperActionsState` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (15–21 lines × 2) · ×1
  • Duplicated block (15–21 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:479 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:479-493 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:369-389 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt` as WHOLE FILES: this scan already matched 13 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.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×1
  • Duplicated block (28–29 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3979 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3979-4006 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4668-4696 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4668` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:473 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:473-492 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:355-374 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:353-372 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt:451-470 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:385-404 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 65 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (20 lines × 4) · ×1
  • Duplicated block (20 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5922 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5922-5941 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5949-5968 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:5976-5995 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:6003-6022 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4468 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4468-4487 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4520-4539 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4571-4589 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:316 — tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:316-335 | tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:455-473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `tenkey/src/main/java/com/kazumaproject/tenkey/extensions/CharExtension.kt:316` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 6) · ×1
  • Duplicated block (18–19 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:874 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:874-891 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1360-1377 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1875-1892 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2373-2390 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2889-2907 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3398-3415 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2889` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–19 lines × 4) · ×1
  • Duplicated block (17–19 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2791 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2791-2809 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3049-3067 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6359-6375 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8253-8269 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2791` it begins part-way through the construct above it, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2811` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3070` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:83 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:83-101 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:80-98 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:82-100 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:83` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:82` calls `setInkDensityPercent` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt: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.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5035 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5035-5052 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5793-5811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5035` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–18 lines × 4) · ×1
  • Duplicated block (16–18 lines × 4) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4482 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4482-4497 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4534-4549 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4584-4599 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4634-4651 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:4482` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–18 lines × 4) · ×1
  • Duplicated block (4–18 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3419 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3419-3436 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3530-3533 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9615-9632 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9726-9729 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3419` 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.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×1
  • Duplicated block (17 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:350 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:350-369 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:426-442 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:494-510 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:562-578 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt:350` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×1
  • Duplicated block (17 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26219 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26219-26235 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26250-26266 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26284-26300 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26236` calls `d` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26301` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–17 lines × 3) · ×1
  • Duplicated block (12–17 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:665 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:665-676 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:649-664 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1154-1170 — 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.
D4 · Code Duplication · Duplicated block (16–17 lines × 3) · ×1
  • Duplicated block (16–17 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:739 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:739-754 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:719-735 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1258-1274 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:739` it begins part-way through the construct above it, so those 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, `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:737` calls `setDrawableAlpha` and `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:756` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16100 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16100-16112 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16287-16303 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–16 lines × 12) · ×1
  • Duplicated block (15–16 lines × 12) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1206 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1206-1221 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1873-1888 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2466-2481 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2787-2802 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3045-3060 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5253-5267 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5996-6011 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6803-6818 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7531-7546 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7889-7904 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8718-8733 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9094-9109 — all 12 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1206` 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6013` calls `getCase`, `uppercaseChar` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1891` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (15–16 lines × 4) · ×1
  • Duplicated block (15–16 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:675 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:675-689 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:529-544 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:305-319 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:1951-1965 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:675` 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.
D4 · Code Duplication · Duplicated block (13–15 lines × 11) · ×1
  • Duplicated block (13–15 lines × 11) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:606 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:606-618 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1593-1605 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1850-1862 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2764-2776 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3713-3725 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5229-5242 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5600-5613 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5972-5985 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6324-6337 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6779-6792 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8674-8688 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:606` it does not close everything it opens, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5227` calls `when` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1590` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–15 lines × 7) · ×1
  • Duplicated block (14–15 lines × 7) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1151 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1151-1165 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1650-1664 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2080-2094 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2583-2596 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3194-3208 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3685-3699 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4067-4081 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1151` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:759 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:759-773 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:1015-1026 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/graph/GraphBuilder.kt:759` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:201 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:201-215 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:205-218 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 188 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:201` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:203` calls `toList` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:200` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–14 lines × 15) · ×1
  • Duplicated block (10–14 lines × 15) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9590 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:9590-9600 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10422-10432 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:10469-10482 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18554-18564 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:21932-21942 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22073-22083 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22147-22157 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22205-22214 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22293-22303 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22874-22884 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:23022-23032 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26174-26184 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26568-26578 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:26916-26926 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30452-30461 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22205` it does not close everything it opens, so those 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, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:18567` calls `scrollToPosition` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:22085` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14 lines × 15) · ×1
  • Duplicated block (14 lines × 15) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:872 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:872-885 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1153-1166 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1457-1470 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2414-2427 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2743-2756 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3538-3551 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3863-3876 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4304-4317 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5318-5331 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5771-5784 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6861-6874 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7306-7319 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8778-8791 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9253-9266 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9734-9747 — all 15 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:74 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:74-87 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt:64-77 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt:67-80 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/circular_slot/CircularSlotActionSettingFragment.kt:135-148 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/opensource/OpenSourceFragment.kt:148-161 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/qwerty_number_key_flick/QwertyNumberKeyFlickSettingFragment.kt:63-76 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/cursor_move_targets/ui/CursorMoveTargetPairsFragment.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/delete_key_flick/ui/DeleteKeyFlickTargetsFragment.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/candidate_order/ui/CandidateOrderOverrideFragment.kt:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 5) · ×1
  • Duplicated block (13–14 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:200 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:200-213 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:732-744 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:577-589 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:380-392 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:2081-2093 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:200` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–14 lines × 4) · ×1
  • Duplicated block (11–14 lines × 4) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:667 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:667-677 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:653-665 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:639-651 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1158-1171 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:636` calls `updateCapsLockUI` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:666` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (13–14 lines × 3) · ×1
  • Duplicated block (13–14 lines × 3) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:715 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:715-727 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:697-709 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1237-1250 — 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 `gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:715` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1141 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1141-1154 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1806-1815 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:1141` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–14 lines × 3) · ×1
  • Duplicated block (4–14 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8714 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8714-8727 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8730-8733 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8766-8779 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:8730` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–13 lines × 20) · ×1
  • Duplicated block (12–13 lines × 20) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1182 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1182-1194 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1201-1213 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1611-1622 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1868-1880 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2442-2454 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2461-2473 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2782-2794 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3040-3052 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5248-5259 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5991-6003 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6343-6354 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6798-6810 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7526-7538 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7865-7877 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7884-7896 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8236-8248 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8694-8706 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8713-8725 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9070-9082 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9089-9101 — all 20 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15824 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15824-15836 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16054-16066 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16164-16176 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16339-16351 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:15824` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16337` calls `handleKeyReleaseFeedback` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16052` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/FlexiblePlacementSolver.kt:102 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/FlexiblePlacementSolver.kt:102-114 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/FlexiblePlacementSolver.kt:126-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/placement/FlexiblePlacementSolver.kt:102` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 12) · ×1
  • Duplicated block (11–12 lines × 12) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2813 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2813-2824 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2919-2930 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3070-3081 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3174-3184 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3317-3328 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3428-3439 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6378-6389 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6473-6484 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8271-8282 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8365-8376 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9513-9524 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9624-9635 — all 12 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2813` it does not close everything it opens, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2809` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3066` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–12 lines × 5) · ×1
  • Duplicated block (11–12 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:83 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:83-93 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkEffectView.kt:74-85 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt:65-75 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobEffectView.kt:69-79 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintEffectView.kt:71-81 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleEffectView.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveEffectView.kt:83` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:895 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:895-906 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2136-2147 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4170-4181 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4465-4476 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7146-7157 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:895` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–12 lines × 3) · ×1
  • Duplicated block (9–12 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7142 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7142-7153 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7517-7525 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8227-8235 — 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10–12 lines × 2) · ×1
  • Duplicated block (10–12 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:411 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:411-422 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/louds/louds_with_term_id/LOUDSWithTermId.kt:484-493 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10–11 lines × 8) · ×1
  • Duplicated block (10–11 lines × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:792 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:792-802 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1075-1085 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1380-1390 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3812-3821 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4252-4261 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5697-5706 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7234-7243 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9179-9188 — all 8 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:792` it begins part-way through the construct above it, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3811` calls `Input` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:790` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 8) · ×1
  • Duplicated block (11 lines × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3850 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3850-3860 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4291-4301 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5740-5750 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5757-5767 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7276-7286 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7292-7302 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9222-9232 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9239-9249 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3848` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4289` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 7) · ×1
  • Duplicated block (10–11 lines × 7) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4560 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4560-4570 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6092-6101 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6109-6119 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7626-7635 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7642-7652 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7985-7994 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:8002-8012 — all 7 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. 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6101` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4570` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:756 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:756-765 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:800-809 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:978-988 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt:756` 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.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:790 — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:790-796 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1331-1341 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 7) · ×1
  • Duplicated block (10 lines × 7) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2013 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2013-2022 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2305-2314 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2632-2641 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4547-4556 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6075-6084 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7610-7619 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7968-7977 — all 7 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2013` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8–10 lines × 5) · ×1
  • Duplicated block (8–10 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:244 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:244-253 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:156-163 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:262-271 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:178-187 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:175-184 — 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 `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:156` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:273` calls `printStackTrace` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:255` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31587 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31587-31596 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31612-31621 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31630-31639 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:31587` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30062 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30062-30071 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30092-30099 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:30062` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8–9 lines × 6) · ×1
  • Duplicated block (8–9 lines × 6) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3838 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3838-3845 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4280-4287 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5291-5299 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5725-5732 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7262-7269 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9207-9214 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3838` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 5) · ×1
  • Duplicated block (8–9 lines × 5) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:220 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:220-228 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:751-758 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:596-603 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:399-406 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:2100-2107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt:220` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1662 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1662-1670 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:809-815 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyboardEditorViewModel.kt:1662` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16118 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16118-16126 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16305-16312 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:16118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 10) · ×1
  • Duplicated block (8 lines × 10) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:653 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:653-661 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:934-942 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1242-1250 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2175-2183 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2502-2510 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:3763-3771 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5286-5293 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:5648-5656 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7185-7193 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:9130-9138 — all 10 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:653` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8 lines × 8) · ×1
  • Duplicated block (8 lines × 8) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1153 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1153-1161 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1652-1660 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2082-2090 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2574-2581 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:2584-2592 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3196-3204 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:3687-3695 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:4069-4077 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/engine/KanaKanjiEngine.kt:1153` 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.
D4 · Code Duplication · Duplicated block (8 lines × 7) · ×1
  • Duplicated block (8 lines × 7) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2002 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2002-2009 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2294-2301 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2621-2628 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4486-4493 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6014-6021 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7549-7556 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7907-7914 — all 7 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:2002` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:951 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:951-957 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:972-979 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift 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/kazumaproject/markdownhelperkeyboard/repository/KeyboardRepository.kt:951` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–7 lines × 8) · ×1
  • Duplicated block (6–7 lines × 8) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:845 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:845-850 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:862-867 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1127-1132 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1143-1148 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1430-1435 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1447-1452 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1812-1817 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1829-1835 — all 8 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. 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:844` calls `listOf` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:1429` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×1
  • Duplicated block (6 lines × 3) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:299 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:299-304 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:191-196 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:169-174 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:166` calls `geometryViews` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:296` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 32) · ×1
  • Duplicated block (5 lines × 32) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4492 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4492-4496 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4498-4502 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4504-4508 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4510-4514 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4516-4520 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4522-4526 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4529-4533 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4535-4539 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6020-6024 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6026-6030 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6032-6036 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6038-6042 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6044-6048 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6050-6054 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6057-6061 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:6063-6067 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7555-7559 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7561-7565 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7567-7571 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7573-7577 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7579-7583 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7585-7589 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7592-7596 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7598-7602 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7913-7917 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7919-7923 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7925-7929 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7931-7935 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7937-7941 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7943-7947 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7950-7954 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:7956-7960 — all 32 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 `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4492` it begins part-way through the construct above it, so those 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, `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4527` calls `Input`, `getCase`, `toString` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/layout/KeyboardDefaultLayouts.kt:4497` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:107 — core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:107-113 | core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:153-155 | core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:173-177 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/src/main/java/com/kazumaproject/core/domain/extensions/String.kt:107` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:221 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt:221-227 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ng_word/ui/NgWordFragment.kt:124-130 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/dictionary_learn/DictionaryLearnFragment.kt:231-237 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/user_dictionary/UserDictionaryFragment.kt:138-144 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/user_template/ui/UserTemplateFragment.kt:138-144 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zeroquery/custom/ui/CustomZeroQueryDictionaryFragment.kt:321-327 — 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.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:593 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt:593-597 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt:458-462 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt:340-344 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt:2032-2036 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt:371 — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt:371-376 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt:321-326 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/StandardFlickInputController.kt:374-379 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt:630-635 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiStickyFlickController.kt:564-569 — before extracting anything, compare `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/FlickLongPressInputController.kt` and `custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/TfbiInputController.kt` 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. If that is what happened, the fix is to keep one copy and have the 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.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:108 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:108-120 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt:105-117 | app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintRenderer.kt:107-119 — before extracting anything, compare `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt` and `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 142 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt:108` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 6) · ×1
  • Duplicated block (6 lines × 6) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14387 — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:14387-14392 | custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:700-705 | gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:841-846 | qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt:877-882 | symbol_keyboard/src/main/java/com/kazumaproject/symbol_keyboard/CustomSymbolKeyboardView.kt:1127-1132 | tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt:1505-1510 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
DM10 · One transaction, one aggregate · One operation mutates 2 aggregates · ×1
  • One operation mutates 2 aggregates: FloatingDictionaryStore.delete app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_dictionary/FloatingDictionaryStore.kt:64 — `FloatingDictionaryStore.delete` saves `UserDictionaryRepository`, `UserTemplateRepository` in a single operation. Each is its own consistency boundary, so committing them together makes the second's invariants depend on the first's transaction, holds a lock across both for the whole operation, and means the pair can no longer be separated — into different services, or different databases. Mutate one aggregate here and let the others follow from a domain event.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
X15 · Unvalidated length from an untrusted reader · Length read from the parsed input is spent without ever being bounded · ×1
  • Length read from the parsed input is spent without ever being bounded app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/stream/ArraysStream.kt:59 — `shortArraySize` is read from the bytes being parsed at line 58 (`readInt`), then used to size a `ShortArray` at line 59 — and nowhere in its scope is `shortArraySize` bounded from above — compared to a limit, clamped, or checked against the input that remains (a zero or sign test, or the loop that counts up to it, bounds nothing). Whoever wrote those bytes therefore chooses the allocation directly: a 32-bit length asks for up to 2 GiB before a single byte of the payload is known to exist, which either exhausts the heap with an `OutOfMemoryError` or, negative, throws `NegativeArraySizeException` out of a parser whose failure path was written for malformed input, not for hostile input. Bound `shortArraySize` against the bytes actually remaining and a maximum the format allows before allocating.
Minor — 81 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:238 — `!::inspectorBehavior.isInitialized || binding.previewCanvas.height <= 0` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:561 — `!fromUser || isSyncingLetterSizeControls` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:307 — `!geometry.isDefault && geometryBaseHeight > 0 && height > geometryBaseHeight` appears character-identically in 3 files — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt, qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:300 — `!geometry.isDefault && geometryBaseHeight > 0 && requested > geometryBaseHeight` appears character-identically in 3 files — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt, qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1675 — `!independentMultiTouchForCurrentGesture || !longPressPresentationShown` appears character-identically in 2 files — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt:262 — `!isChecked || isSyncingPreviewModeControls` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_landscape_setting/CandidateHeightLandscapeSettingFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/CandidateViewHeightSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:349 — `!isRightAligned && lp.marginStart != initialMarginStartPx` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/circular_slot/CircularSlotActionApplier.kt:25 — `!key.isSpecialKey && key.label.isNotBlank() && key.keyType == KeyType.CIRCULAR_FLICK` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/circular_slot/CircularSlotActionApplier.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/circular_slot/CircularSlotActionSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/MapTypeConverter.kt:72 — `!value.isJsonPrimitive || !value.asJsonPrimitive.isString` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/database/MapTypeConverter.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_romaji/ui/RomajiMapFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt:95 — `!view.getGlobalVisibleRect(visible) || area.isEmpty` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/floating/GemmaFloatingWindow.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/FloatingCandidatePanel.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:770 — `(currentMode != mode) || (customLayouts != layouts)` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:489 — `(edge == ResizeEdge.LEFT || edge == ResizeEdge.RIGHT) && lp.width != initialWidth` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt:473 — `(edge == ResizeEdge.TOP || edge == ResizeEdge.BOTTOM) && lp.height != initialHeight` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_landscape_setting/KeyboardSizeLandscapeFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/keyboard_size_setting/KeyboardSizeSettingFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:281 — `(geometry.isDefault && next.isDefault) || (geometry == next && geometryBaseHeight == baseHeightPx)` appears character-identically in 2 files — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt:1748 — `::pressedKey.isInitialized && pressedKey.key != Key.NotSelected` appears character-identically in 2 files — gojuon_keyboard/src/main/java/com/kazumaproject/gojuon_keyboard/GojuonKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingDestination.kt:757 — `AppVariantConfig.hasZenz || AppVariantConfig.hasGemma` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingDestination.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingsOverview.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt:523 — `EGL14.eglChooseConfig( display, attributes, 0, configs, 0, configs.size, numConfigs, 0 ) && numConfigs[0] > 0` appears character-identically in 5 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveRenderer.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidInkRenderer.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleRenderer.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobRenderer.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3504 — `abs(dx) > abs(dy) && abs(dx) > threshold` appears character-identically in 3 files — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt, qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt:3510 — `abs(dy) > abs(dx) && abs(dy) > threshold` appears character-identically in 3 files — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt, qwerty_keyboard/src/main/java/com/kazumaproject/qwerty_keyboard/ui/QWERTYKeyboardView.kt, tenkey/src/main/java/com/kazumaproject/tenkey/TenKey.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt:194 — `action is FlickAction.Action && action.action == KeyAction.MoveCustomKeyboardTab && action.label == "⇄"` appears character-identically in 2 files — custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/controller/CustomAngleFlickController.kt, custom_keyboard/src/main/java/com/kazumaproject/custom_keyboard/view/FlickKeyboardView.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2638 — `backgroundColor == null && pressedColor == null` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt:1804 — `bounds.outWidth <= 0 || bounds.outHeight <= 0` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/ui/KeyEditorFragment.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/clipboard/ClipboardUtil.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactEnglishDictionary.kt:219 — `byteCount >= 0 && buffer.remaining() >= byteCount` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactEnglishDictionary.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactSystemDictionary.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/runtime/GemmaRuntimeClient.kt:235 — `callbackRequestId == requestId && !completion.isCompleted` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/runtime/GemmaRuntimeClient.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/zenz/runtime/ZenzRuntimeClient.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt:2374 — `candidateEmptyDrawableColor == backgroundColor && candidateEmptyDrawableTextColor == textColor` appears character-identically in 2 files — app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/adapters/SuggestionAdapter.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/candidate_view_height_setting/SuggestionAdapter2.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
DM2 · Strongly-typed ids · Primitive id on a domain type · ×15
  • Primitive id on a domain type: CircularFlickMapping.ownerKeyId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CircularFlickMapping.kt:18 — `CircularFlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: CustomKeyboardLayout.layoutId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:27 — `CustomKeyboardLayout.layoutId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: CustomKeyboardLayout.stableId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/CustomKeyboardLayout.kt:35 — `CustomKeyboardLayout.stableId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: FlickMapping.ownerKeyId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/FlickMapping.kt:22 — `FlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: KeyDefinition.keyId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:27 — `KeyDefinition.keyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: KeyDefinition.ownerLayoutId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:28 — `KeyDefinition.ownerLayoutId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: KeyDefinition.drawableResId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/KeyDefinition.kt:36 — `KeyDefinition.drawableResId` is a raw `Int` — give it a strongly-typed id: a dedicated single-field type wrapping the `Int`, in whatever form your language spells that.
  • Primitive id on a domain type: LongPressFlickMapping.ownerKeyId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/LongPressFlickMapping.kt:22 — `LongPressFlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: SpacerDefinition.spacerId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:28 — `SpacerDefinition.spacerId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: SpacerDefinition.ownerLayoutId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/SpacerDefinition.kt:29 — `SpacerDefinition.ownerLayoutId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: TwoStepFlickMapping.ownerKeyId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/data/TwoStepFlickMapping.kt:22 — `TwoStepFlickMapping.ownerKeyId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
  • Primitive id on a domain type: GemmaPromptTemplate.builtInKey app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/database/GemmaPromptTemplate.kt:31 — `GemmaPromptTemplate.builtInKey` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: PhysicalKeyboardShortcutItem.actionId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/physical_keyboard/shortcut/database/PhysicalKeyboardShortcutItem.kt:25 — `PhysicalKeyboardShortcutItem.actionId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: ShortcutItem.typeId app/src/main/java/com/kazumaproject/markdownhelperkeyboard/short_cut/data/ShortcutItem.kt:9 — `ShortcutItem.typeId` is a raw `String` — give it a strongly-typed id: a dedicated single-field type wrapping the `String`, in whatever form your language spells that.
  • Primitive id on a domain type: FlickTextPreviewEvent.gestureId core/src/main/java/com/kazumaproject/core/domain/flick/FlickTextPreviewEvent.kt:11 — `FlickTextPreviewEvent.gestureId` is a raw `Long` — give it a strongly-typed id: a dedicated single-field type wrapping the `Long`, in whatever form your language spells that.
AX6 · Interface segregation · Fat interface · ×3
  • Fat interface: KeyboardLayoutDao (30 abstract methods) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/custom_keyboard/database/KeyboardLayoutDao.kt:22 — `KeyboardLayoutDao` declares 30 abstract methods: `getLayoutsList`, `getLayoutsListNotFlow`, `getFullLayoutById`, `insertLayout`, `insertKeys`, `insertFlickMappings`, `insertCircularFlickMappings`, `insertTwoStepFlickMappings`, `insertLongPressFlickMappings`, `insertTwoStepLongPressFlickMappings`, `insertSpacers`, `deleteSpacersForLayout`, `deleteLayout`, `updateLayout`, `clearNumberUsageModeExcept`, `updateLayoutUsageMode`, `deleteKeysForLayout`, `deleteFlicksForLayout`, `deleteCircularFlicksForLayout`, `deleteTwoStepFlicksForLayout`, `deleteLongPressFlicksForLayout`, `deleteTwoStepLongPressFlicksForLayout`, `getLayoutName`, `getFullLayoutOneShot`, `findLayoutByName`, `findLayoutByStableId`, `getAllFullLayouts`, `getAllFullLayoutsOneShot`, `getMaxSortOrder`, `updateLayoutSortOrder`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: AppDatabase (19 abstract methods) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/database/AppDatabase.kt:96 — `AppDatabase` declares 19 abstract methods: `learnDao`, `clickedSymbolDao`, `userWordDao`, `keyboardLayoutDao`, `userTemplateDao`, `clipboardHistoryDao`, `romajiMapDao`, `ngWordDao`, `shortcutDao`, `systemUserDictionaryDao`, `ngramRuleDao`, `gemmaPromptTemplateDao`, `deleteKeyFlickDeleteTargetDao`, `physicalKeyboardShortcutDao`, `candidateOrderOverrideDao`, `sumireSpecialKeyActionOverrideDao`, `sumireSpecialKeyPlacementOverrideDao`, `customZeroQueryDao`, `textMacroDao`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
  • Fat interface: LearnDao (18 abstract methods) app/src/main/java/com/kazumaproject/markdownhelperkeyboard/learning/database/LearnDao.kt:14 — `LearnDao` declares 18 abstract methods: `editEntry`, `deleteById`, `insertStrict`, `insert`, `findByInput`, `findByInputAndOutput`, `existsDuplicateForUpdate`, `all`, `getAllSuspend`, `insertAll`, `predictiveSearchByInput`, `findCommonPrefixes`, `findByInputPrefix`, `updateLearnedData`, `delete`, `deleteAll`, `deleteByInput`, `deleteByInputAndOutput`. Counted over its public functions with no body, once per name; default-bodied functions and properties are not counted, because no implementer is forced to write them. A wide interface forces every implementer and caller to depend on methods they don't use (the Interface-Segregation 'I' in SOLID). Split it into focused role-interfaces.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×3
  • Projects may be oversized for their cohesion app/build.gradle:1 — `app` (156706 LoC, 3440 module-visible types across 179 directories) overshoots its size bounds. 3 of 14 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 5.7/10. Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
  • Projects may be oversized for their cohesion core/build.gradle:1 — `core` (9633 LoC, 664 module-visible types across 26 directories) overshoots its size bounds. 3 of 14 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 5.7/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 custom_keyboard/build.gradle:1 — `custom_keyboard` (22944 LoC, 302 module-visible types across 4 directories) overshoots its size bounds. 3 of 14 build unit(s) (Gradle) overshoot their size bounds, lowering Project Cohesion to 5.7/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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch app/src/main/java/com/kazumaproject/markdownhelperkeyboard/dictionary_override/DictionaryBinaryReader.kt:110 — `loadLiteralSurfaces` swallows every exception into `emptyMap()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/com/kazumaproject/markdownhelperkeyboard/morse/MorsePreferences.kt:45 — `customMaps` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/SettingSearchIndex.kt:830 — `readTextAttribute` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 90 significant file(s) lose their only recent owner: tools/classified-dictionaries/prepare.py, morse_keyboard/src/main/java/com/kazumaproject/morse_keyboard/MorseKeyboardView.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/ngram/PackedSystemNgramDictionary.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/media/GemmaImeMediaPanelController.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/floating_dictionary/FloatingDictionaryController.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/utility/UnitRegistry.kt, core/src/main/java/com/kazumaproject/core/ui/font/KeyboardFontGlyphDrawable.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/composing_guide/ComposingGuideWindow.kt (+82 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 56 significant file(s) lose their only recent owner: symbol_keyboard/src/main/java/com/kazumaproject/domain/Emoji.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/SprayPaintSimulation.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/FluidSimulation.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/CinematicWaveSimulation.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LiquidRippleSimulation.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/other/ZenzLicense.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/romaji_kana/RomajiKanaConverter.kt, app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/image_effect/LuminousBlobSimulation.kt (+48 more). Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (147 single-owned of 592 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 592 of the 1048 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: app/src/main/java/com/kazumaproject/markdownhelperkeyboard/setting_activity/ui/setting/DateCandidateSettingsFragment.kt.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found enter-parity-lab/build.gradle:2 — 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 `enter-parity-lab/build.gradle` makes this repository a deployable product (line 2).
D21 · Naming Consistency · `KeyTO` spells `TO` where 22 names in the project spell it `To` · ×1
  • `KeyTO` spells `TO` where 22 names in the project spell it `To` core/src/main/java/com/kazumaproject/core/domain/key/Key.kt:48 — 22 of 24 names in project core spell the token `To` (22 of 24; unit: names in project core containing `To`). Peers: ConstraintLayoutKt.setBottomToTopOf (core/src/main/java/com/kazumaproject/core/domain/extensions/ConstraintLayout.kt:14); ConstraintLayoutKt.setEndToStartOf (core/src/main/java/com/kazumaproject/core/domain/extensions/ConstraintLayout.kt:22); ConstraintLayoutKt.setStartToEndOf (core/src/main/java/com/kazumaproject/core/domain/extensions/ConstraintLayout.kt:30); DpPxKt.dpToPx (core/src/main/java/com/kazumaproject/core/domain/extensions/DpPx.kt:13); DpPxKt.dpToPx (core/src/main/java/com/kazumaproject/core/domain/extensions/DpPx.kt:23). Rename to `KeyTo`. [rule N6]
D21 · Naming Consistency · `KeyTOJapanese` spells `TO` where 22 names in the project spell it `To` · ×1
  • `KeyTOJapanese` spells `TO` where 22 names in the project spell it `To` core/src/main/java/com/kazumaproject/core/domain/key/KeyInfo.kt:716 — 22 of 24 names in project core spell the token `To` (22 of 24; unit: names in project core containing `To`). Peers: ConstraintLayoutKt.setBottomToTopOf (core/src/main/java/com/kazumaproject/core/domain/extensions/ConstraintLayout.kt:14); ConstraintLayoutKt.setEndToStartOf (core/src/main/java/com/kazumaproject/core/domain/extensions/ConstraintLayout.kt:22); ConstraintLayoutKt.setStartToEndOf (core/src/main/java/com/kazumaproject/core/domain/extensions/ConstraintLayout.kt:30); DpPxKt.dpToPx (core/src/main/java/com/kazumaproject/core/domain/extensions/DpPx.kt:13); DpPxKt.dpToPx (core/src/main/java/com/kazumaproject/core/domain/extensions/DpPx.kt:23). Rename to `KeyToJapanese`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
DM9 · Scattered domain decisions · Measurement [mAnchorOffset, mAnchorPosition] produced in 2 places · ×1
  • Measurement [mAnchorOffset, mAnchorPosition] produced in 2 places — com.kazumaproject.android.flexbox.SavedState's [mAnchorOffset, mAnchorPosition] are built independently in com.kazumaproject.android.flexbox.1, com.kazumaproject.android.flexbox.FlexboxLayoutManager — the same reading, produced twice. Two producers can disagree without either looking wrong on its own: whichever population, filter or rounding one of them applies, the other need not, and nothing compares them. Give the measurement ONE producer and let the other call it.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:5 — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 7 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation app/build.gradle:10 — `app/build.gradle` 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`.
X23 · Unguarded diagnostic materialisation · Diagnostic log message is built whether or not it is wanted · ×1
  • Diagnostic log message is built whether or not it is wanted app/src/main/java/com/kazumaproject/markdownhelperkeyboard/ime_service/IMEService.kt:17967 — `d` at line 17967 is called with an argument built by `supportedMimeTypes.joinToString()` (line 17967), whose cost grows with the collection it walks. Kotlin evaluates a call's arguments BEFORE entering the method, so that join/projection runs in full every time this line is reached — and then the level check inside the logger discards the string it produced, because d is a level a shipped configuration normally leaves off. Nothing here decides beforehand whether the message is wanted: no `isDebugEnabled` test, no `BuildConfig.DEBUG` flag, no trailing lambda (`logger.debug { … }`) the logger calls only when the level is on.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×1
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/com/kazumaproject/markdownhelperkeyboard/gemma/GemmaPromptBuilder.kt:56 — 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.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-2905b29703a946298c28a6e339e7d179/history.json --exit-code 0 --source .87artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-2905b29703a946298c28a6e339e7d179/history-1.json --exit-code 0 --source .677artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=2459" --report-format json --report-path /tmp/watchdog-gitleaks-2905b29703a946298c28a6e339e7d179/history-2.json --exit-code 0 --source .2artifacts/raw/gitleaks-history-2.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-2905b29703a946298c28a6e339e7d179/tree.json --exit-code 0 --source .220artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .84artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (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—
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 55 file(s) — `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/Extenstions.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/compact/CompactEnglishDictionary.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/PhraseGrammar.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/english/phrase/RuntimeGrammarRoles.kt`, `app/src/main/java/com/kazumaproject/markdownhelperkeyboard/converter/path_algorithm/FindPath.kt`, … (+50 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesnone (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 01a1eb92-5e6f-743d-b976-7710c7b42336 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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