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

T8RIN/ImageToolbox

Measured 24 October 2026, 19:59 UTC, at code version 7b81a24

No regression since the last survey

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

CAI score 59out of 100 Adequate
CriticalWeakAdequateStrongExemplary
No change since the last survey

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

A large codebase: 487,972 lines of product code in 101 projects, tests not counted · Estimated rebuild effort: about 4.3 person-years · Weakest lens: Production Readiness, 47

Findings by how serious they are

42 critical 1801 serious 39 minor

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

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
24 October 2026, 19:59 UTC

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

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

60of 63 dimensions measured by tools. The other 3 are advisory notes from an AI model, which explain the code but don't count towards the score.
1831of 1882 findings point to an exact file and line, so you can open each one in the code. The other 51 concern the repository as a whole, such as missing documentation.
63dimensions across 7 lenses, read from 487,972 lines of product code in 101 projects.
Chapters

Executive summary

T8RIN/ImageToolbox scores 59 out of 100 and is rated Adequate, while five of its seven lenses score higher still: Domain Modelling at 100 and Architecture at 91, both rated Exemplary, and Performance at 87, Code Health at 78 and Maturity at 74, all rated Strong.

The score is lower than those five because the weakest lens counts most, and here that is Production Readiness, which scores 47 and is rated Weak. Its Security & performance tooling dimension scores 3 out of 10, and until that reaches 4, Production Readiness can't be rated higher than Adequate. The first actions are to resolve the 8 REDACTED finding(s) in Static Analysis (SAST) and to 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, and if Production Readiness rose to 70, the score would rise from 59 to about 67.

42 findings are critical: 41 in Static Analysis (SAST) and one in Change Coupling.

Watchdog couldn't measure 19 dimensions in this code, among them Code Coverage, Test Reliability and Dependency Hygiene, so they are left out of the score. The product code is 487,972 lines, which would take an estimated 4.3 person-years, around €620,000, to rebuild.

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

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

If Production Readiness rose from 47 to 70, the lowest score rated Strong, the score would rise from 59 to about 67.

Code composition: what the lines of code are
Product code 95%Tests 5%
New since the last survey: 121 findings

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

  • Cyclomatic Complexity · FaceClusterer.cluster (cyclomatic 40) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt
  • Cyclomatic Complexity · AssistantKnowledge.retrieve (cyclomatic 40) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt
  • Cyclomatic Complexity · MediaSemanticSearchControlsKt.MediaSemanticSearchControls (cyclomatic 38) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt
  • Cyclomatic Complexity · ScreenListKt.screensFor (cyclomatic 36) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • Cyclomatic Complexity · MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor (cyclomatic 30) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt
  • Cyclomatic Complexity · SettingsOpenButtonKt.SettingsOpenButton (cyclomatic 22) feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/SettingsOpenButton.kt
  • Cyclomatic Complexity · MediaPeopleOverviewKt.PeopleGroupSettings (cyclomatic 22) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • Cyclomatic Complexity · MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable (cyclomatic 22) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt
  • Cyclomatic Complexity · FiltersContentKt.FiltersMainContent (cyclomatic 21) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt
  • Cyclomatic Complexity · AssistantContentKt.AssistantComposer (cyclomatic 21) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Cyclomatic Complexity · AssistantContentKt.AssistantContent (cyclomatic 20) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Cyclomatic Complexity · AssistantKnowledge.grounding (cyclomatic 19) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt
  • Cyclomatic Complexity · AssistantModelSheetKt.AssistantModelItem (cyclomatic 19) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantModelSheet.kt
  • Cyclomatic Complexity · SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview (cyclomatic 18) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/SemanticSearchCategoryContent.kt
  • Cyclomatic Complexity · BeforeAfterLayoutImplKt.BeforeAfterSplitLayout (cyclomatic 18) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayoutImpl.kt
  • Cyclomatic Complexity · ScreenListKt.withSelectedUris (cyclomatic 18) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • Cyclomatic Complexity · EraseBackgroundContentKt.EraseBackgroundContent (cyclomatic 17) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt
  • Cyclomatic Complexity · DuplicateFinderContentKt.DuplicateFinderContent (cyclomatic 17) feature/duplicate-finder/src/main/java/com/t8rin/imagetoolbox/feature/duplicate_finder/presentation/DuplicateFinderContent.kt
  • Cyclomatic Complexity · MediaPickerHavePermissionsKt.MediaPickerHavePermissions (cyclomatic 16) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerHavePermissions.kt
  • Cyclomatic Complexity · AssistantContentKt.AssistantConversation (cyclomatic 16) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Cognitive Complexity · MediaSemanticSearchControlsKt.MediaSemanticSearchControls (cognitive 58) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt
  • Cognitive Complexity · FaceClusterer.cluster (cognitive 54) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt
  • Cognitive Complexity · AssistantKnowledge.retrieve (cognitive 48) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt
  • Cognitive Complexity · MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor (cognitive 45) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt
  • Cognitive Complexity · ScreenListKt.screensFor (cognitive 37) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • Cognitive Complexity · AssistantContentKt.AssistantComposer (cognitive 34) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Cognitive Complexity · MediaPeopleOverviewKt.PeopleGroupSettings (cognitive 28) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • Cognitive Complexity · LaMaProcessor.inpaintTiled (cognitive 24) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt
  • Cognitive Complexity · CategorizedSettingsKt.CategorizedSettings (cognitive 24) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CategorizedSettings.kt
  • Cognitive Complexity · AssistantContentKt.AssistantContent (cognitive 24) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Cognitive Complexity · AssistantModelSheetKt.AssistantModelItem (cognitive 24) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantModelSheet.kt
  • Cognitive Complexity · LaMaProcessor.bitmapToTensor (cognitive 23) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt
  • Cognitive Complexity · MediaPickerHavePermissionsKt.MediaPickerHavePermissions (cognitive 22) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerHavePermissions.kt
  • Cognitive Complexity · ClipTokenizer.basicTokens (cognitive 20) lib/neural-tools/src/main/java/com/t8rin/neural_tools/search/ClipTokenizer.kt
  • Cognitive Complexity · DuplicateFinderContentKt.DuplicateFinderContent (cognitive 20) feature/duplicate-finder/src/main/java/com/t8rin/imagetoolbox/feature/duplicate_finder/presentation/DuplicateFinderContent.kt
  • Cognitive Complexity · AssistantKnowledge.grounding (cognitive 20) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt
  • Cognitive Complexity · LaMaProcessor.inpaint (cognitive 18) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt
  • Cognitive Complexity · MediaSemanticSearchCategoriesKt.CategoryChip (cognitive 18) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategories.kt
  • Cognitive Complexity · SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview (cognitive 18) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/SemanticSearchCategoryContent.kt
  • Cognitive Complexity · MediaPeopleOverviewKt.MediaPeopleOverview (cognitive 17) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • Cognitive Complexity · AssistantContentKt.AssistantConversation (cognitive 17) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Cognitive Complexity · MediaPeopleSuggestionsSheetKt.MediaPeopleSuggestionsSheet (cognitive 16) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleSuggestionsSheet.kt
  • God Classes · MethodTooLong: ScreenListKt.screensFor core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • God Classes · MethodTooLong: MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt
  • God Classes · MethodTooLong: MediaPeopleOverviewKt.PeopleGroupSettings feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • God Classes · MethodTooLong: FaceClusterer.cluster feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt
  • God Classes · FileTooLong: navigation/NavigationChild.kt feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/NavigationChild.kt
  • God Classes · ClassTooLong: SemanticFaceIndex feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt
  • God Classes · ClassTooLong: NavigationChild feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/NavigationChild.kt
  • God Classes · ClassTooLong: MediaPickerComponent feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/screenLogic/MediaPickerComponent.kt
  • God Classes · FileTooLong: data/SemanticFaceIndex.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt
  • God Classes · ClassTooLong: AndroidSemanticSearchRepository feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidSemanticSearchRepository.kt
  • God Classes · FileTooLong: screenLogic/MediaPickerComponent.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/screenLogic/MediaPickerComponent.kt
  • God Classes · MethodTooLong: MediaPeopleOverviewKt.MediaPeopleOverview feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • God Classes · MethodTooLong: AssistantModelSheetKt.AssistantModelItem feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantModelSheet.kt
  • God Classes · FileTooLong: data/AndroidSemanticSearchRepository.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidSemanticSearchRepository.kt
  • God Classes · FileTooLong: components/MediaPeopleOverview.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • God Classes · FileTooLong: data/AssistantKnowledge.kt feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt
  • God Classes · MethodTooLong: DrawModeSelectorKt.DrawModeSelector feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt
  • God Classes · FileTooLong: model/UiFilterHelp.kt core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/model/UiFilterHelp.kt
  • God Classes · MethodTooLong: SettingsBackdropWrapperKt.SettingsBackdropWrapper feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/SettingsBackdropWrapper.kt
  • God Classes · MethodTooLong: SemanticFaceIndex.regroup feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt
  • God Classes · TooManyMethods: AndroidSemanticSearchRepository feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidSemanticSearchRepository.kt
  • God Classes · FileTooLong: presentation/AssistantContent.kt feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • God Classes · MethodTooLong: BeforeAfterLayoutImplKt.BeforeAfterSplitLayout feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayoutImpl.kt
  • God Classes · MethodTooLong: AssistantContentKt.AssistantContent feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • God Classes · TooManyMethods: SemanticFaceIndex feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt
  • God Classes · MethodTooLong: AssistantContentKt.AssistantComposer feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • God Classes · FileTooLong: presentation/SettingsContent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt
  • God Classes · FileTooLong: data/AndroidAiToolsRepository.kt feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt
  • Code Duplication · Near-duplicate member pair (136 shared lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt
  • Code Duplication · Near-duplicate member pair (42 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt
  • Code Duplication · Edited copy of a member (30 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt
  • Code Duplication · Duplicated block (72 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt
  • Code Duplication · Duplicated block (15 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt
  • Code Duplication · Duplicated block (15 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt
  • Code Duplication · Duplicated block (14 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayout.kt
  • Code Duplication · Duplicated block (12 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt
  • Code Duplication · Duplicated block (12 lines × 2) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt
  • Code Duplication · Duplicated block (12 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt
  • Code Duplication · Duplicated block (6 lines × 2) lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt
  • Cohesion (LCOM4) · Low cohesion: SemanticFaceIndex (LCOM4 10) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt
  • Churn × Complexity Hotspots · Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt
  • Churn × Complexity Hotspots · Hotspot: feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt
  • Churn × Complexity Hotspots · Hotspot: feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt
  • Churn × Complexity Hotspots · Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerHavePermissions.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerHavePermissions.kt
  • Churn × Complexity Hotspots · Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt
  • Churn × Complexity Hotspots · Hotspot: feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt
  • Churn × Complexity Hotspots · Hotspot: feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt
  • Churn × Complexity Hotspots · Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt
  • Churn × Complexity Hotspots · Hotspot: feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt
  • Churn × Complexity Hotspots · Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt
  • Churn × Complexity Hotspots · Hotspot: feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ActiveLayerGestureModifier.kt feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ActiveLayerGestureModifier.kt
  • Churn × Complexity Hotspots · Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt
  • Churn × Complexity Hotspots · Hotspot: feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt
  • Churn × Complexity Hotspots · Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedIconButton.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedIconButton.kt
  • Churn × Complexity Hotspots · Hotspot: feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt

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

Fixed since the last survey: 40 findings

These 40 critical or serious findings were in the previous survey, on 10 October 2026, and are gone from this one.

  • Cyclomatic Complexity · ScreenListKt.screenList (cyclomatic 28) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • Cognitive Complexity · ScreenListKt.screenList (cognitive 26) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • Cognitive Complexity · SavingFolder.getInstance (cognitive 21) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/SavingFolder.kt
  • God Classes · MethodTooLong: ScreenListKt.screenList core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt
  • Code Duplication · Near-duplicate member pair (136 shared lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt
  • Code Duplication · Edited copy of a member (30 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt
  • Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt
  • Code Duplication · Duplicated block (71 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt
  • Code Duplication · Duplicated block (17 lines × 2) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt
  • Code Duplication · Duplicated block (16 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeImagePickingDialog.kt
  • Code Duplication · Duplicated block (16 lines × 2) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt
  • Code Duplication · Duplicated block (15 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt
  • Code Duplication · Duplicated block (13 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt
  • Code Duplication · Duplicated block (10 lines × 2) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt
  • Code Duplication · Duplicated block (8 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt
  • Code Duplication · Duplicated block (8 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt
  • Code Duplication · Duplicated block (9 lines × 2) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt
  • Coupling · Off the main sequence: ImageToolbox:feature:help
  • Churn × Complexity Hotspots · Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt
  • Churn × Complexity Hotspots · Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt
  • Churn × Complexity Hotspots · Hotspot: feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt
  • Churn × Complexity Hotspots · Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/DragHandler.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/DragHandler.kt
  • Static Analysis (SAST) · Medium: watchdog-eol-action-major-in-workflow REDACTED
  • Static Analysis (SAST) · Medium: watchdog-eol-action-major-in-workflow REDACTED
  • Change Coupling · Change-coupling hub: AndroidSettingsManager.kt → SimpleSettingsInteractor.kt, Setting.kt, SettingsGroup.kt, MapToSettingsState.kt, SettingKeys.kt, SettingItem.kt, SettingsComponent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt
  • Change Coupling · Change-coupling hub: SettingKeys.kt → Setting.kt, SettingsGroup.kt, MapToSettingsState.kt, SettingItem.kt, SettingsComponent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/SettingKeys.kt
  • Change Coupling · Change-coupling hub: SettingsState.kt → SettingsManager.kt, SimpleSettingsInteractor.kt, Setting.kt, SettingsGroup.kt, SettingKeys.kt, SettingItem.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/model/SettingsState.kt
  • Change Coupling · Change-coupling hub: SettingsInteractor.kt → SettingsState.kt, Setting.kt, SettingsGroup.kt, AndroidSettingsManager.kt, MapToSettingsState.kt, SettingKeys.kt, SettingItem.kt, SettingsComponent.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt
  • Change Coupling · Change-coupling hub: BitmapDrawer.kt → AndroidImageDrawApplier.kt, DrawContentControls.kt, BitmapEraser.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt
  • Change Coupling · Change-coupling hub: SettingsGroup.kt → SettingsManager.kt, MapToSettingsState.kt, SettingItem.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt
  • Change Coupling · Change coupling: Setting.kt ↔ MapToSettingsState.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt
  • Change Coupling · Change coupling: ScreenUtils.kt ↔ ChildProvider.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt
  • Change Coupling · Change coupling: MapToSettingsState.kt ↔ SettingsComponent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt
  • Change Coupling · Change coupling: FiltersContent.kt ↔ ResizeAndConvertContent.kt feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt
  • Change Coupling · Change coupling: MarkupProjectFile.kt ↔ EditLayerSheet.kt feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/project/MarkupProjectFile.kt
  • Change Coupling · Change coupling: Mapping.kt ↔ EditLayerSheet.kt feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/project/Mapping.kt
  • Change Coupling · Change coupling: TopAppBarEmoji.kt ↔ EmojiSelectionSheet.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/other/TopAppBarEmoji.kt
  • Supply-chain Provenance & Signing · REDACTED
Rebuild cost: about €620,000 · Estimate
Cost to rebuild€210,000 to €1,000,000, for 3,455 to 10,961 hours of work, about 4.3 person-years for 2 to 9 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.8 at a score of 59. 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: 487,972 lines of product code

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

Top priorities

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

1
Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (8).
Raises the score by about 3 points · Low effort · Static Analysis (SAST)
2
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 points · Medium effort · Security & performance tooling
3
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED (2).
Raises the score by about 2 points · Low effort · Static Analysis (SAST)

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 €620,000 to build again, about 4.3 person-years of work. Its weakest lens is Production Readiness, at 47 (Weak). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 8 REDACTED finding(s) in Static Analysis (SAST). Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 8 Static Analysis (SAST) findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.4 out of 10. Code at that level is slower to change than clean code, and Watchdog estimates the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 394,779 lines over the last 90 days, which is about 1,601,048 lines a year. At that pace, the extra work comes to an estimated 80.1 to 533.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 Watchdog's 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; 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 — a layering smell or cycle. A clean layered graph has none.

arch ImageToolbox:app ImageToolbox:app ImageToolbox:feature:root ImageToolbox:feature:root ImageToolbox:app->ImageToolbox:feature:root ImageToolbox:lib:neural-tools ImageToolbox:lib:neural-tools ImageToolbox:app->ImageToolbox:lib:neural-tools ImageToolbox:lib:opencv-tools ImageToolbox:lib:opencv-tools ImageToolbox:app->ImageToolbox:lib:opencv-tools ImageToolbox:core:data ImageToolbox:core:data ImageToolbox:core:domain ImageToolbox:core:domain ImageToolbox:core:data->ImageToolbox:core:domain ImageToolbox:core:filters ImageToolbox:core:filters ImageToolbox:core:data->ImageToolbox:core:filters ImageToolbox:core:resources ImageToolbox:core:resources ImageToolbox:core:data->ImageToolbox:core:resources ImageToolbox:core:settings ImageToolbox:core:settings ImageToolbox:core:data->ImageToolbox:core:settings ImageToolbox:core:utils ImageToolbox:core:utils ImageToolbox:core:data->ImageToolbox:core:utils ImageToolbox:core:domain->ImageToolbox:core:resources ImageToolbox:core:filters->ImageToolbox:core:domain ImageToolbox:core:filters->ImageToolbox:core:resources ImageToolbox:core:filters->ImageToolbox:core:settings ImageToolbox:core:ui ImageToolbox:core:ui ImageToolbox:core:filters->ImageToolbox:core:ui ImageToolbox:core:filters->ImageToolbox:core:utils ImageToolbox:lib:curves ImageToolbox:lib:curves ImageToolbox:core:filters->ImageToolbox:lib:curves ImageToolbox:core:filters->ImageToolbox:lib:neural-tools ImageToolbox:core:settings->ImageToolbox:core:domain ImageToolbox:core:settings->ImageToolbox:core:resources ImageToolbox:core:ui->ImageToolbox:core:domain ImageToolbox:core:ui->ImageToolbox:core:resources ImageToolbox:core:ui->ImageToolbox:core:settings ImageToolbox:core:ui->ImageToolbox:core:utils ImageToolbox:lib:cropper ImageToolbox:lib:cropper ImageToolbox:core:ui->ImageToolbox:lib:cropper ImageToolbox:core:utils->ImageToolbox:core:domain ImageToolbox:core:utils->ImageToolbox:core:resources ImageToolbox:core:utils->ImageToolbox:core:settings ImageToolbox:feature:compare ImageToolbox:feature:compare ImageToolbox:feature:compare->ImageToolbox:lib:opencv-tools ImageToolbox:feature:draw ImageToolbox:feature:draw ImageToolbox:feature:draw->ImageToolbox:core:filters ImageToolbox:feature:pick-color ImageToolbox:feature:pick-color ImageToolbox:feature:draw->ImageToolbox:feature:pick-color ImageToolbox:feature:draw->ImageToolbox:lib:neural-tools ImageToolbox:feature:draw->ImageToolbox:lib:opencv-tools ImageToolbox:feature:filters ImageToolbox:feature:filters ImageToolbox:feature:filters->ImageToolbox:core:filters ImageToolbox:feature:filters->ImageToolbox:feature:compare ImageToolbox:feature:filters->ImageToolbox:feature:draw ImageToolbox:feature:filters->ImageToolbox:feature:pick-color ImageToolbox:feature:filters->ImageToolbox:lib:curves ImageToolbox:feature:filters->ImageToolbox:lib:neural-tools ImageToolbox:feature:filters->ImageToolbox:lib:opencv-tools ImageToolbox:feature:recognize-text ImageToolbox:feature:recognize-text ImageToolbox:feature:recognize-text->ImageToolbox:core:filters ImageToolbox:feature:single-edit ImageToolbox:feature:single-edit ImageToolbox:feature:recognize-text->ImageToolbox:feature:single-edit ImageToolbox:feature:recognize-text->ImageToolbox:lib:cropper ImageToolbox:feature:recognize-text->ImageToolbox:lib:neural-tools ImageToolbox:feature:root->ImageToolbox:feature:compare ImageToolbox:feature:root->ImageToolbox:feature:draw ImageToolbox:feature:root->ImageToolbox:feature:filters ImageToolbox:feature:root->ImageToolbox:feature:pick-color ImageToolbox:feature:root->ImageToolbox:feature:recognize-text ImageToolbox:feature:settings ImageToolbox:feature:settings ImageToolbox:feature:root->ImageToolbox:feature:settings ImageToolbox:feature:root->ImageToolbox:feature:single-edit ImageToolbox:feature:single-edit->ImageToolbox:feature:compare ImageToolbox:feature:single-edit->ImageToolbox:feature:draw ImageToolbox:feature:single-edit->ImageToolbox:feature:filters ImageToolbox:feature:single-edit->ImageToolbox:feature:pick-color ImageToolbox:feature:single-edit->ImageToolbox:feature:settings ImageToolbox:feature:single-edit->ImageToolbox:lib:cropper ImageToolbox:feature:single-edit->ImageToolbox:lib:curves ImageToolbox:lib:cropper->ImageToolbox:core:resources ImageToolbox:lib:curves->ImageToolbox:core:resources ImageToolbox:lib:curves->ImageToolbox:core:ui ImageToolbox:lib:neural-tools->ImageToolbox:core:domain __more__ +81 more projects

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.

1391 modules, with 3029 dependencies between them. 58 loops run through 140 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 1351 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 com.t8rin.imagetoolbox.core.domain.coroutines2 com.t8rin.imagetoolbox.core.domain.model3 com.t8rin.imagetoolbox.core.domain.remote4 com.t8rin.imagetoolbox.core.domain.resource5 com.t8rin.imagetoolbox.core.domain.utils6 com.t8rin.imagetoolbox.core.ui.utils.navigation7 com.t8rin.palette8 io.github.alexzhirkevich.qrose.options9 com.t8rin.imagetoolbox.core.domain.image.model10 com.t8rin.imagetoolbox.core.filters.domain.model11 com.t8rin.imagetoolbox.feature.draw.domain12 com.t8rin.imagetoolbox.feature.fractal_generation.domain.model13 com.t8rin.imagetoolbox.feature.media_picker.domain.model14 com.t8rin.imagetoolbox.feature.root.presentation.components.navigation15 com.t8rin.imagetoolbox.core.domain.image16 com.t8rin.imagetoolbox.core.filters.domain17 com.t8rin.imagetoolbox.core.settings.domain.model18 com.t8rin.imagetoolbox.feature.markup_layers.domain19 com.t8rin.imagetoolbox.feature.pdf_tools.domain.model20 com.t8rin.imagetoolbox.core.domain.saving.model21 com.t8rin.imagetoolbox.core.filters.domain.model.params22 com.t8rin.imagetoolbox.core.settings.domain23 com.t8rin.imagetoolbox.core.settings.presentation.model24 com.t8rin.imagetoolbox.feature.pdf_tools.domain25 com.t8rin.imagetoolbox.core.domain.saving26 com.t8rin.imagetoolbox.core.filters.domain.model.enums27 com.t8rin.imagetoolbox.core.filters.presentation.model28 com.t8rin.imagetoolbox.core.ui.utils29 com.t8rin.imagetoolbox.core.filters.presentation.widget.addFilters30 com.t8rin.imagetoolbox.feature.pdf_tools.presentation.common31 com.t8rin.imagetoolbox.feature.recognize.text.presentation.screenLogic32 com.t8rin.imagetoolbox.feature.settings.presentation.screenLogic33 com.t8rin.imagetoolbox.core.filters.presentation.widget34 com.t8rin.imagetoolbox.feature.root.presentation.screenLogic35 com.t8rin.imagetoolbox.feature.draw.presentation.components36 com.t8rin.imagetoolbox.feature.draw.presentation.screenLogic37 com.t8rin.imagetoolbox.feature.filters.presentation.components.addEditMaskSheet38 com.t8rin.imagetoolbox.feature.single_edit.presentation.screenLogic39 com.t8rin.imagetoolbox.feature.filters.presentation.screenLogic40 com.t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild
1 com.t8rin.imagetoolbox.core.domain.coroutines
2 com.t8rin.imagetoolbox.core.domain.model
3 com.t8rin.imagetoolbox.core.domain.remote
4 com.t8rin.imagetoolbox.core.domain.resource
5 com.t8rin.imagetoolbox.core.domain.utils
6 com.t8rin.imagetoolbox.core.ui.utils.navigation
7 com.t8rin.palette
8 io.github.alexzhirkevich.qrose.options
9 com.t8rin.imagetoolbox.core.domain.image.model42
10 com.t8rin.imagetoolbox.core.filters.domain.model2
11 com.t8rin.imagetoolbox.feature.draw.domain11
12 com.t8rin.imagetoolbox.feature.fractal_generation.domain.model2
13 com.t8rin.imagetoolbox.feature.media_picker.domain.model1
14 com.t8rin.imagetoolbox.feature.root.presentation.components.navigation2
15 com.t8rin.imagetoolbox.core.domain.image214
16 com.t8rin.imagetoolbox.core.filters.domain13
17 com.t8rin.imagetoolbox.core.settings.domain.model55
18 com.t8rin.imagetoolbox.feature.markup_layers.domain21
19 com.t8rin.imagetoolbox.feature.pdf_tools.domain.model32
20 com.t8rin.imagetoolbox.core.domain.saving.model41
21 com.t8rin.imagetoolbox.core.filters.domain.model.params916
22 com.t8rin.imagetoolbox.core.settings.domain6421
23 com.t8rin.imagetoolbox.core.settings.presentation.model4419
24 com.t8rin.imagetoolbox.feature.pdf_tools.domain19
25 com.t8rin.imagetoolbox.core.domain.saving25
26 com.t8rin.imagetoolbox.core.filters.domain.model.enums1
27 com.t8rin.imagetoolbox.core.filters.presentation.model2711624317
28 com.t8rin.imagetoolbox.core.ui.utils4111521124
29 com.t8rin.imagetoolbox.core.filters.presentation.widget.addFilters13112431512
30 com.t8rin.imagetoolbox.feature.pdf_tools.presentation.common1111111
31 com.t8rin.imagetoolbox.feature.recognize.text.presentation.screenLogic1211141211231
32 com.t8rin.imagetoolbox.feature.settings.presentation.screenLogic1311412181221
33 com.t8rin.imagetoolbox.core.filters.presentation.widget1144121113
34 com.t8rin.imagetoolbox.feature.root.presentation.screenLogic121112112111
35 com.t8rin.imagetoolbox.feature.draw.presentation.components1421211
36 com.t8rin.imagetoolbox.feature.draw.presentation.screenLogic111111651111111
37 com.t8rin.imagetoolbox.feature.filters.presentation.components.addEditMaskSheet13113111111
38 com.t8rin.imagetoolbox.feature.single_edit.presentation.screenLogic1211913811112111
39 com.t8rin.imagetoolbox.feature.filters.presentation.screenLogic11135111111111
40 com.t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild799812111
Uses a module listed above itPart of a loopThe module itself
1 com.t8rin.imagetoolbox.core.domain.coroutines2 com.t8rin.imagetoolbox.core.domain.model3 com.t8rin.imagetoolbox.core.domain.remote4 com.t8rin.imagetoolbox.core.domain.resource5 com.t8rin.imagetoolbox.core.domain.utils6 com.t8rin.imagetoolbox.core.ui.utils.navigation7 com.t8rin.palette8 io.github.alexzhirkevich.qrose.options9 com.t8rin.imagetoolbox.core.domain.image.model10 com.t8rin.imagetoolbox.core.filters.domain.model11 com.t8rin.imagetoolbox.feature.draw.domain12 com.t8rin.imagetoolbox.feature.fractal_generation.domain.model13 com.t8rin.imagetoolbox.feature.media_picker.domain.model14 com.t8rin.imagetoolbox.feature.root.presentation.components.navigation15 com.t8rin.imagetoolbox.core.domain.image16 com.t8rin.imagetoolbox.core.filters.domain17 com.t8rin.imagetoolbox.core.settings.domain.model18 com.t8rin.imagetoolbox.feature.markup_layers.domain19 com.t8rin.imagetoolbox.feature.pdf_tools.domain.model20 com.t8rin.imagetoolbox.core.domain.saving.model21 com.t8rin.imagetoolbox.core.filters.domain.model.params22 com.t8rin.imagetoolbox.core.settings.domain23 com.t8rin.imagetoolbox.core.settings.presentation.model24 com.t8rin.imagetoolbox.feature.pdf_tools.domain25 com.t8rin.imagetoolbox.core.domain.saving26 com.t8rin.imagetoolbox.core.filters.domain.model.enums27 com.t8rin.imagetoolbox.core.filters.presentation.model28 com.t8rin.imagetoolbox.core.ui.utils29 com.t8rin.imagetoolbox.core.filters.presentation.widget.addFilters30 com.t8rin.imagetoolbox.feature.pdf_tools.presentation.common31 com.t8rin.imagetoolbox.feature.recognize.text.presentation.screenLogic32 com.t8rin.imagetoolbox.feature.settings.presentation.screenLogic33 com.t8rin.imagetoolbox.core.filters.presentation.widget34 com.t8rin.imagetoolbox.feature.root.presentation.screenLogic35 com.t8rin.imagetoolbox.feature.draw.presentation.components36 com.t8rin.imagetoolbox.feature.draw.presentation.screenLogic37 com.t8rin.imagetoolbox.feature.filters.presentation.components.addEditMaskSheet38 com.t8rin.imagetoolbox.feature.single_edit.presentation.screenLogic39 com.t8rin.imagetoolbox.feature.filters.presentation.screenLogic40 com.t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChildcom.t8rin.imagetoolbox.core.domain.coroutines1com.t8rin.imagetoolbox.core.domain.model2com.t8rin.imagetoolbox.core.domain.remote3com.t8rin.imagetoolbox.core.domain.resource4com.t8rin.imagetoolbox.core.domain.utils5com.t8rin.imagetoolbox.core.ui.utils.navigation6com.t8rin.palette7io.github.alexzhirkevich.qrose.options8com.t8rin.imagetoolbox.core.domain.image.model9com.t8rin.imagetoolbox.core.filters.domain.model10com.t8rin.imagetoolbox.feature.draw.domain11com.t8rin.imagetoolbox.feature.fractal_generation.domain.model12com.t8rin.imagetoolbox.feature.media_picker.domain.model13com.t8rin.imagetoolbox.feature.root.presentation.components.navigation14com.t8rin.imagetoolbox.core.domain.image15com.t8rin.imagetoolbox.core.filters.domain16com.t8rin.imagetoolbox.core.settings.domain.model17com.t8rin.imagetoolbox.feature.markup_layers.domain18com.t8rin.imagetoolbox.feature.pdf_tools.domain.model19com.t8rin.imagetoolbox.core.domain.saving.model20com.t8rin.imagetoolbox.core.filters.domain.model.params21com.t8rin.imagetoolbox.core.settings.domain22com.t8rin.imagetoolbox.core.settings.presentation.model23com.t8rin.imagetoolbox.feature.pdf_tools.domain24com.t8rin.imagetoolbox.core.domain.saving25com.t8rin.imagetoolbox.core.filters.domain.model.enums26com.t8rin.imagetoolbox.core.filters.presentation.model27com.t8rin.imagetoolbox.core.ui.utils28com.t8rin.imagetoolbox.core.filters.presentation.widget.addFilters29com.t8rin.imagetoolbox.feature.pdf_tools.presentation.common30com.t8rin.imagetoolbox.feature.recognize.text.presentation.screenLogic31com.t8rin.imagetoolbox.feature.settings.presentation.screenLogic32com.t8rin.imagetoolbox.core.filters.presentation.widget33com.t8rin.imagetoolbox.feature.root.presentation.screenLogic34com.t8rin.imagetoolbox.feature.draw.presentation.components35com.t8rin.imagetoolbox.feature.draw.presentation.screenLogic36com.t8rin.imagetoolbox.feature.filters.presentation.components.addEditMaskSheet37com.t8rin.imagetoolbox.feature.single_edit.presentation.screenLogic38com.t8rin.imagetoolbox.feature.filters.presentation.screenLogic39com.t8rin.imagetoolbox.feature.root.presentation.components.navigation.NavigationChild40422112122141355213241916642144191925127116243174111521124131124315121111111121114121123113114121812211144121113121112112111142121111111165111111113113111111121191381111211111135111111111799812111+1351 more modules (most-connected shown)

At a glance — Code Health · 78% · Strong ·

At a glance — Architecture · 91% · Exemplary ·

At a glance — Maturity · 74% · Strong ·

At a glance — Readiness · 47% · Weak · gated by P3 ·

At a glance — Security · 58% · Adequate · gated by D29, D36 ·

At a glance — Domain Modelling · 100% · Exemplary ·

At a glance — Performance · 87% · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection43High / Critical
A03:2025 — Software Supply Chain Failures9Medium

Roadmap

First, integrate automated security scanning into the CI pipeline to block regressions and resolve existing static analysis findings. Second, document disaster recovery procedures with tested restore steps to ensure business continuity beyond simple backups. Finally, implement release gates to prevent bad builds from reaching users and maintain a changelog to track what ships in each release.

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

Do thisHelpsEffortDimension
Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (8).+2.6 ptsLowStatic Analysis (SAST)
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.+4.9 ptsMediumSecurity & performance tooling
Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED (2).+2.3 ptsLowStatic Analysis (SAST)
Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED.+2.1 ptsLowSupply-chain Provenance & Signing
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).+3.5 ptsMediumDR & Backup
Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md.+1.3 ptsLowDocumentation Quality
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+2.5 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+2.5 ptsMediumRelease Hygiene

File quality

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

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt3.6SlopChange Coupling: Boundary-crossing change coupling: CropContent.kt ↔ ImageCropper.kt
feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt4.8MixedGod Classes: MethodTooLong: FormatConversionContentKt.FormatConversionContent
feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt4.8MixedCyclomatic Complexity: AndroidImageDrawApplier.applyDrawToImage (cyclomatic 34)
core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt4.9MixedCyclomatic Complexity: AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen (cyclomatic 31)
feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt4.9MixedCognitive Complexity: AndroidPdfManager.printPdf (cognitive 19)
feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt5.1MixedCognitive Complexity: AndroidAiToolsRepository.fetchDownloadedModels (cognitive 20)
feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt5.5MixedCyclomatic Complexity: ApngToolsContentKt.ApngToolsContent (cyclomatic 44)
core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt5.5MixedCyclomatic Complexity: AndroidFileController.saveImpl (cyclomatic 31)
core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt5.5MixedGod Classes: MethodTooLong: ImagePagerKt.ImagePager
feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt5.5MixedGod Classes: ClassTooLong: FiltersComponent
feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt5.5MixedGod Classes: MethodTooLong: ImageStackingContentKt.ImageStackingContent
core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/Filter.kt5.5MixedGod Classes: ClassTooLong: Filter
feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt5.5MixedGod Classes: MethodTooLong: ApngToolsComponent.saveBitmaps
feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/project/Mapping.kt5.5MixedGod Classes: ClassTooLong: MarkupMapper
feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt5.5MixedCode Duplication: Duplicated block (12–13 lines × 2)

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

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

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

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

Could not be resolved — 19

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

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 60 of 63 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.8 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

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

What we checked — 63 dimensions across the health lenses
D1D2D3D4D5D6D13D15D17D19D21D26D28D29D34D35D36D44AX10AX2AX3AX4AX8DM1DM10DM12DM6DM7DM8M1M2M3M4P1P3P4P5P6PF1PF2PF3X1X12X13X14X15X16X17X18X19X2X20X21X22X23X25X26X27X28X29X3X30X5

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, 1831 of 1882 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, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — 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
Watchdog 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
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a16f7f-8638-7a7a-ac23-5818cd84a9b7.

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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test 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 — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — 103 Maven/Gradle manifest(s) were read, stating a version for 121 dependency(ies) and leaving 4 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (250 contributor(s) across 12241 commit(s) sampled, automation and bot accounts excluded). One of them holds 82% of the history; the other 249 hold 0.1% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D20 ADR Quality — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `build-logic/convention/src/main/kotlin/com/t8rin/imagetoolbox/ProjectExtensions.kt`, `core/crash/src/main/java/com/t8rin/imagetoolbox/core/crash/presentation/screenLogic/CrashComponent.kt`, `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/image/Metadata.kt`, `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/image/model/BlendingMode.kt`, `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/ColorModel.kt`, … (+158 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.
  • AX6 Interface segregation — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing 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.
  • AXB1 Runtime evidence locked — no reproducible boot — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Subject: a native UI project (app/src/main/AndroidManifest.xml). The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. Watchdog then boots it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'android.database.sqlite' is imported (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'android.database.sqlite' is imported (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'android.database.sqlite' is imported (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'android.database.sqlite' is imported (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • DM9 Scattered domain decisions — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not measured — scattered-decision detection needs expression-level symbol resolution: a comparison operand bound to the member it judges (arm one) and a construction bound to the type it produces (arm two). A Roslyn compilation carries both; arm two alone also runs on any frontend that declares whether a construction is produced or passed, and this target loaded neither.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and no C#, F#, JavaScript/TypeScript, Dart, Ruby or Scala was found, and this repository's Kotlin is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and no C#, JavaScript/TypeScript, Java, Dart, Ruby or Scala was found, and this repository's Kotlin 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.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Scala, Ruby and Python source only, and no C# was loaded and no JavaScript/TypeScript, Java, Scala, Ruby or Python was found in this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • 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.
  • DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity5.5 / 10Adequate✓ Tool-verified

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

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

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

153 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was SettingItemKt.SettingItem at 154. A further 51 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 FastNoiseTextureParams.defaultFor at 123 — they are counted neither in the figure above nor in this dimension's score. 35 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: feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/domain/model/FastNoiseTextureParams.kt (FastNoiseTextureParams.defaultFor at 123), feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/FastNoiseParams.kt (FastNoiseParamsKt.fastNoiseConfig at 123), core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt (ScreenSearchKt.searchKeywordsRes at 99), core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt (ScreenUtilsKt.simpleName at 99), feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt (ChildProvider.createChild at 99), and 30 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.

SettingItemKt.SettingItem (cyclomatic 154)feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt:55
BitmapDrawerKt.BitmapDrawer (cyclomatic 95)feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:113
SettingsContentKt.SettingsContent (cyclomatic 67)feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:138
HandleDeeplinksKt.handleDeeplinks (cyclomatic 53)core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/HandleDeeplinks.kt:39
QualitySelectorKt.QualitySelector (cyclomatic 52)core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:91

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

What to do

  1. Bring the 3 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with SettingItemKt.SettingItem (cyclomatic 154), BitmapDrawerKt.BitmapDrawer (cyclomatic 95), SettingsContentKt.SettingsContent (cyclomatic 67). — 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 Cyclomatic Complexity from 5.6 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

260 method(s) exceeded the cognitive complexity threshold of 15; the worst was BitmapDrawerKt.BitmapDrawer at 128.

PointData.generateInterpolatedOffsets (cognitive 25) · ×2feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:245
ShapeLayerRendererKt.drawShapeLayer (cognitive 16) · ×2feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:182
BitmapDrawerKt.BitmapDrawer (cognitive 128)feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:113
SettingsContentKt.SettingsContent (cognitive 126)feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:138
BottomButtonsBlockKt.BottomButtonsBlock (cognitive 102)core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:86

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

What to do

  1. Bring the 10 bodies over 60 down to 60 or less in Cognitive Complexity — start with BitmapDrawerKt.BitmapDrawer (cognitive 128), SettingsContentKt.SettingsContent (cognitive 126), BottomButtonsBlockKt.BottomButtonsBlock (cognitive 102). — 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 10 together lifts Cognitive Complexity from 5.3 to about 6.3/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes7.1 / 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 7.1 / 10 · rule-coverage 100% · ceiling Prevented

376 god class(es) detected.

MethodTooLong: NtscParamsItemKt.NtscParamsItem · ×228core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/NtscParamsItem.kt:61
FileTooLong: data/HelpRepositoryImpl.kt · ×76feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/data/HelpRepositoryImpl.kt
ClassTooLong: HelpRepositoryImpl · ×45feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/data/HelpRepositoryImpl.kt:252
TooManyMethods: AndroidSettingsManager · ×27feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:256

What to do

  1. Resolve the 228 MethodTooLong finding(s) in God Classes — start with WavyShape.kt (3), ImageCurvesEditor.kt (3), NineFrameImage.kt (3). — One of this dimension's main actionable groups (228 warning-level).
  2. Resolve the 76 FileTooLong finding(s) in God Classes — start with HelpRepositoryImpl.kt, ThreeFrameImage.kt, ImageCurvesEditor.kt. — One of this dimension's main actionable groups (76 warning-level).
  3. Resolve the 45 ClassTooLong finding(s) in God Classes — start with HelpRepositoryImpl.kt, NeuralModel.kt, PhotoFilterCurvesControl.kt. — One of this dimension's main actionable groups (45 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication9.3 / 10Stronggated by 785 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

726 duplicated block group(s) detected. A further 59 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted.

Duplicated block (12 lines × 2) · ×31core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:87
Duplicated block (17 lines × 2) · ×29core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:230
Duplicated block (15 lines × 2) · ×25core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:85
Duplicated block (11 lines × 2) · ×25core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:359
Duplicated block (13 lines × 2) · ×21core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:114

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

What to do

  1. Resolve the 31 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with FiveFrameImage.kt (2), FourFrameImage.kt (2), TenFrameImage.kt (2). — One of this dimension's main actionable groups (31 warning-level).
  2. Resolve the 29 Duplicated block (17 lines × 2) finding(s) in Code Duplication — start with CropPdfToolContent.kt (2), FourFrameImage.kt (2), AndroidImageScaler.kt. — One of this dimension's main actionable groups (29 warning-level).
  3. Resolve the 25 Duplicated block (15 lines × 2) finding(s) in Code Duplication — start with ResizeAndConvertComponent.kt (4), ImageTracer.kt (2), AndroidImageGetter.kt. — One of this dimension's main actionable groups (25 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D5 · Coupling6.7 / 10Adequate✓ Tool-verified

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

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

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

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

101 production modules (Gradle), 0 dependency cycle(s), 4 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; 37 module(s) off the main sequence, with abstractness counted on 99 of the 101 (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: ImageToolbox:core:resources · ×37
Unstable project ImageToolbox:core:ui · ×4

What to do

  1. Resolve the 37 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (37 warning-level).
  2. Resolve the 4 Unstable project ImageToolbox finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
  3. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.4 / 10Stronggated by 16 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.4 / 10 · rule-coverage 100% · ceiling Verified

16 of 316 classes have LCOM4 above 3.

Low cohesion: SemanticFaceIndex (LCOM4 10) · ×16feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt:37

What to do

  1. Resolve the 16 Low cohesion finding(s) in Cohesion (LCOM4) — start with SemanticFaceIndex.kt, AndroidPdfHelper.kt, SingleEditComponent.kt. — One of this dimension's main actionable groups (16 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

Top hotspots: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt (29×99=2871); feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt (14×154=2156); feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt (20×99=1980) Repeated repair below the complexity floor: feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt (3 of 5 changes were fixes); core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/SavingFolder.kt (3 of 3 changes were fixes)

Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt · ×80core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt:193
Repeated repair: feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt · ×2feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt:105

What to do

  1. Resolve the 80 Hotspot finding(s) in Churn × Complexity Hotspots — start with ScreenUtils.kt, SettingItem.kt, ChildProvider.kt. — One of this dimension's main actionable groups (80 warning-level).
  2. Resolve the 2 Repeated repair finding(s) in Churn × Complexity Hotspots — start with StyleTransferProcessor.kt, SavingFolder.kt. — One of this dimension's main actionable groups (2 warning-level).

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

D17 · Explicit Debt10.0 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

3 deducted task-comment markers across 487972 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.

TodoComment · ×3core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/AnimateContentSizeNoClip.kt:216

What to do

  1. Resolve the 3 TodoComment finding(s) in Explicit Debt — start with AnimateContentSizeNoClip.kt, DynamicCropState.kt, Palette.kt. — One of this dimension's main actionable groups (3 warning-level).
  2. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D19 · Documentation QualityStrong◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

The repository's root README (README.md) gives a strong branding presence with the Image Toolbox logo and an API badge plus a short overview of what the project is. It also documents the feature/code-preview/src/main/assets/code-preview/themes/ directory as its own README, which is appropriate for that tier. The architecture document ARCHITECTURE.md is well written: it opens with a strong title, shows a Mermaid modules graph (with theme variables), and is clipped mid-sentence before any of the outlined sections are shown, so those cannot be flagged missing. All four outlined categories are present in the root README but only one (overview) is visible; the quality sits at 7.

Documentation: no project overviewREADME.md

What to do

  1. Resolve the 1 Documentation finding(s) in Documentation Quality — start with README.md. — One of this dimension's main actionable groups (1 recommendation-level).

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

D21 · Naming ConsistencyExemplary◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D26 · Project Cohesion7.3 / 10Strong✓ 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, LLM-independent.

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

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

Projects may be oversized for their cohesion

What to do

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

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

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

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

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

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

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

43 finding(s): 0 critical, 41 high, 2 medium, 0 low. 25 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 5 file(s) — `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt` (line 762), `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt` (line 741), `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/data/AndroidCryptographyManager.kt` (line 453), `gradlew` (line 74, line 178), `lib/colors/src/main/assets/color_names.json` — 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 3 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 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (8). — One of this dimension's main actionable groups (8 issue-level).
  2. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (7 issue-level).
  3. No action in Static Analysis (SAST) — all 25 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 (25 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 2105 of the 4032 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.6 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: AndroidSettingsManager.kt↔SettingKeys.kt 96%; MapToSettingsState.kt↔SettingKeys.kt 93%; AndroidSettingsManager.kt↔MapToSettingsState.kt 93%

Boundary-crossing change coupling: CropContent.kt ↔ ImageCropper.ktfeature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:1
Change coupling: AndroidPdfManager.kt ↔ PdfUtils.kt · ×40feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:1
Change-coupling hub: SettingKeys.kt → SettingsInteractor.kt, SimpleSettingsInteractor.kt, SettingsState.kt, Setting.kt, SettingsGroup.kt, AndroidSettingsManager.kt, MapToSettingsState.kt, SettingItem.kt, SettingsComponent.kt · ×11feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/SettingKeys.kt
Change coupling clique: ScreenSearch.kt, ScreenUtils.kt, ChildProvider.ktcore/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with CropContent.kt. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 40 Change coupling finding(s) in Change Coupling — start with AndroidPdfManager.kt (2), Filter.kt (2), FormatConversionContent.kt (2). — One of this dimension's main actionable groups (40 warning-level).
  3. Resolve the 11 Change-coupling hub finding(s) in Change Coupling — start with SettingKeys.kt, AndroidSettingsManager.kt, SettingsState.kt. — One of this dimension's main actionable groups (11 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 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — 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.

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition8.6 / 10Strong✓ 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.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX2 · Stateful singletons10.0 / 10Exemplary✓ 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.

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

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

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

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

DM1 · Aggregate boundaries10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.

Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.

Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.

DM10 · One transaction, one aggregate10.0 / 10Exemplary○ Nothing flagged

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.

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.

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.

DM7 · Repository granularity10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether repositories are per aggregate root (not per child entity) and keep the persistence query handle behind the contract, so the root's invariants can't be bypassed.

Method: Roslyn (DDD-gated): repository abstraction detection; repositories over non-aggregate-root entities flagged, and (C#/VB) repository INTERFACES whose members return a live persistence query handle (IQueryable/DbSet/IMongoQueryable) — implementations and specification evaluators are out of population by design, since composing a query internally is what an implementation is for. Deterministic, DDD-native.

Coverage: Population: repositories + aggregate roots by NAME convention; per-root repository rule checked within the set.

DM8 · Value-object opportunities10.0 / 10Exemplary✓ Tool-verified

Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.

Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.

  • The parameters [isregular, rotationdegrees, vertices] travel together across 3 signatures and were confirmed as a coherent concept by the model — that's a missing value object. Extracting them into one type (e.g. `Address`, `Money`, `Coordinate`) removes repetition, prevents argument-order mistakes, and gives the concept a home for its rules. — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/domain/ShapeLayerModeExt.kt:108
  • The parameters [innerradiusratio, isregular, rotationdegrees, vertices] travel together across 3 signatures and were confirmed as a coherent concept by the model — that's a missing value object. Extracting them into one type (e.g. `Address`, `Money`, `Coordinate`) removes repetition, prevents argument-order mistakes, and gives the concept a home for its rules. — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/domain/ShapeLayerModeExt.kt:125

What to do

  • Extract recurring primitive parameter clusters into value objects so the concept (and its rules) lives in one place.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add a README to the 101 of 101 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates7.0 / 10Strong✓ Tool-verified

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

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

  • A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.

What to do

  • Run the test suite in CI via an explicit runner step (`./gradlew test` for the toolchain this pipeline already uses) and gate merges on it.
P3 · Security & performance tooling3.0 / 10Weak✓ 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 10946 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.

What to do

  • Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `github-actions` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ 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.

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P5 · DR & Backup4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF1 · Benchmark discipline9.5 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF2 · Allocation hygiene7.3 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.

Method: Production-source scan: density (per 1k LoC) of allocation-aware APIs — in .NET Span/Memory, ArrayPool/ObjectPool, stackalloc, ValueTask, value-type structs, IBufferWriter, string.Create, SkipLocalsInit; off .NET, with comments and strings blanked, Go's sync.Pool, preallocated slices/maps, Grow, strconv.Append* and buf[:0] reuse; the JVM's NIO buffer views, MemorySegment, primitive collections, pools and literal presizes (plus Kotlin primitive arrays and value classes, Scala AnyVal and @specialized); Swift's reserveCapacity, ContiguousArray, withUnsafe* access and ~Copyable. Activated off .NET on the same floor (400 lines, and benchmarks or 8 uses); Rust and garbage-collected scripting languages are not applicable. Reward-only. Deterministic, syntax/text detection.

What to do

  • Raise allocation-aware density on the hot paths — currently 1413 use(s) across 525,322 production line(s) (~2.7/1k). More of the idioms below on the allocation-heavy paths climbs this toward 10.
  • Kotlin: on hot paths, use primitive arrays (IntArray, LongArray …) and @JvmInline value classes instead of boxed values, primitive collections (androidx.collection, fastutil) instead of boxed ones, and presize collections and StringBuilders.
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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

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.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

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

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

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.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

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.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether suspend functions that make a cancellable request accept or pass on the coroutine's cancellation (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

X20 · Mistyped argument guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether an argument guard throws the exception its own condition describes — a guard that rejects a value for being EMPTY and reports it as `NullPointerException` (Java, Kotlin, Scala), `ArgumentError.notNull` (Dart) or `ArgumentNullException` (F#'s `nullArg`) tells the caller a parameter was null when it provably was not.

Method: Roslyn syntax: `throw new ArgumentNullException(nameof(p))` statements controlled by an `if`, whose condition is read for a test that is true of a NON-null `p` — an emptiness test that dereferences it (`p.Count == 0`, `!p.Any()`) or a BCL predicate documented true of the empty value (`string.IsNullOrEmpty(p)`). Deterministic, provable per finding. Advisory.

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.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

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.

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.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

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

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

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

Other · Code Health — 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 handling5.5 / 10Adequate✓ Tool-verified

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

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

  • `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×19) — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/FolderImagePicker.kt:142, feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/DisplacementFilter.kt:86, feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/utils/MediaQuery.kt:241, …
  • `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. (×2) — core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/EncryptedFileUtils.kt:47, lib/neural-tools/src/main/java/com/t8rin/neural_tools/assistant/AssistantModels.kt:495
  • 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. (×3) — lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:212, lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:224, lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:235

What to do

  • Swallowed exception (caught, then discarded)
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.6 / 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 Health78%StrongSolid.
Architecture91%ExemplarySolid.
Maturity74%StrongSolid.
Readiness47%Weak — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security58%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling100%ExemplaryStrongest area.
Performance87%StrongSolid.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 25 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 — 3 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: this repository stores data through 'android.database.sqlite' (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'android.database.sqlite' (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'android.database.sqlite' (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
Not included — 62 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not 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
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: this repository stores data through 'android.database.sqlite' (feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticSearchIndex.kt:22) but declares no persisted model this check reads (Room/JPA/Spring Data/MongoDB @Entity and Realm classes, Exposed and Ktorm table columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL migrations and SQLDelight files). Personal data may be written through raw SQL or a hosted backend, so the absence of a personal-data field here is not evidence that none is stored, and encryption at rest is not scored over a subject that could not be established.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~22997 lines of test source are present (.kt) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .kt suite was found but not re-run
  • D12 Dependency Hygiene — Not scored — 103 Maven/Gradle manifest(s) were read, stating a version for 121 dependency(ies) and leaving 4 to a parent or an imported BOM, but no build resolved the dependency graph, so the outdated signal was not established. NOT a finding that these dependencies are current or healthy.
  • D14 License Compliance — Not scored — this repository's 121 declared JVM dependency coordinate(s) were read from its 103 Maven/Gradle manifest(s), but Maven Central could not be asked for the licence of 121 of them (HTTP 429 Too Many Requests from https://repo1.maven.org/maven2/androidx/work/work-runtime-ktx/2.12.0/work-runtime-ktx-2.12.0.pom), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — Repository kind not determined
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.kt), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • 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) and a Gradle version catalogue — 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) — 163 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • 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) and a Gradle version catalogue — not scanned yet).
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is 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 its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM11 Constructible invalid state — no entities detected — construction-time invariants not assessable
  • DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
  • DM3 Integration-event coupling — no integration events detected — coupling check not applicable
  • DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
  • DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
  • DM9 Scattered domain decisions — not measured — scattered-decision detection needs expression-level symbol resolution: a comparison operand bound to the member it judges (arm one) and a construction bound to the type it produces (arm two). A Roslyn compilation carries both; arm two alone also runs on any frontend that declares whether a construction is produced or passed, and this target loaded neither
  • 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 and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P2 Observability — This repository's JVM source (99 module(s), 3932 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JVM source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (JaCoCo XML — the Gradle `jacocoTestReport` task) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X24 Document value interpolated into markup unescaped — 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
  • 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.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 42 finding(s)
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
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: CropContent.kt ↔ ImageCropper.kt feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:1 — `feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt` (context feature) and `lib/cropper/src/main/java/com/t8rin/cropper/ImageCropper.kt` (context cropper) 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `6ff761d3` Added undo/redo options to crop tool by #3032; `38f7876a` Revert "Added undo/redo options to crop tool by #3032"; `fca52320` Added undo/redo options to crop tool by #3032 — run `git show` on any of them.
Serious — 1801 finding(s)
D3 · God Classes · MethodTooLong · ×228
  • MethodTooLong: NtscParamsItemKt.NtscParamsItem core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/NtscParamsItem.kt:61 — MethodTooLong — NtscParamsItem runs 498 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 398 over it, 4.98× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CollageMakerContentKt.CollageMakerContent feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:140 — MethodTooLong — CollageMakerContent runs 466 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 366 over it, 4.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EditLayerSheetKt.EditLayerSheet feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:107 — MethodTooLong — EditLayerSheet runs 447 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 347 over it, 4.47× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ApngToolsContentKt.ApngToolsContent feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:105 — MethodTooLong — ApngToolsContent runs 428 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WebpToolsContentKt.WebpToolsContent feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:106 — MethodTooLong — WebpToolsContent runs 421 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 321 over it, 4.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SettingItemKt.SettingItem feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt:55 — MethodTooLong — SettingItem runs 419 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 319 over it, 4.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MappingsKt.fromPair feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt:501 — MethodTooLong — fromPair runs 412 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 312 over it, 4.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NeuralModelsColumnKt.NeuralModelsColumn feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:100 — MethodTooLong — NeuralModelsColumn runs 393 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 293 over it, 3.93× 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: SettingsContentKt.SettingsContent feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:138 — MethodTooLong — SettingsContent runs 392 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 292 over it, 3.92× 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: QualitySelectorKt.QualitySelector core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:91 — MethodTooLong — QualitySelector runs 374 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 274 over it, 3.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: DrawEditOptionKt.DrawEditOption feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:116 — MethodTooLong — DrawEditOption runs 364 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 264 over it, 3.64× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MarkupLayersContextActionsKt.MarkupLayersContextActions feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersContextActions.kt:82 — MethodTooLong — MarkupLayersContextActions runs 352 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 252 over it, 3.52× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CompareScreenContentKt.CompareScreenContent feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContent.kt:114 — MethodTooLong — CompareScreenContent runs 351 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 251 over it, 3.51× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MappingsKt.toPair feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt:72 — MethodTooLong — toPair runs 348 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 248 over it, 3.48× 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: SingleEditContentKt.SingleEditContent feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:93 — MethodTooLong — SingleEditContent runs 325 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 225 over it, 3.25× 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: WavyShape.<init> core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/WavyShape.kt:84 — MethodTooLong — <init> runs 322 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 222 over it, 3.22× 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: WavyShape.<init> core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/WavyShape.kt:94 — MethodTooLong — <init> runs 314 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 214 over it, 3.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MarkupLayersContentKt.MarkupLayersContent feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/MarkupLayersContent.kt:121 — MethodTooLong — MarkupLayersContent runs 313 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 213 over it, 3.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:109 — MethodTooLong — MediaPickerGridWithOverlays runs 310 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 210 over it, 3.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ScreenPreferenceSelectionKt.ScreenPreferenceSelection feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:101 — MethodTooLong — ScreenPreferenceSelection runs 302 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 202 over it, 3.02× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WavyShape.createOutline core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/WavyShape.kt:111 — MethodTooLong — createOutline runs 299 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 199 over it, 2.99× 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: EraseBackgroundContentKt.EraseBackgroundContent feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:116 — MethodTooLong — EraseBackgroundContent runs 291 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 191 over it, 2.91× 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: CropContentKt.CropContent feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:97 — MethodTooLong — CropContent runs 290 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 190 over it, 2.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: BottomButtonsBlockKt.BottomButtonsBlock core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:86 — MethodTooLong — BottomButtonsBlock runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.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: AvailableColorTuplesSheetKt.AvailableColorTuplesSheet core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/AvailableColorTuplesSheet.kt:100 — MethodTooLong — AvailableColorTuplesSheet runs 280 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 180 over it, 2.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.
  • + 203 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×80
  • Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt:193 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in ScreenUtilsKt.simpleName at line 193. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt:55 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 154 in SettingItemKt.SettingItem at line 55. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt:318 — feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in ChildProvider.createChild at line 318. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt:131 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 99 in ScreenSearchKt.searchKeywordsRes at line 131. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:113 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 95 in BitmapDrawerKt.BitmapDrawer at line 113. 2 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt:32 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt changed 15 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 36 in ScreenListKt.screensFor at line 32. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:99 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in DrawContentKt.DrawContent at line 99. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteSelector.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteSelector.kt:323 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteSelector.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in GradientPaletteSelectorKt.label at line 323. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteSelector.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: lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:169 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in ImageCurvesEditorKt.ImageCurvesEditor 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-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.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: lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:477 — lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in ArchiveEngine.configureWriter at line 477. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:116 — feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in DrawEditOptionKt.DrawEditOption at line 116. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:109 — feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays at line 109. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt:78 — feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in MediaSemanticSearchControlsKt.MediaSemanticSearchControls at line 78. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:138 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in SettingsContentKt.SettingsContent at line 138. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/domain/model/FastNoiseTextureParams.kt feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/domain/model/FastNoiseTextureParams.kt:29 — feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/domain/model/FastNoiseTextureParams.kt changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 123 in FastNoiseTextureParams.defaultFor at line 29. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/domain/model/FastNoiseTextureParams.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:106 — feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in WebpToolsContentKt.WebpToolsContent at line 106. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:312 — feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in AssistantContentKt.AssistantComposer at line 312. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:92 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in AndroidImageDrawApplier.applyDrawToImage at line 92. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt:68 — feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in AssistantKnowledge.retrieve at line 68. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt:501 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in MappingsKt.fromPair at line 501. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:152 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in AndroidFileController.saveImpl at line 152. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItemContent.kt core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItemContent.kt:117 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItemContent.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in FilterItemContentKt.FilterItemContent at line 117. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItemContent.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:105 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in ApngToolsContentKt.ApngToolsContent at line 105. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.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: lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:679 — lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in PhotoFilterCurvesControl.onDraw at line 679. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.kt:295 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in GradientStrokeCache.render at line 295. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.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.
  • + 55 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×76
  • FileTooLong: data/HelpRepositoryImpl.kt feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/data/HelpRepositoryImpl.kt — FileTooLong — 5042 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: HelpRepositoryImpl (252-5944). The bar is 500 significant lines; this is 4542 over it, 10.08× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: frames/ThreeFrameImage.kt lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt — FileTooLong — 1536 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1036 over it, 3.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: curves/ImageCurvesEditor.kt lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt — FileTooLong — 1536 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1036 over it, 3.07× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: frames/FiveFrameImage.kt lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt — FileTooLong — 1484 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 984 over it, 2.97× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: model/NeuralModel.kt feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/domain/model/NeuralModel.kt — FileTooLong — 1217 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: NeuralModel (25-1418). The bar is 500 significant lines; this is 717 over it, 2.43× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: data/AndroidPdfManager.kt feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt — FileTooLong — 1161 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: AndroidPdfManager (134-1517). The bar is 500 significant lines; this is 661 over it, 2.32× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: view/PhotoFilterCurvesControl.kt lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt — FileTooLong — 1092 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: PhotoFilterCurvesControl (48-1452). The bar is 500 significant lines; this is 592 over it, 2.18× 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: compose/FreeCornersCropper.kt lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt — FileTooLong — 1069 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 569 over it, 2.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: navigation/Screen.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/Screen.kt — FileTooLong — 1061 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: Screen (49-1404). The bar is 500 significant lines; this is 561 over it, 2.12× 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: data/DepthProcessor.kt feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt — FileTooLong — 1051 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: DepthProcessor (61-1378). The bar is 500 significant lines; this is 551 over it, 2.10× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: components/FastNoiseParams.kt feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/FastNoiseParams.kt — FileTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: ParamInfo (124-1335). The bar is 500 significant lines; this is 522 over it, 2.04× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: data/CvStitchHelper.kt feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/CvStitchHelper.kt — FileTooLong — 1002 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: CvStitchHelper (55-1280). The bar is 500 significant lines; this is 502 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: frames/FourFrameImage.kt lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt — FileTooLong — 959 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 459 over it, 1.92× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: tracer/ImageTracer.kt feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt — FileTooLong — 952 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 452 over it, 1.90× 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: data/AndroidSettingsManager.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt — FileTooLong — 912 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: AndroidSettingsManager (256-1364). The bar is 500 significant lines; this is 412 over it, 1.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: navigation/NavigationChild.kt feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/NavigationChild.kt — FileTooLong — 908 significant lines (blank, comment-only and punctuation-only lines excluded), about 76% of them inside a single declaration: NavigationChild (225-1295). The bar is 500 significant lines; this is 408 over it, 1.82× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: screenLogic/FiltersComponent.kt feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt — FileTooLong — 881 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: FiltersComponent (105-1254). 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: navigation/ChildProvider.kt feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt — FileTooLong — 873 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: ChildProvider (219-1188). The bar is 500 significant lines; this is 373 over it, 1.75× 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: model/GradientPalette.kt core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/GradientPalette.kt — FileTooLong — 848 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: GradientPalette (23-1046). The bar is 500 significant lines; this is 348 over it, 1.70× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: serialization/Mappings.kt feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt — FileTooLong — 844 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 344 over it, 1.69× 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: ocr/PaddleOCR.kt lib/neural-tools/src/main/java/com/t8rin/neural_tools/ocr/PaddleOCR.kt — FileTooLong — 822 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 322 over it, 1.64× 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: screenLogic/SingleEditComponent.kt feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt — FileTooLong — 815 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: SingleEditComponent (101-1191). The bar is 500 significant lines; this is 315 over it, 1.63× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: frames/NineFrameImage.kt lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt — FileTooLong — 801 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 301 over it, 1.60× 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: theme/DynamicTheme.kt lib/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt — FileTooLong — 789 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 289 over it, 1.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: screenLogic/RecognizeTextComponent.kt feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt — FileTooLong — 777 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: RecognizeTextComponent (101-1180). The bar is 500 significant lines; this is 277 over it, 1.55× 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.
  • + 51 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×45
  • ClassTooLong: HelpRepositoryImpl feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/data/HelpRepositoryImpl.kt:252 — ClassTooLong — 4811 significant lines (blank, comment-only and punctuation-only lines excluded), 7 methods. The bar is 400 significant lines; this is 4411 over it, 12.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NeuralModel feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/domain/model/NeuralModel.kt:25 — ClassTooLong — 1213 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 813 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.
  • ClassTooLong: PhotoFilterCurvesControl lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:48 — ClassTooLong — 1066 significant lines (blank, comment-only and punctuation-only lines excluded), 39 methods. The bar is 400 significant lines; this is 666 over it, 2.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Screen core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/Screen.kt:49 — ClassTooLong — 1027 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 627 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DepthProcessor feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:61 — ClassTooLong — 1010 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 610 over it, 2.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: CvStitchHelper feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/CvStitchHelper.kt:55 — ClassTooLong — 967 significant lines (blank, comment-only and punctuation-only lines excluded), 27 methods. The bar is 400 significant lines; this is 567 over it, 2.42× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AndroidPdfManager feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:134 — ClassTooLong — 961 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 561 over it, 2.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ParamInfo feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/FastNoiseParams.kt:124 — ClassTooLong — 914 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 514 over it, 2.29× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GradientPalette core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/GradientPalette.kt:23 — ClassTooLong — 836 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 436 over it, 2.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: FiltersComponent feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:105 — ClassTooLong — 790 significant lines (blank, comment-only and punctuation-only lines excluded), 58 methods. The bar is 400 significant lines; this is 390 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: SingleEditComponent feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:101 — ClassTooLong — 734 significant lines (blank, comment-only and punctuation-only lines excluded), 71 methods. The bar is 400 significant lines; this is 334 over it, 1.84× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SemanticFaceIndex feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt:37 — ClassTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 318 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: RecognizeTextComponent feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:101 — ClassTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded), 54 methods. The bar is 400 significant lines; this is 297 over it, 1.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FrameImageView lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:53 — ClassTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 297 over it, 1.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NavigationChild feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/NavigationChild.kt:225 — ClassTooLong — 694 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 294 over it, 1.74× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ChildProvider feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt:219 — ClassTooLong — 674 significant lines (blank, comment-only and punctuation-only lines excluded), 2 methods. The bar is 400 significant lines; this is 274 over it, 1.69× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AndroidSettingsManager feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:256 — ClassTooLong — 672 significant lines (blank, comment-only and punctuation-only lines excluded), 180 methods. The bar is 400 significant lines; this is 272 over it, 1.68× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MarkupLayersComponent feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/screenLogic/MarkupLayersComponent.kt:92 — ClassTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), 67 methods. The bar is 400 significant lines; this is 245 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: AndroidFileController core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:93 — ClassTooLong — 644 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 244 over it, 1.61× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: JxlToolsComponent feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:68 — ClassTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. The bar is 400 significant lines; this is 212 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: MediaPickerComponent feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/screenLogic/MediaPickerComponent.kt:81 — ClassTooLong — 597 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 197 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: LayersRenderer feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:75 — ClassTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), 17 methods. The bar is 400 significant lines; this is 196 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: OptimizationStyleTransferProcessor feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:58 — ClassTooLong — 589 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 189 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Setting core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt:24 — ClassTooLong — 587 significant lines (blank, comment-only and punctuation-only lines excluded), 1 methods. The bar is 400 significant lines; this is 187 over it, 1.47× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: GradientMakerComponent feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:83 — ClassTooLong — 582 significant lines (blank, comment-only and punctuation-only lines excluded), 42 methods. The bar is 400 significant lines; this is 182 over it, 1.46× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 20 more in this group — see findings.md.
D35 · Change Coupling · Change coupling · ×40
  • Change coupling: AndroidPdfManager.kt ↔ PdfUtils.kt feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:1 — `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/utils/PdfUtils.kt` change together 90% of the time (9 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `69f3e519` Fixed split PDF tool by #3037; `fd6f6c6e` Improved multilingual text handling in PDF files by #2964; `9683e6e3` Fixed crashes with large PDF documents by #2819 — run `git show` on any of them.
  • Change coupling: ImagePager.kt ↔ MediaImagePager.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:1 — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` change together 79% of the time (19 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `9c5da762` Attempts to improve performance; `c6637c82` Fixed gestures in image pagers while zoomed by #3253; `77a578e7` Fixed animated images preview in preview modes by #3097 — run `git show` on any of them.
  • Change coupling: Filter.kt ↔ Mappings.kt core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/Filter.kt:1 — `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/Filter.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.kt` change together 78% of the time (21 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 21 shared commits counted here, the most recent 3 are `26cd53dc` * Added 59 built-in gradient palettes * Added gradient palette preset…; `fc76a249` Added 7 new filters: - Flare - Distort Perspective - Java Look And Fe…; `703f1057` Added Torn Edge and Drop Shadow filters by #2890 — run `git show` on any of them.
  • Change coupling: BitmapDrawer.kt ↔ BitmapEraser.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:1 — `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt` and `feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/BitmapEraser.kt` change together 75% of the time (36 of the 48 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 36 shared commits counted here, the most recent 3 are `716ff098` Added ability to disable border around image in Draw and Erase tools …; `77c5fe96` Added Warp draw mode by #2106; `19e57463` Added Spray draw path mode — run `git show` on any of them.
  • Change coupling: SettingsGroup.kt ↔ SettingItem.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt:1 — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt` change together 74% of the time (70 of the 95 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 70 shared commits counted here, the most recent 3 are `038e6685` Added ability to show help & tips button on the main screen; `a9474818` Added setting to enable categorized settings UI; `e2996cc7` Added ability to enable semantic images search by #1900 — run `git show` on any of them.
  • Change coupling: FormatConversionContent.kt ↔ ResizeAndConvertContent.kt feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:1 — `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` change together 73% of the time (11 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `9c5da762` Attempts to improve performance; `b028121a` Added customizable RAW development settings; `420adac1` Added undo/redo to 4 basic tools — run `git show` on any of them.
  • Change coupling: Filter.kt ↔ FilterItemContent.kt core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/Filter.kt:1 — `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/Filter.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItemContent.kt` change together 72% of the time (47 of the 65 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 47 shared commits counted here, the most recent 3 are `26cd53dc` * Added 59 built-in gradient palettes * Added gradient palette preset…; `2a411ab0` Added Displacement filter by #3033; `fc76a249` Added 7 new filters: - Flare - Distort Perspective - Java Look And Fe… — run `git show` on any of them.
  • Change coupling: AndroidAiToolsRepository.kt ↔ AiToolsComponent.kt feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt:1 — `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt` change together 67% of the time (20 of the 30 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 20 shared commits counted here, the most recent 3 are `118ef777` Added ability to use custom depth map in AI tools by #3074; `39bc997d` Added 9 AI image detector models by #3063; `ce834232` Added 3 depth AI models to create depth map and smart effects — run `git show` on any of them.
  • Change coupling: FormatConversionContent.kt ↔ SingleEditContent.kt feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:1 — `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `9c5da762` Attempts to improve performance; `b028121a` Added customizable RAW development settings; `420adac1` Added undo/redo to 4 basic tools — run `git show` on any of them.
  • Change coupling: CropContent.kt ↔ CropEditOption.kt feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:1 — `feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/CropEditOption.kt` change together 66% of the time (19 of the 29 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `adc7c55e` Added undo/redo options to crop tool by #3032; `3b6d6582` * Added ability to make crop overlay undraggable * Improved free corn…; `4f6d1c32` Improved cropper tool quality by #2942 — run `git show` on any of them.
  • Change coupling: Mapping.kt ↔ LayersRenderer.kt feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/project/Mapping.kt:1 — `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/project/Mapping.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt` change together 65% of the time (11 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `31a9f131` Added ability to reorder background image in Markup Layers by #3240; `297efe74` Added ability to use gradient instead of solid color to markup layers; `e07a4573` shapes markup proposal — run `git show` on any of them.
  • Change coupling: ImageStitchingContent.kt ↔ ImageScaleSelector.kt feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:1 — `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/ImageScaleSelector.kt` change together 64% of the time (7 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `17dfdc0a` Improve Image Stitching tool stability by #2429; `dbf4defb` Added image alignment for stitch modes by #1321 (at that commit the files were still `feature/image-stitch/src/main/java/ru/tech/imageresizershrinker/feature/image_stitch/presentation/ImageStitchingContent.kt` and `feature/image-stitch/src/main/java/ru/tech/imageresizershrinker/feature/image_stitch/presentation/components/ImageScaleSelector.kt`); `5265b39d` StitchMode expanded by #573 (at that commit the files were still `app/src/main/java/ru/tech/imageresizershrinker/presentation/image_stitching_screen/ImageStitchingScreen.kt` and `app/src/main/java/ru/tech/imageresizershrinker/presentation/image_stitching_screen/components/ImageScaleSelector.kt`) — run `git show` on any of them.
  • Change coupling: AndroidAiToolsRepository.kt ↔ AiToolsControls.kt feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt:1 — `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt` change together 63% of the time (12 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `118ef777` Added ability to use custom depth map in AI tools by #3074; `39bc997d` Added 9 AI image detector models by #3063; `ce834232` Added 3 depth AI models to create depth map and smart effects — run `git show` on any of them.
  • Change coupling: AndroidPdfManager.kt ↔ BasePdfToolComponent.kt feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:1 — `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/common/BasePdfToolComponent.kt` change together 62% of the time (10 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `f6489e1f` Added Print PDF tool by #2550; `dea62479` Added Zip PDF tool; `20874400` Fixed RTL for PDF crop tool by #2540 — run `git show` on any of them.
  • Change coupling: SettingsManager.kt ↔ SettingsGroup.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsManager.kt:1 — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsManager.kt` and `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt` change together 62% of the time (21 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 21 shared commits counted here, the most recent 3 are `2aa16497` start adding one time save locations (at that commit the files were still `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/domain/SettingsManager.kt` and `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/model/SettingsGroup.kt`); `88fb1a9f` Added Default line width setting by #938 (at that commit the files were still `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/domain/SettingsRepository.kt` and `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/model/SettingsGroup.kt`); `3111cf9a` add switchtype selection (at that commit the files were still `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/domain/SettingsRepository.kt` and `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/SettingsGroup.kt`) — run `git show` on any of them.
  • Change coupling: CvStitchHelper.kt ↔ StitchModeSelector.kt feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/CvStitchHelper.kt:1 — `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/CvStitchHelper.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/StitchModeSelector.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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `17520b75` Added screenshot mode to Image Stitching tool; `b238f676` Added screenshot mode to Image Stitching tool; `8be3f56c` Added panorama image stitching type by #2988 — run `git show` on any of them.
  • Change coupling: DrawContent.kt ↔ LineWidthSelector.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:1 — `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/LineWidthSelector.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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `67b104af` Added ability to draw with Image brush in painting (at that commit the files were still `feature/draw/src/main/java/ru/tech/imageresizershrinker/feature/draw/presentation/DrawScreen.kt` and `feature/draw/src/main/java/ru/tech/imageresizershrinker/feature/draw/presentation/components/LineWidthSelector.kt`); `a1e01c03` improved strings (at that commit the files were still `feature/draw/src/main/java/ru/tech/imageresizershrinker/feature/draw/presentation/DrawScreen.kt` and `feature/draw/src/main/java/ru/tech/imageresizershrinker/feature/draw/presentation/components/LineWidthSelector.kt`); `001abe17` Added Magnifier setting control in draw/erase by #947 (at that commit the files were still `feature/draw/src/main/java/ru/tech/imageresizershrinker/feature/draw/presentation/DrawScreen.kt` and `feature/draw/src/main/java/ru/tech/imageresizershrinker/feature/draw/presentation/components/LineWidthSelector.kt`) — run `git show` on any of them.
  • Change coupling: SettingsManager.kt ↔ Setting.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsManager.kt:1 — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsManager.kt` and `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt` change together 59% of the time (20 of the 34 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 20 shared commits counted here, the most recent 3 are `88fb1a9f` Added Default line width setting by #938 (at that commit the files were still `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/domain/SettingsRepository.kt` and `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/model/Setting.kt`); `3111cf9a` add switchtype selection (at that commit the files were still `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/domain/SettingsRepository.kt` and `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/Setting.kt`); `7343d56d` ADDED ability to use fullscreen settings (at that commit the files were still `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/domain/SettingsRepository.kt` and `core/settings/src/main/java/ru/tech/imageresizershrinker/core/settings/presentation/Setting.kt`) — run `git show` on any of them.
  • Change coupling: EnhancedSliderItem.kt ↔ ValueText.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:1 — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/value/ValueText.kt` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `dd6c61e2` Added long-press reset for editable slider values; `9e5a5c93` Added AI tools by #2404; `cb1d6638` improve slider selections (at that commit the files were still `core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/controls/EnhancedSliderItem.kt` and `core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/value/ValueText.kt`) — run `git show` on any of them.
  • Change coupling: PreferenceRow.kt ↔ PreferenceRowSwitch.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceRow.kt:1 — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceRow.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceRowSwitch.kt` change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `54cf78fa` Added ability to choose overwrite files when saving by #2304; `e9631d0e` Added fast setting side on screen, can be disabled in settings, by #1447 (at that commit the files were still `core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/preferences/PreferenceRow.kt` and `core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/preferences/PreferenceRowSwitch.kt`); `e3c55eae` Start Helper grid adding (at that commit the files were still `core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/preferences/PreferenceRow.kt` and `core/ui/src/main/kotlin/ru/tech/imageresizershrinker/core/ui/widget/preferences/PreferenceRowSwitch.kt`) — run `git show` on any of them.
  • Change coupling: AndroidMarkupLayersApplier.kt ↔ MarkupLayersComponent.kt feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/AndroidMarkupLayersApplier.kt:1 — `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/AndroidMarkupLayersApplier.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/screenLogic/MarkupLayersComponent.kt` change together 58% of the time (11 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `198aed59` Fixed text rendering for markup layers by #2739; `a05c4b5f` Fixed markup layers render by #2683; `c56b8322` Fixed markup layers render by #2683 — run `git show` on any of them.
  • Change coupling: AndroidJxlConverter.kt ↔ JxlToolsComponent.kt feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:1 — `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt` and `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt` change together 57% of the time (8 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 8 shared commits counted here, the most recent 3 are `a2eddfb4` Added 3 merge tools - Merge APNG - Merge WEBP - Merge JXLx; `6875087e` Added 9 conversion tools by #3073 - GIF to APNG - WEBP to GIF - APNG …; `ef9f85e5` improve 0 size handling (at that commit the files were still `feature/jxl-tools/src/main/java/ru/tech/imageresizershrinker/feature/jxl_tools/data/AndroidJxlConverter.kt` and `feature/jxl-tools/src/main/java/ru/tech/imageresizershrinker/feature/jxl_tools/presentation/viewModel/JxlToolsViewModel.kt`) — run `git show` on any of them.
  • Change coupling: AdaptiveBottomScaffoldLayoutScreen.kt ↔ FullscreenEditOption.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:1 — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt` change together 56% of the time (9 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 `f1386d99` Improved layout for large screens; `3ee4070c` Improved UI of metadata sheet; `9c2bdef6` Added ability to align layer in markup layers tool more than center b… — run `git show` on any of them.
  • Change coupling: PreferenceItem.kt ↔ PreferenceItemOverload.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceItem.kt:1 — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceItemOverload.kt` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `e2996cc7` Added ability to enable semantic images search by #1900; `f16a7e75` Improved UI of metadata sheet; `9e5a5c93` Added AI tools by #2404 — run `git show` on any of them.
  • Change coupling: AndroidImageDrawApplier.kt ↔ AndroidFilterMaskApplier.kt feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:1 — `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/AndroidFilterMaskApplier.kt` 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, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `8c5217fd` fix warnings; `657f64a7` Code refactor; `f8ad84e3` Code refactor — run `git show` on any of them.
  • + 15 more in this group — see findings.md.
D5 · Coupling · Off the main sequence · ×37
  • Off the main sequence: ImageToolbox:core:resources — ImageToolbox:core:resources: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 10 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:archive — ImageToolbox:lib:archive: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:fast-scroller — ImageToolbox:lib:fast-scroller: 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: ImageToolbox:lib:gesture — ImageToolbox:lib:gesture: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:zoomable — ImageToolbox:lib:zoomable: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:palette — ImageToolbox:lib:palette: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 4 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:fractal-generation — ImageToolbox:feature:fractal-generation: abstractness 0.02, instability 0.00, distance 0.98 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:code-preview — ImageToolbox:feature:code-preview: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:color-tools — ImageToolbox:feature:color-tools: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:markup-layers — ImageToolbox:feature:markup-layers: abstractness 0.06, instability 0.00, distance 0.94 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:modalsheet — ImageToolbox:lib:modalsheet: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:collages — ImageToolbox:lib:collages: abstractness 0.07, instability 0.00, distance 0.93 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:noise-generation — ImageToolbox:feature:noise-generation: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:duplicate-finder — ImageToolbox:feature:duplicate-finder: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:qrose — ImageToolbox:lib:qrose: abstractness 0.10, instability 0.00, distance 0.90 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:delete-exif — ImageToolbox:feature:delete-exif: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:usage-statistics — ImageToolbox:feature:usage-statistics: abstractness 0.11, instability 0.00, distance 0.89 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:compare — ImageToolbox:feature:compare: abstractness 0.04, instability 0.07, distance 0.88 — zone of pain — concrete and depended on by 13 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:batch-rename — ImageToolbox:feature:batch-rename: abstractness 0.12, instability 0.00, distance 0.88 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:neural-tools — ImageToolbox:lib:neural-tools: abstractness 0.03, instability 0.10, distance 0.87 — zone of pain — concrete and depended on by 9 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:pick-color — ImageToolbox:feature:pick-color: abstractness 0.14, instability 0.00, distance 0.86 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:settings — ImageToolbox:feature:settings: abstractness 0.01, instability 0.14, distance 0.85 — zone of pain — concrete and depended on by 6 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:feature:gif-tools — ImageToolbox:feature:gif-tools: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:ascii — ImageToolbox:lib:ascii: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
  • Off the main sequence: ImageToolbox:lib:snowfall — ImageToolbox:lib:snowfall: abstractness 0.17, instability 0.00, distance 0.83 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • + 12 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×31
  • Duplicated block (12 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:87 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:87-98 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/HiddenWatermarkInfo.kt:161-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:87` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:68 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:68-79 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedCircularProgressIndicator.kt:115-126 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/FluentSwitch.kt:149 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/FluentSwitch.kt:149-160 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/PixelSwitch.kt:67-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:628 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:628-639 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt:655-666 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (12 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt:269 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt:269-280 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/SpotHealParamsSelector.kt:358-369 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (12 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:208 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:208-219 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:183-194 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:208` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:468 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:468-479 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:461-472 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchiveEntriesSheet.kt:114 — feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchiveEntriesSheet.kt:114-126 | feature/duplicate-finder/src/main/java/com/t8rin/imagetoolbox/feature/duplicate_finder/presentation/components/DuplicateSelectionActions.kt:97-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchiveEntriesSheet.kt:114` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 2) feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherControls.kt:181 — feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherControls.kt:181-192 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/protect/ProtectPdfToolContent.kt:81-92 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherControls.kt:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContent.kt:242 — feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContent.kt:242-257 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compare/ComparePdfToolContent.kt:101-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContent.kt:242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/data/backend/GenericBackgroundRemoverBackend.kt:34 — feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/data/backend/GenericBackgroundRemoverBackend.kt:34-45 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/AutoEraseBackgroundCardState.kt:144-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (12 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:409 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:409-420 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:260-271 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:409` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (12 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:268 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:268-279 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:118-129 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 4 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 `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:268` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:281` calls `checkBitmapAndUpdate` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:130` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:221 — feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:221-232 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:180-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt:251 — feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt:251-262 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SemanticSearchSettingItem.kt:73-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt:251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/SignaturePdfToolContent.kt:111 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/SignaturePdfToolContent.kt:111-122 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/WatermarkPdfToolContent.kt:127-138 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/SignaturePdfToolContent.kt:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:573 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:573-584 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:737-748 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:573` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:559 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:559-570 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:586-597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:559` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720-731 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:825-836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:720` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1002 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1002-1013 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1029-1040 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1002` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1482 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1482-1493 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1762-1773 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1482` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 (12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:616 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:616-627 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:874-885 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:616` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1198 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1198-1209 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1523-1534 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1198` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:288 — lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:288-299 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:597-608 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:288` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166-177 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:539-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 6 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×29
  • Duplicated block (17 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:230 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:230-246 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:320-336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/AnimationMergeUtils.kt:44 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/AnimationMergeUtils.kt:44-60 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/data/AndroidGifConverter.kt:269-285 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/AnimationMergeUtils.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/data/AndroidGifConverter.kt` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting 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) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidDownloadManager.kt:94 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidDownloadManager.kt:94-110 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidDownloadManager.kt:159-175 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/remote/AndroidDownloadManager.kt:94` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateManager.kt:181 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateManager.kt:181-197 | feature/duplicate-finder/src/main/java/com/t8rin/imagetoolbox/feature/duplicate_finder/presentation/components/DuplicateSelectionActions.kt:88-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateManager.kt:181` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:247 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:247-263 | feature/checksum-tools/src/main/java/com/t8rin/imagetoolbox/feature/checksum_tools/presentation/components/ChecksumToolsTabs.kt:150-166 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:247` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:91 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:91-107 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:341-357 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:91` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/EraseModeButton.kt:43 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/EraseModeButton.kt:43-59 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/RecoverModeCard.kt:68-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/EraseModeButton.kt:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:248 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:248-264 | feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/components/ShaderLibrary.kt:173-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:248` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:127 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:127-143 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:192-208 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:127` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt:347 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt:347-363 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt:455-471 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.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 (17 lines × 2) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:163 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:163-179 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:245-261 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:163` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:84 — feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:84-100 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:104-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `EditExifComponent` in one and `SingleEditComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:99` calls `mutableStateOf` and `feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:82` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:336 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:336-352 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:215-231 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:336` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/FractalGenerationContent.kt:205 — feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/FractalGenerationContent.kt:205-221 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:299-315 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/FractalGenerationContent.kt:205` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/FractalGenerationContent.kt:222` calls `shareButton` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:316` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:611 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:611-627 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:715-731 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:611` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:93 — feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:93-109 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt:97-113 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:145 — feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:145-161 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/screenLogic/TextureGenerationComponent.kt:162-178 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/screenLogic/TextureGenerationComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:145` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:53 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:53-69 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/RemoveAnnotationsPdfToolContent.kt:45-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:51` calls `collectAsStateWithLifecycle` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/RemoveAnnotationsPdfToolContent.kt:43` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:75 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:75-91 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/RemoveAnnotationsPdfToolContent.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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/CropPdfToolContent.kt:75` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/RecognizeTextContent.kt:301 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/RecognizeTextContent.kt:301-317 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:407-423 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/RecognizeTextContent.kt:301` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguageColumnForSearch.kt:49 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguageColumnForSearch.kt:49-65 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguagesColumn.kt:84-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (17 lines × 2) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/CropEditOption.kt:346 — feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/CropEditOption.kt:346-362 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/EraseBackgroundEditOption.kt:416-432 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/CropEditOption.kt:346` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/EraseBackgroundEditOption.kt:435` calls `DrawLockScreenOrientation` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/CropEditOption.kt:363` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664-680 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:479-495 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:664` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:955 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:955-971 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1156-1172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:955` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:666 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:666-682 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:744-760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:666` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • + 4 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×27
  • TooManyMethods: AndroidSettingsManager feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt:256 — TooManyMethods — 180 methods. The bar is 30 methods; this is 150 over it, 6.00× the bar. Most of these members implement domain.SettingsInteractor (137 of 179 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: SettingsComponent feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.kt:82 — TooManyMethods — 145 methods. The bar is 30 methods; this is 115 over it, 4.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ExtendedFrameImage lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:30 — TooManyMethods — 133 methods. The bar is 30 methods; this is 103 over it, 4.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SingleEditComponent feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:101 — TooManyMethods — 71 methods. The bar is 30 methods; this is 41 over it, 2.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MarkupLayersComponent feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/screenLogic/MarkupLayersComponent.kt:92 — TooManyMethods — 67 methods. The bar is 30 methods; this is 37 over it, 2.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FiltersComponent feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:105 — 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: RecognizeTextComponent feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:101 — TooManyMethods — 54 methods. The bar is 30 methods; this is 24 over it, 1.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ThreeFrameImage lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:33 — 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: ResizeAndConvertComponent feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:75 — 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: GradientMakerComponent feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:83 — 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: FramePhotoLayout lib/collages/src/main/java/com/t8rin/collages/view/FramePhotoLayout.kt:54 — 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: DepthProcessor feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:61 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PhotoFilterCurvesControl lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:48 — 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: CodePreviewComponent feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/screenLogic/CodePreviewComponent.kt:60 — 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: ApngToolsComponent feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:64 — TooManyMethods — 37 methods. The bar is 30 methods; this is 7 over it, 1.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ContextUtils core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/ContextUtils.kt:74 — 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.
  • TooManyMethods: FractalGenerationComponent feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/screenLogic/FractalGenerationComponent.kt:72 — 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.
  • TooManyMethods: WebpToolsComponent feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:62 — 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.
  • TooManyMethods: ArchiveToolsComponent feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/screenLogic/ArchiveToolsComponent.kt:62 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GifToolsComponent feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:63 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AndroidPdfManager feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:134 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. Most of these members implement domain.PdfManager (33 of 35 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: FiveFrameImage lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:32 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AddFiltersSheetComponent core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:73 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CompressionLabComponent feature/compression-lab/src/main/java/com/t8rin/imagetoolbox/feature/compression_lab/presentation/screenLogic/CompressionLabComponent.kt:56 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AndroidSemanticSearchRepository feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/AndroidSemanticSearchRepository.kt:59 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.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.
  • + 2 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×25
  • Duplicated block (15 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:85 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:85-99 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:148-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageGetter.kt:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:42 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:42-56 | lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:349-363 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt` and `lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:475 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:475-489 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:534-548 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:475` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelFilterSheet.kt:101 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelFilterSheet.kt:101-115 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelFilterSheet.kt:143-157 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelFilterSheet.kt:101` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:277 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:277-291 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:273-287 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:277` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:339 — feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:339-353 | feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:368-382 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/screenLogic/CollageMakerComponent.kt:339` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:185 — feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:185-199 | feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:230-244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:185` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:542 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:542-556 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/screenLogic/EraseBackgroundComponent.kt:418-432 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:542` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:417 — feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:417-431 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/EraseBackgroundEditOption.kt:268-282 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:417` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:278 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:278-292 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddMaskSheetBitmapPreview.kt:76-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (15 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:135 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:135-149 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:162-176 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:135` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `FormatConversionComponent` in one and `ResizeAndConvertComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:178` calls `mutableStateOf` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:150` 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) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaExtensionHeader.kt:38 — feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaExtensionHeader.kt:38-52 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSizeFooter.kt:38-52 — before extracting anything, compare `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaExtensionHeader.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSizeFooter.kt` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaExtensionHeader.kt:38` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:214 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:214-228 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:288-302 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:550 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:550-564 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:621-635 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:550` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiHarmonizationColorSettingItem.kt:112 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiHarmonizationColorSettingItem.kt:112-126 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SystemBarsVisibilitySettingItem.kt:71-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiHarmonizationColorSettingItem.kt:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:935 — feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:935-949 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:985-999 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:935` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1053 — feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1053-1067 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1087-1101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1053` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1069` calls `clone` and `feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1103` 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) feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:454 — feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:454-468 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:504-518 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:454` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:732 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:732-746 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1518-1532 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:732` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:153 — lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:153-167 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:224-238 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:153` it does not close everything it opens, so those exact lines 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) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:534 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:534-548 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:726-741 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/forensics/ImageForensics.kt:236 — lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/forensics/ImageForensics.kt:236-250 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/forensics/ImageForensics.kt:255-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/forensics/ImageForensics.kt:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/AutodeskColorBookCoder.kt:130 — lib/palette/src/main/java/com/t8rin/palette/coders/AutodeskColorBookCoder.kt:130-144 | lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:215-229 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `lib/palette/src/main/java/com/t8rin/palette/coders/AutodeskColorBookCoder.kt:130` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (15 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:303 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:303-317 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:469-483 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:319 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:319-333 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:485-499 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (11 lines × 2) · ×25
  • Duplicated block (11 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:359 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:359-369 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:250-260 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:359` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:83 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:83-93 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt:79-89 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:83` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:235 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:235-245 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:272-282 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:235` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:455 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:455-465 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:448-458 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:455` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherControls.kt:194 — feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherControls.kt:194-204 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/protect/ProtectPdfToolContent.kt:94-104 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherControls.kt:194` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:678 — feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:678-688 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/ImageScaleSelector.kt:157-167 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:678` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/CompareContent.kt:174 — feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/CompareContent.kt:174-184 | feature/image-preview/src/main/java/com/t8rin/imagetoolbox/feature/image_preview/presentation/ImagePreviewContent.kt:384-394 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/CompareContent.kt:174` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/screenLogic/CropComponent.kt:222 — feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/screenLogic/CropComponent.kt:222-232 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:834-844 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (11 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:136 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:136-146 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:286-296 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:136` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:988 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:988-998 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1058-1068 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:988` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:181 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:181-191 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:219-229 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:181` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguagesColumn.kt:119 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguagesColumn.kt:119-130 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/PickFontFamilySheet.kt:84-94 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguagesColumn.kt:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:421 — feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:421-431 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:452-462 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:421` 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) lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:214 — lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:214-224 | lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:323-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:214` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:582 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:582-592 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.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 `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:582` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:367 — lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:367-377 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:462-472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:367` it begins part-way through the construct above it, so those exact lines 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) lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:506 — lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:506-516 | lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:529-539 — both copies are in the same file, so extract the 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) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:140 — lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:140-150 | lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:157-167 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/DropShadowParamsItem.kt:93 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/DropShadowParamsItem.kt:93-103 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/TornEdgeParamsItem.kt:113-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/DropShadowParamsItem.kt:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/FlareParamsItem.kt:85 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/FlareParamsItem.kt:85-95 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterDropParamsItem.kt:69-79 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/FlareParamsItem.kt:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:335 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:335-345 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:501-511 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:707 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:707-719 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:1080-1090 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:62 — lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:62-72 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt:48-58 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt` and `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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) lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:74 — lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:74-84 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt:60-70 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt` and `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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) lib/cropper/src/main/java/com/t8rin/cropper/crop/CropAgent.kt:291 — lib/cropper/src/main/java/com/t8rin/cropper/crop/CropAgent.kt:291-301 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/FreeCrop.kt:191-201 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 (13 lines × 2) · ×21
  • Duplicated block (13 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:114 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:114-128 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelFilterSheet.kt:65-77 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:73 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:73-85 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:69-81 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:73` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:434 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:434-446 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:420-432 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:434` 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) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt:77 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt:77-89 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ScoopShape.kt:78-90 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ScoopShape.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/AiToolsContent.kt:165 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/AiToolsContent.kt:165-177 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/CipherContent.kt:113-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/AiToolsContent.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 (13 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:139 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:139-151 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:171-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:136 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:136-148 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:157-169 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:170 — feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:170-182 | feature/palette-pdf/src/main/java/com/t8rin/imagetoolbox/feature/palette_pdf/presentation/PalettePdfToolContent.kt:148-160 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:75 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:75-87 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:117-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:257 — feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:257-269 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:781-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:257` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/SignaturePdfToolContent.kt:49 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/SignaturePdfToolContent.kt:49-61 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/WatermarkPdfToolContent.kt:58-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `SignaturePdfToolComponent` in one and `WatermarkPdfToolComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/SignaturePdfToolContent.kt:63` calls `collectAsStateWithLifecycle` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/WatermarkPdfToolContent.kt:72` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229 — lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229-241 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:555-567 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:139 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:139-151 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:201-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 `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:139` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1640 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1640-1652 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1844-1856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1640` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:69 — lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:69-81 | lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:65-77 — before extracting anything, compare `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt` and `lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt` as WHOLE FILES: this scan already matched 3 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 `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:69` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:66` calls `InvalidFormat` and `lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:63` 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) lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:84 — lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:84-96 | lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:80-92 — before extracting anything, compare `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt` and `lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt` as WHOLE FILES: this scan already matched 3 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 `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/Pulsate.kt:94 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/Pulsate.kt:94-106 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/RotateAnimation.kt:94-106 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/Pulsate.kt:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `range` to `ClosedFloatingPointRange<Float>` in one and `IntRange` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (13 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:454 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:454-466 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:500-512 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:468 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:468-480 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:455-467 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:482 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:482-494 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:468-480 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:484 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:484-496 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:469-481 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:484` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×21
  • Swallowed exception (caught, then discarded) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/FolderImagePicker.kt:142 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/EncryptedFileUtils.kt:47 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/DisplacementFilter.kt:86 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/utils/MediaQuery.kt:241 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/utils/MediaObserver.kt:119 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/utils/MediaObserver.kt:124 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/utils/MediaObserver.kt:132 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/neural-tools/src/main/java/com/t8rin/neural_tools/assistant/AssistantModels.kt:495 — `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) lib/palette/src/main/java/com/t8rin/palette/coders/SwiftPaletteCoder.kt:109 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/KotlinPaletteCoder.kt:221 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:100 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:115 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:128 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:138 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:158 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CSVPaletteCoder.kt:51 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CSVPaletteCoder.kt:64 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/CSVPaletteCoder.kt:76 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:118 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:273 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) lib/palette/src/main/java/com/t8rin/palette/coders/ACBPaletteCoder.kt:283 — `catch (_: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×20
  • Duplicated block (9 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:74 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:74-82 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:60-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:59` calls `onFilterChange` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SideFadeRelativeItem.kt:73` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:48 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:48-56 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:48-56 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt` as WHOLE FILES: 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. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:57` calls `remember`, `mutableStateOf`, `toColor` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/ColorModelPairItem.kt:58` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:362 — core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:362-370 | core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:378-386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiFontFamily.kt:362` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:197 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:197-205 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt:212-220 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:197` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:393 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:393-401 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:517-525 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:393` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:766 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:766-774 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:857-865 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:766` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:856` calls `coerceIn` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:765` 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) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:184 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:184-192 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:238-246 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:184` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:181 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:181-189 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:327-335 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:256 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:256-264 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:280-288 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:289` calls `setOffset` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:265` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:307 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:307-315 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:456-464 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.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.
  • Duplicated block (9 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:456 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:456-464 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:518-526 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:456` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:714 — lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:714-722 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:134-142 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:714` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1748 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1748-1756 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1829-1837 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1801 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1801-1809 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:111-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:379 — lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:379-387 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:465-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 `lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:379` it does not close everything it opens, so those exact lines 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) lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:552 — lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:552-560 | lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:575-583 — both copies are in the same file, so extract the 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) lib/curves/src/main/java/com/t8rin/curves/ImageScopeOverlay.kt:276 — lib/curves/src/main/java/com/t8rin/curves/ImageScopeOverlay.kt:276-284 | lib/curves/src/main/java/com/t8rin/curves/ImageScopeOverlay.kt:300-308 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/curves/src/main/java/com/t8rin/curves/ImageScopeOverlay.kt:276` it does not close everything it opens, so those exact lines 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) lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:243 — lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:243-251 | lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:285-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:243` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:93 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:93-101 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:127-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 `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:39 — lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:39-47 | lib/palette/src/main/java/com/t8rin/palette/coders/SkencilPaletteCoder.kt:44-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.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.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×19
  • Duplicated block (19 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:178 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:178-196 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:504-522 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:178` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:91 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:91-109 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:92-110 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:91` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:377 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:377-395 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:270-288 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:377` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageFormatSelector.kt:232 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageFormatSelector.kt:232-250 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageFormatSelector.kt:291-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageFormatSelector.kt:232` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:213 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:213-231 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:210-228 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:213` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:209` calls `getOrNull` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:212` 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) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt:136 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt:136-154 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/ScanQrCodeControls.kt:310-328 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/AiToolsControls.kt:136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelTypeResources.kt:166 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelTypeResources.kt:166-184 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelTypeResources.kt:266-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelTypeResources.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/AsciiArtContent.kt:153 — feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/AsciiArtContent.kt:153-171 | feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:160-178 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ascii-art/src/main/java/com/t8rin/imagetoolbox/feature/ascii_art/presentation/AsciiArtContent.kt:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `AsciiArtComponent` in one and `EditExifComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:35 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:35-53 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.kt:35-53 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.kt` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.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.
  • Duplicated block (19 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:177 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:177-195 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:179-197 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:177` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskReorderSheet.kt:64 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskReorderSheet.kt:64-82 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ScreenOrderSettingItem.kt:132-150 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskReorderSheet.kt:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:384 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:384-402 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:235-253 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:384` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:373 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:373-391 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:234-252 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:373` 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) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:729 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:729-747 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:873-891 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:729` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:376 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:376-394 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:546-564 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:237 — feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:237-255 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:492-510 — both copies are in the same file, so extract the 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) lib/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt:87 — lib/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt:87-105 | lib/image/src/main/java/com/t8rin/image/util/ImageContentScaleUtil.kt:87-105 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/util/ImageContentScaleUtil.kt` and `lib/image/src/main/java/com/t8rin/image/util/ImageContentScaleUtil.kt` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `Canvas` names `androidx.compose.foundation.Canvas` in one and `androidx.compose.ui.graphics.Canvas` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 2) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:654 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:654-672 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:722-740 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.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.
  • Duplicated block (19 lines × 2) lib/zoomable/src/main/java/net/engawapg/lib/zoomable/ZoomState.kt:320 — lib/zoomable/src/main/java/net/engawapg/lib/zoomable/ZoomState.kt:320-338 | lib/zoomable/src/main/java/net/engawapg/lib/zoomable/ZoomState.kt:369-387 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/zoomable/src/main/java/net/engawapg/lib/zoomable/ZoomState.kt:320` it begins part-way through the construct above it, so those 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 (14 lines × 2) · ×19
  • Duplicated block (14 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:323 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:323-336 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:657-670 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:126 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:126-139 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt:280-293 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.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 (14 lines × 2) core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/QrType.kt:101 — core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/QrType.kt:101-114 | feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:411-424 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/QrType.kt:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:501 — core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:501-514 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:1578-1591 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:501` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:726 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:726-739 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:698-711 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:726` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayout.kt:70 — feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayout.kt:70-83 | feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayout.kt:127-140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayout.kt:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/OpenColorPickerCard.kt:53 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/OpenColorPickerCard.kt:53-66 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientMakerColorPickerAdditionalContent.kt:70-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 `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/OpenColorPickerCard.kt:53` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:112 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:112-125 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:371-384 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:112` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:202 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:202-215 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:257-270 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:202` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:372 — feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:372-385 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:640-653 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:372` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditBoxState.kt:450 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditBoxState.kt:450-463 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditBoxState.kt:487-500 — both copies are in the same file, so extract the 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 (14 lines × 2) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/components/FusionParamsSelector.kt:227 — feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/components/FusionParamsSelector.kt:227-240 | feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/components/FusionParamsSelector.kt:256-269 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/components/FusionParamsSelector.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 (14 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:144 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:144-157 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:158-171 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:144` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/DefaultResizeTypeSettingItem.kt:65 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/DefaultResizeTypeSettingItem.kt:65-78 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SnowfallModeSettingItem.kt:68-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/DefaultResizeTypeSettingItem.kt:65` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SnowfallModeSettingItem.kt:66` calls `fillMaxWidth` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/DefaultResizeTypeSettingItem.kt:64` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:860 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:860-873 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:467-480 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:860` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1091 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1091-1104 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1500-1513 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1091` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:654 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:654-667 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1402-1415 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:654` it does not close everything it opens, so those exact lines 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) lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:97 — lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:97-110 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt:80-93 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt` and `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/screenLogic/MultiFrameFusionComponent.kt:161 — feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/screenLogic/MultiFrameFusionComponent.kt:161-174 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/screenLogic/PhotomosaicComponent.kt:180-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×19
  • Duplicated block (7 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:224 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:224-230 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:258-264 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/components/ShaderParamsEditor.kt:414 — feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/components/ShaderParamsEditor.kt:414-420 | feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/screenLogic/ShaderStudioMapper.kt:48-54 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:326 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:326-332 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:134-140 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.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.
  • Duplicated block (7 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317 — lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317-323 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:498-504 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:525 — lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:525-531 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:356-362 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:525` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:540 — lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:540-546 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:592-598 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:540` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:129 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:129-135 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:186-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:129` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:176 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:176-182 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:569-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:248 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:248-254 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:417-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 `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:248` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:258 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:258-264 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:432-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:258` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:309 — lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:309-315 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:366-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.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 (7 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1469 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1469-1475 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1484-1490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1569 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1569-1575 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1593-1599 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) lib/documentscanner/src/main/java/com/t8rin/documentscanner/extensions/Point.kt:30 — lib/documentscanner/src/main/java/com/t8rin/documentscanner/extensions/Point.kt:30-92 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/model/Quad.kt:32-38 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt:184 — core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt:184-190 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ContactPicker.kt:221-227 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt:131 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt:131-137 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ScoopShape.kt:185-191 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/NotchShape.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ScoopShape.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:91 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:91-97 | lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:391-397 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt` and `lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/DimensionUtil.kt:48 — feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/DimensionUtil.kt:48-54 | lib/cropper/src/main/java/com/t8rin/cropper/util/DimensionUtil.kt:48-54 — before extracting anything, compare `feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/DimensionUtil.kt` and `lib/cropper/src/main/java/com/t8rin/cropper/util/DimensionUtil.kt` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:64 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:64-70 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt:66-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: `PreferredColorConfig` names `com.awxkee.jxlcoder.PreferredColorConfig` in one and `com.radzivon.bartoshyk.avif.coder.PreferredColorConfig` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×17
  • Duplicated block (10 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/shader/ShaderValidator.kt:144 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/shader/ShaderValidator.kt:144-153 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/shader/ShaderValidator.kt:161-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:82 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:82-91 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:90-99 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:82` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageScaleDirectionSelector.kt:42 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageScaleDirectionSelector.kt:42-51 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/StitchAlignmentSelector.kt:43-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageScaleDirectionSelector.kt:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:208 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:208-217 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:251-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomSliderDefaults.kt:208` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:199 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:199-208 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:311-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:199` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:766 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:766-775 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:759-768 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:766` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:221 — feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:221-230 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:1065-1074 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.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 (10 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:204 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:204-213 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:339-348 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:204` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/PointillizeFilter.kt:36 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/PointillizeFilter.kt:36-45 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/VoronoiCrystallizeFilter.kt:36-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:72 — feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:72-81 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:135-144 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.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 (10 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/utils/PdfRenderer.kt:91 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/utils/PdfRenderer.kt:91-100 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/utils/PdfRenderer.kt:128-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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/utils/PdfRenderer.kt:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/RemovePagesPdfToolContent.kt:43 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/RemovePagesPdfToolContent.kt:43-52 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/zip_convert/ZipConvertPdfToolContent.kt:43-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/RemovePagesPdfToolContent.kt:43` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `RemovePagesPdfToolComponent` in one and `ZipConvertPdfToolComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:838 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:838-847 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:926-935 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:838` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:734 — lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:734-743 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:518-527 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 33 separate duplicated blocks between them, totalling at least 300 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:734` it does not close everything it opens, so those exact lines 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) lib/cropper/src/main/java/com/t8rin/cropper/crop/CropAgent.kt:280 — lib/cropper/src/main/java/com/t8rin/cropper/crop/CropAgent.kt:280-289 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/FreeCrop.kt:180-189 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:906 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:906-915 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:31-40 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:906` it does not close everything it opens, so those 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:44 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:44-53 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:44-53 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:55` calls `remember`, `mutableFloatStateOf`, `toFloat` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:55` 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 (16 lines × 2) · ×16
  • Duplicated block (16 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:290 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:290-305 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:416-431 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:290` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/PaletteStyleSelectionItem.kt:50 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/PaletteStyleSelectionItem.kt:50-65 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ColorBlindSchemeSettingItem.kt:136-151 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:191 — feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:191-206 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:167-182 — before extracting anything, compare `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt` and `feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.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 (16 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:528 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:528-543 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/BitmapEraser.kt:319-334 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 (16 lines × 2) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:112 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:112-127 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/AnimatedJxlParamsSelector.kt:111-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:112` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (16 lines × 2) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:85 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:85-100 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:80-95 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` and `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:85` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageCutterComponent` in one and `ImageSplitterComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:207 — feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:207-222 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:275-290 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/components/SplitParamsSelector.kt:161 — feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/components/SplitParamsSelector.kt:161-176 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/components/StitchModeSelector.kt:82-97 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/components/SplitParamsSelector.kt:161` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:396 — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:396-411 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:431-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:396` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:108 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:108-123 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:83-98 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:468 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:468-483 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:530-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/components/EditPaletteControls.kt:206 — feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/components/EditPaletteControls.kt:206-221 | feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/components/ImageColorPalette.kt:81-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/components/EditPaletteControls.kt:206` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:785 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:785-800 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:855-870 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:811 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:811-826 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:443-458 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:811` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1191 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1191-1206 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1374-1389 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:129 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:129-144 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:441-456 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:129` it begins part-way through the construct above it, so those 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 · ×16
  • Low cohesion: SemanticFaceIndex (LCOM4 10) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/SemanticFaceIndex.kt:37 — SemanticFaceIndex's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: AndroidPdfHelper (LCOM4 8) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfHelper.kt:99 — AndroidPdfHelper's methods fall into 8 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 8 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SingleEditComponent (LCOM4 5) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:101 — SingleEditComponent's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: RootComponent (LCOM4 5) feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/screenLogic/RootComponent.kt:82 — RootComponent'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: MarkupMapper (LCOM4 5) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/project/Mapping.kt:70 — MarkupMapper'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: FiltersComponent (LCOM4 5) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:105 — FiltersComponent'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: EraseBackgroundComponent (LCOM4 5) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/screenLogic/EraseBackgroundComponent.kt:63 — EraseBackgroundComponent'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: ApngToolsComponent (LCOM4 5) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:64 — ApngToolsComponent'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: AiToolsComponent (LCOM4 5) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt:78 — AiToolsComponent'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: WebpToolsComponent (LCOM4 4) feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:62 — WebpToolsComponent's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: WallpapersExportComponent (LCOM4 4) feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/screenLogic/WallpapersExportComponent.kt:53 — WallpapersExportComponent's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ImagesToPdfToolComponent (LCOM4 4) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/images_to_pdf/screenLogic/ImagesToPdfToolComponent.kt:42 — ImagesToPdfToolComponent'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: AndroidJxlConverter (LCOM4 4) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:68 — AndroidJxlConverter'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: JxlToolsComponent (LCOM4 4) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:68 — JxlToolsComponent'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: GifToolsComponent (LCOM4 4) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:63 — GifToolsComponent'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: AddFiltersSheetComponent (LCOM4 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheetComponent.kt:73 — AddFiltersSheetComponent's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×13
  • Duplicated block (21 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:251 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:251-271 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:576-596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:251` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (21 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:120 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:120-140 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskReorderSheet.kt:123-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterReorderSheet.kt:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:96 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:96-116 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:116-136 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:133 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:133-153 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:204-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:133` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:225` calls `animateFloatingRangeAsState` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:154` 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 (21 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:148 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:148-168 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/BitmapEraser.kt:102-122 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:248 — feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:248-268 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:437-457 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:248` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:381 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:381-401 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:192-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:381` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:206 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:206-226 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:278-298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:184 — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:184-204 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:213-233 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 262 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:184` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (21 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt:130 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt:130-150 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt:105-125 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt:127` calls `coerceAtLeast` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt:103` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (21 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiHarmonizationColorSettingItem.kt:89 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiHarmonizationColorSettingItem.kt:89-109 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiTypeSettingItem.kt:68-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ConfettiHarmonizationColorSettingItem.kt:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Shape = ShapeDefaults.center` in one and `Shape = ShapeDefaults.bottom` 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 (21 lines × 2) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:674 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:674-694 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:749-769 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:674` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:65 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt:65-85 | lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:365-385 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/ObservePointersCount.kt` and `lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×13
  • Duplicated block (6 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/GradientColorItem.kt:70 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/GradientColorItem.kt:70-75 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteSelector.kt:264-269 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/GradientColorItem.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteSelector.kt:262` calls `remember`, `toColor` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/GradientColorItem.kt:68` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:630 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:630-637 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:677-682 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:630` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:639` calls `coerceAtLeast` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:684` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/components/CodeHighlight.kt:74 — feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/components/CodeHighlight.kt:74-79 | feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/components/ShaderPresetEditor.kt:195-200 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/components/CodeHighlight.kt:74` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:97 — lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:97-102 | lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt:107-112 — before extracting anything, compare `lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt` and `lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/AnimationMergeUtils.kt:32 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/AnimationMergeUtils.kt:32-37 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/data/AndroidGifConverter.kt:257-262 — before extracting anything, compare `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/AnimationMergeUtils.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/data/AndroidGifConverter.kt` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:401 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:401-406 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/DefaultResizeTypeSettingItem.kt:80-85 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:836 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:836-841 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/PictureLayerShadowRenderer.kt:149-154 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:836` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt:85 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt:85-90 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/sanitize/screenLogic/SanitizePdfToolComponent.kt:85-90 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/sanitize/screenLogic/SanitizePdfToolComponent.kt` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:644 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:644-649 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:804-809 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:66 — lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:66-71 | lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt:47-52 — before extracting anything, compare `lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt` and `lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt:85 — lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt:85-90 | lib/neural-tools/src/main/java/com/t8rin/neural_tools/search/ClipImageSearch.kt:97-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 `lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt:85` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1225 — feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1225-1230 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1231-1236 — both copies are in the same file, so extract the 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) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1255 — feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1255-1260 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1261-1266 — both copies are in the same file, so extract the 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×12
  • Members sharing a duplicated core (4 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:75 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:75-210 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:83-273 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientSizeSelector.kt:44-102 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:84-273 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:107 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:107-717 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:58-113 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsTopAppBarActions.kt:61-122 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:108-711 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:107 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:107-717 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:46-157 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientMakerNoDataControls.kt:59-170 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:108-711 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:242 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:242-420 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:271-434 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:226-505 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:239-423 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197-211 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:213-231 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:252-270 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:272-301 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:689 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:689-767 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:869-918 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:981-1043 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1047-1121 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:44 — feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:44-103 | feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:70-226 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt:71-236 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/components/WallpapersActionButtons.kt:44-106 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:107 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:107-140 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:82-111 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRail.kt:178-208 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRailForFavorites.kt:156-187 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:70 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:70-206 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:91-244 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:101-317 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:94-283 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:35 — feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:35-138 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/FbmParams.kt:30-59 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/MarbleParams.kt:30-65 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt:30-77 — 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) lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:38 — lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:38-81 | lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:37-81 | lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:37-65 | lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt:37-91 — 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) lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:83 — lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:83-102 | lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:67-87 | lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt:93-112 | lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:79-98 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×12
  • Duplicated block (18 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:106 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:106-123 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt:260-277 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:355 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:355-372 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:482-500 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:482` it begins part-way through the construct above it, so those exact lines 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) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:280 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:280-297 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:303-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:280` it begins part-way through the construct above it, so those exact 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 (18 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:101 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:101-118 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:103-120 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:155 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:155-172 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:191-208 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskItem.kt:202 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskItem.kt:202-219 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskItem.kt:158-175 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskItem.kt:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:233 — feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:233-250 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:376-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:233` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:423 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:423-440 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/screenLogic/RecognizeTextComponent.kt:899-916 — both copies are in the same file, so extract the 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 (18 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:582 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:582-599 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:179-196 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:582` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684-701 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:494-511 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:684` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886-903 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:503-520 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886` it begins part-way through the construct above it, so those exact lines 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) lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:268 — lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:268-285 | lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:497-514 — both copies are in the same file, so extract the 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.
D35 · Change Coupling · Change-coupling hub · ×11
  • Change-coupling hub: SettingKeys.kt → SettingsInteractor.kt, SimpleSettingsInteractor.kt, SettingsState.kt, Setting.kt, SettingsGroup.kt, AndroidSettingsManager.kt, MapToSettingsState.kt, SettingItem.kt, SettingsComponent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/SettingKeys.kt — `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/SettingKeys.kt` changes together with 9 other files — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SimpleSettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/model/SettingsState.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.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: AndroidSettingsManager.kt → SimpleSettingsInteractor.kt, Setting.kt, SettingsGroup.kt, MapToSettingsState.kt, SettingItem.kt, SettingsComponent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt — `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt` changes together with 6 other files — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SimpleSettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.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.
  • Change-coupling hub: SettingsState.kt → SettingsManager.kt, SimpleSettingsInteractor.kt, Setting.kt, SettingsGroup.kt, SettingItem.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/model/SettingsState.kt — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/model/SettingsState.kt` changes together with 5 other files — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsManager.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SimpleSettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
  • Change-coupling hub: UiSettingsState.kt → SettingsInteractor.kt, SettingsManager.kt, SimpleSettingsInteractor.kt, Setting.kt, SettingsGroup.kt, AndroidSettingsManager.kt, MapToSettingsState.kt, SettingKeys.kt, SettingItem.kt, SettingsComponent.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiSettingsState.kt — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/UiSettingsState.kt` changes together with 10 other files — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsManager.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SimpleSettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/SettingKeys.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.kt` — none of which declares a dependency on it: one file is the hub of 10 separate couplings, not 10 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 10.
  • Change-coupling hub: SettingsInteractor.kt → SettingsState.kt, Setting.kt, SettingsGroup.kt, AndroidSettingsManager.kt, MapToSettingsState.kt, SettingItem.kt, SettingsComponent.kt core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SettingsInteractor.kt` changes together with 7 other files — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/model/SettingsState.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/AndroidSettingsManager.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.kt` — none of which declares a dependency on it: one file is the hub of 7 separate couplings, not 7 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 7.
  • Change-coupling hub: UiFilter.kt → AndroidFilterProvider.kt, GlitchTool.kt, Mappings.kt core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/model/UiFilter.kt — `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/model/UiFilter.kt` changes together with 3 other files — `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/AndroidFilterProvider.kt`, `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/glitch/GlitchTool.kt`, `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/serialization/Mappings.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: LimitsResizeContent.kt → DeleteExifContent.kt, FiltersContent.kt, ResizeAndConvertContent.kt, SingleEditContent.kt, WeightResizeContent.kt feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt — `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` changes together with 5 other files — `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt`, `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt`, `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt`, `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt`, `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` — none of which declares a dependency on it: one file is the hub of 5 separate couplings, not 5 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 5.
  • Change-coupling hub: MetadataPreviewButton.kt → ImagePager.kt, UriUtils.kt, MediaImagePager.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/MetadataPreviewButton.kt — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/MetadataPreviewButton.kt` changes together with 3 other files — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt`, `core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt`, `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.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: DeleteExifContent.kt → FiltersContent.kt, ResizeAndConvertContent.kt, WeightResizeContent.kt feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt — `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` changes together with 3 other files — `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt`, `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt`, `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.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: MapToSettingsState.kt → SimpleSettingsInteractor.kt, Setting.kt, SettingsGroup.kt, SettingsComponent.kt feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt — `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/data/keys/MapToSettingsState.kt` changes together with 4 other files — `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/domain/SimpleSettingsInteractor.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/Setting.kt`, `core/settings/src/main/java/com/t8rin/imagetoolbox/core/settings/presentation/model/SettingsGroup.kt`, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/screenLogic/SettingsComponent.kt` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: AndroidApngConverter.kt → Screen.kt, ApngToolsContent.kt, ApngToolsComponent.kt feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt — `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt` changes together with 3 other files — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/Screen.kt`, `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt`, `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.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.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×11
  • Duplicated block (5 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt:199 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt:199-203 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt:268-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt:199` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:201 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:201-205 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:216-220 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:201` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:238 — lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:238-242 | lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:338-342 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:238 — lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:238-242 | lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:219-223 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt:69 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt:69-73 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/sanitize/screenLogic/SanitizePdfToolComponent.kt:69-73 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/sanitize/screenLogic/SanitizePdfToolComponent.kt` as WHOLE FILES: 89% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1245 — feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1245-1249 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1250-1254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1215 — feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1215-1219 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1220-1224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFilenameCreator.kt:200 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFilenameCreator.kt:200-204 | feature/batch-rename/src/main/java/com/t8rin/imagetoolbox/feature/batchrename/domain/helper/FilenamePatternResolver.kt:61-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:197 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:197-201 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:250-254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:309 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:309-313 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:357-361 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:532 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:532-536 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:577-581 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:532` it begins part-way through the construct above it, so those 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 × 2) · ×10
  • Duplicated block (23 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:144 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:144-166 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:188-210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:144` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (23 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:192 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:192-214 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:302-324 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/RecentAndFavoriteColorsCard.kt:192` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:384 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:384-406 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:547-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:384` 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) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:190 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:190-212 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:186-208 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:209` calls `getOrNull` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:213` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (23 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:146 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:146-168 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt:148-170 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (23 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:48 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:48-70 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/TriangleParamsSelector.kt:48-70 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/TriangleParamsSelector.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:48` 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) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:181 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:181-203 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:205-227 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/screenLogic/ImageStackingComponent.kt:181` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:168 — feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:168-190 | feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:245-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (23 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:397 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:397-419 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:567-589 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (23 lines × 2) lib/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:101 — lib/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:101-123 | lib/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:205-227 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:101` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:100` calls `onDown` and `lib/gesture/src/main/java/com/t8rin/gesture/AwaitPointerMotionEvent.kt:204` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×10
  • Duplicated block (20 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:177 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:177-196 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt:153-172 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:177` 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) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:82 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:82-101 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:88-107 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:312 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:312-331 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:307-326 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:312` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:310` calls `rememberFilename`, `rememberFileSize` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:306` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (20 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:77 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:77-96 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:100-119 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `FormatConversionComponent` in one and `ResizeAndConvertComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:165 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:165-184 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt:126-145 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:165` 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) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:269 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:269-288 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:317-336 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:269` 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) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:127 — feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:127-146 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:143-162 — before extracting anything, compare `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt` and `feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:127` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `MultiFrameFusionComponent` in one and `PhotomosaicComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (20 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/ModelTypeSelector.kt:65 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/ModelTypeSelector.kt:65-84 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OcrEngineModeSelector.kt:65-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/ModelTypeSelector.kt:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (20 lines × 2) feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:354 — feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:354-373 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:441-460 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:354` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:292 — lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:292-311 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:369-388 — both copies are in the same file, so extract the 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 (8 lines × 2) · ×10
  • Duplicated block (8 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:53 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:53-60 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt:49-56 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:53` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: `PreferredColorConfig` names `com.awxkee.jxlcoder.PreferredColorConfig` in one and `com.radzivon.bartoshyk.avif.coder.PreferredColorConfig` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt:47` calls `Coder` and `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:51` 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) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:758 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:758-765 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:848-855 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:856` calls `coerceIn` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:766` 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) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:663 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:663-670 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:657-664 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (8 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:321 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:321-328 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:933-940 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:321` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:510 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:510-517 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:294-301 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 23 separate duplicated blocks between them, totalling at least 231 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:510` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317 — lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317-324 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:68-75 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:317` it begins part-way through the construct above it, so those exact lines 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) lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:154 — lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:154-161 | lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:185-192 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:154` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:426 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:426-433 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainDrawerContent.kt:158-165 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:435 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:435-442 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainDrawerContent.kt:167-174 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:116 — lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:116-124 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt:99-106 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt` and `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 45 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, 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 (12 lines × 3) · ×9
  • Duplicated block (12 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:132 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:132-143 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:127-138 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:138-149 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:132` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:148 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:148-159 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:130-141 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:189-200 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:289 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:289-300 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:408-419 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:428-439 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:289` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:286` calls `toString` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:425` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216-227 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:311-322 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:545-556 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:866 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:866-877 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:827-838 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:473-484 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:866` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1097 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1097-1108 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1130-1141 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1506-1517 — 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 `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1097` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1189 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1189-1200 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1372-1383 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1710-1721 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1189` it does not close everything it opens, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:509 — lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:509-520 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:569-580 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:626-637 — 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 `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:509` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 3) lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:70 — lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:70-81 | lib/palette/src/main/java/com/t8rin/palette/coders/GIMPPaletteCoder.kt:71-82 | lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:54-65 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:70` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (14 lines × 3) · ×8
  • Duplicated block (14 lines × 3) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:229 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:229-242 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:341-354 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelectorSheetContent.kt:267-280 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:229` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:227` calls `animateTo` and `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelectorSheetContent.kt:266` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 3) feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:163 — feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:163-176 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:156-169 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:132-145 — before extracting anything, compare `feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt` and `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:163` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 3) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:160 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:160-173 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:192-210 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:164-181 — before extracting anything, compare `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:160` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `ResizeAndConvertComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (14 lines × 3) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:735 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:735-748 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1011-1025 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1088-1102 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:735` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:322 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:322-335 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:445-458 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:765-778 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:322` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (14 lines × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt:103 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt:103-116 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/components/SignaturePreview.kt:73-86 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt:80-93 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt` as WHOLE FILES: 86% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/components/PageNumbersPreview.kt:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:172 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:172-185 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:198-211 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:213-226 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:197` calls `rememberLazyGridState` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:171` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (14 lines × 3) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:180 — feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:180-193 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/screenLogic/TextureGenerationComponent.kt:199-212 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:318-331 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/screenLogic/TextureGenerationComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (16 lines × 3) · ×7
  • Duplicated block (16 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:260 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:260-275 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:227-242 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:256-271 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:260` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:106 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:106-121 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:164-179 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:177-192 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 3) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:228 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:228-243 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientSizeSelector.kt:80-95 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:229-244 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:182 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:182-197 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:172-187 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:237-252 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:182` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `FormatConversionComponent` in one and `LimitsResizeComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 3) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:305 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:305-320 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:310-325 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:382-397 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:305` 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 × 3) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:42 — feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:42-57 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/FbmParams.kt:38-53 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt:56-71 — before extracting anything, compare `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:42` it begins part-way through the construct above it, so those exact lines 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) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275-290 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:884-899 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:549-564 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275` it begins part-way through the construct above it, so those 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 (15 lines × 3) · ×7
  • Duplicated block (15 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:151 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:151-165 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:143-157 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheet.kt:119-133 — 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 `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:105 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:105-119 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:114-128 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:125-139 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:105` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:71 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:71-85 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:85-99 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:79-93 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:71` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:109 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:109-123 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt:263-277 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/DownloadedLanguageItem.kt:110-124 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:109` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:108` calls `setOf` and `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/DownloadedLanguageItem.kt:109` 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 × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:606 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:606-620 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:95-109 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:593-607 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt: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.
  • Duplicated block (15 lines × 3) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:335 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:335-349 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:214-228 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:489-503 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:335` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:536 — lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:536-550 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:39-53 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:100-114 — 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.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×7
  • Duplicated block (12–13 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:287 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:287-299 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:315-326 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:287` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:314` calls `padding` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateCreationSheet.kt:286` 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–13 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:121 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:121-133 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt:111-122 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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–13 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:140 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:140-151 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:281-293 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:140` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:102 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:102-113 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:136-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/utils/OnnxConversion.kt:102` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:99 — feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:99-110 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:310-322 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:99` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12–13 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/ModelTypeSelector.kt:98 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/ModelTypeSelector.kt:98-110 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OcrEngineModeSelector.kt:96-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/ModelTypeSelector.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.
  • Duplicated block (12–13 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/KotlinPaletteCoder.kt:81 — lib/palette/src/main/java/com/t8rin/palette/coders/KotlinPaletteCoder.kt:81-93 | lib/palette/src/main/java/com/t8rin/palette/coders/SwiftPaletteCoder.kt:65-76 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/KotlinPaletteCoder.kt:81` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 lines × 2) · ×6
  • Duplicated block (30 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:212 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:212-241 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:329-358 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:212` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:315 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:315-344 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:313-342 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:315` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:84 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:84-113 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:85-114 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:122 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:122-151 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRailForFavorites.kt:200-229 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:122` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:497 — lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:497-526 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:557-586 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:497` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (30 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:33 — lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:33-62 | lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:33-62 — before extracting anything, compare `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt` and `lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt` as WHOLE FILES: this scan already matched 3 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 `lib/palette/src/main/java/com/t8rin/palette/coders/VGA18BitPaletteCoder.kt:33` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28 lines × 2) · ×6
  • Duplicated block (28 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:389 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:389-416 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:375-402 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:214 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:214-241 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:326-353 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:214` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:121 — feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:121-148 | feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:169-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/audio-cover-extractor/src/main/java/com/t8rin/imagetoolbox/feature/audio_cover_extractor/ui/screenLogic/AudioCoverExtractorComponent.kt:121` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1005 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1005-1032 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1082-1109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:1005` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt:67 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt:67-94 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ToolsHiddenForShareSettingItem.kt:66-93 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ToolsHiddenForShareSettingItem.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (28 lines × 2) lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:223 — lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:223-250 | lib/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt:223-250 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt` and `lib/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `Canvas` names `androidx.compose.foundation.Canvas` in one and `androidx.compose.ui.graphics.Canvas` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×6
  • Duplicated block (27 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:222 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:222-248 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:547-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 `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:222` it does not close everything it opens, so those exact lines 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) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:89 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:89-115 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:78-104 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:89` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (27 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:320 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:320-346 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:354-380 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:353 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:353-379 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:387-413 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (27 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:521 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:521-547 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:508-534 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:521` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (27 lines × 2) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:244 — feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:244-270 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:354-380 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:244` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×6
  • Duplicated block (19 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:140 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:140-158 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:184-202 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:264-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:140` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:72 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:72-90 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/dark_mode/components/PdfDarkModePreview.kt:61-79 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/components/RemoveAnnotationsPreview.kt:53-71 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/components/RemoveAnnotationsPreview.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:72` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 3) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:169 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:169-187 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:181-199 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:141-159 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ResizeAndConvertComponent` in one and `SingleEditComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (19 lines × 3) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt:106 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt:106-124 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenameSuffixSettingItem.kt:99-117 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/MainScreenTitleSettingItem.kt:103-121 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenameSuffixSettingItem.kt` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt:106` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (19 lines × 3) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:120 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:120-138 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:129-147 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SwitchTypeSettingItem.kt:134-152 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Shape = ShapeDefaults.center` in one and `Shape = ShapeDefaults.top` 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 × 3) lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:100 — lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:100-118 | lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:132-150 | lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:158-176 — 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 `lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×6
  • Duplicated block (8 lines × 3) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:130 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:130-137 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:185-192 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:239-246 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:130` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 3) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:184 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:184-191 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:238-245 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:275-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:184` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 3) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:105 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:105-112 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:123-130 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:141-148 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229 — lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229-236 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:452-459 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:555-562 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 125 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:319 — lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:319-326 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:380-387 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:466-473 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:319` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:329 — lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:329-336 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:1009-1016 | lib/zoomable/src/main/java/net/engawapg/lib/zoomable/Zoomable.kt:201-209 — 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 `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:1009` it begins part-way through the construct above it, so those 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 (5 members, 50+ identical tokens) · ×5
  • Members sharing a duplicated core (5 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:97 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:97-261 | feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/components/FractalParamsSelection.kt:85-337 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt:89-288 | feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/components/NoiseParamsSelection.kt:56-275 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:80-395 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:56 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:56-161 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:56-197 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackingParamsSelector.kt:44-83 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/AnimatedJxlParamsSelector.kt:51-154 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.kt:51-135 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:142 — feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:142-783 | feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:99-512 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:101-478 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:118-531 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersTopAppBarActions.kt:50-119 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:45 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:45-74 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:57-148 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/RectParamsSelector.kt:54-125 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:59-169 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/TriangleParamsSelector.kt:45-74 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CacheAutoClearIntervalSettingItem.kt:62 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CacheAutoClearIntervalSettingItem.kt:62-142 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:61-138 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ShapeTypeSettingItem.kt:68-171 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:67-147 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SwitchTypeSettingItem.kt:72-152 — 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 · Duplicated block (33 lines × 2) · ×5
  • Duplicated block (33 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:100 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:100-132 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:241-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (33 lines × 2) feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:148 — feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:148-180 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:124-156 — before extracting anything, compare `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt` and `feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 137 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (33 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:65 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt:65-97 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.kt:64-96 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/utils/DrawRepeatedPath.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawRepeatedPath.kt` as WHOLE FILES: 98% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (33 lines × 2) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:71 — feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:71-103 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/components/WallpapersActionButtons.kt:74-106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (33 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:130 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:130-162 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:127-159 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `type` to `Screen.ApngTools.Type` in one and `Screen.WebpTools.Type` 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 (22 lines × 2) · ×5
  • Duplicated block (22 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:93 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:93-114 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:88-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:93` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:146 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:146-167 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:128-149 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (22 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:305 — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:305-326 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:377-398 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 262 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:305` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:335 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:335-356 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:311-332 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (22 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:118 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:118-139 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SwitchTypeSettingItem.kt:123-144 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SwitchTypeSettingItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 72 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:118` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `onValueChange` to `(SliderType) -> Unit` in one and `(SwitchType) -> Unit` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×5
  • Duplicated block (19–20 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:210 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:210-228 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:298-317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/AndroidImageScaler.kt:210` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–20 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:209 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:209-228 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:201-219 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:209` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19–20 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:98 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:98-116 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.kt:160-179 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageSelector.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.
  • Duplicated block (19–20 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:131 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:131-149 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:134-153 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:131` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:154` calls `roundToPx` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:150` 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 (19–20 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:65 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:65-84 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRail.kt:125-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×5
  • Duplicated block (16–17 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:60 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:60-75 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:63-79 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:60` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–17 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/PresetSelector.kt:279 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/PresetSelector.kt:279-294 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/presentation/components/SvgParamsSelector.kt:98-114 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/PresetSelector.kt:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16–17 lines × 2) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/screenLogic/ArchiveToolsComponent.kt:497 — feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/screenLogic/ArchiveToolsComponent.kt:497-512 | feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/screenLogic/ArchiveToolsComponent.kt:534-550 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/screenLogic/ArchiveToolsComponent.kt:497` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (16–17 lines × 2) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:175 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:175-191 | feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/presentation/SvgMakerContent.kt:113-128 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `SvgMakerComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16–17 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FullscreenDebugMenu.kt:107 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FullscreenDebugMenu.kt:107-122 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:179-195 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FullscreenDebugMenu.kt:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×5
  • Duplicated block (11–12 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/confetti/Particles.kt:142 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/confetti/Particles.kt:142-152 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/confetti/Particles.kt:153-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/confetti/Particles.kt:142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:199 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:199-210 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:274-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:199` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:123 — feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:123-133 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt:44-55 — before extracting anything, compare `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11–12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871-881 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:579-590 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11–12 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:737 — lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:737-748 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:347-357 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt` as WHOLE FILES: this scan already matched 18 separate duplicated blocks between them, totalling at least 173 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:737` it does not close everything it opens, so those 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 × 2) · ×5
  • Duplicated block (8–9 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:225 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:225-232 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt:196-204 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:225` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:299 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:299-307 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt:289-296 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:299` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:111 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:111-118 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt:110-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8–9 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/RootPdfToolsContent.kt:149 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/RootPdfToolsContent.kt:149-156 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/RootPdfToolsContent.kt:198-206 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/root/RootPdfToolsContent.kt:149` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8–9 lines × 2) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:100 — lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:100-108 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:208-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 5) · ×5
  • Duplicated block (8 lines × 5) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:683 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:683-690 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:139-146 | feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/PaletteToolsContent.kt:211-218 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeTextNoDataControls.kt:178-185 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:677-684 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:683` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216-223 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:311-318 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:815-822 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:447-454 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:545-552 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478-485 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:840-847 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:928-935 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:703-711 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:362-369 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483-490 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:577-584 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:540-548 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:708-716 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:367-374 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:74 — lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:74-81 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:137-144 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:161-168 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:196-203 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:224-231 — 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 (5 lines × 3) · ×5
  • Duplicated block (5 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:52 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:52-56 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:46-50 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:45-49 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 42 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:58` calls `remember`, `mutableStateOf`, `toColor` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:52` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:243 — lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:243-247 | lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:285-289 | lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:224-228 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/PaletteColor.kt:243` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:154 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:154-158 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/FluentSwitch.kt:203-207 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/PixelSwitch.kt:168-172 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.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 × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:165 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:165-169 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/FluentSwitch.kt:214-218 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/PixelSwitch.kt:179-183 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.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 (5 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:176 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:176-180 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/FluentSwitch.kt:225-229 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/PixelSwitch.kt:190-194 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/ComposeSwitch.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D36 · Supply-chain Provenance & Signing · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (31 lines × 2) · ×4
  • Duplicated block (31 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:243 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:243-273 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:367-397 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:243` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:190 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:190-220 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:269-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:106 — feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:106-136 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/screenLogic/TextureGenerationComponent.kt:123-153 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/screenLogic/TextureGenerationComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/screenLogic/NoiseGenerationComponent.kt:106` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (31 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:75 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:75-105 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/components/RemoveAnnotationsPreview.kt:56-86 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/components/RemoveAnnotationsPreview.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:75` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×4
  • Duplicated block (25 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:74 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:74-98 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:78-102 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:248 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:248-272 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:282-306 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 86 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:248` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/CompressPdfToolContent.kt:50 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/CompressPdfToolContent.kt:50-74 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/flatten/FlattenPdfToolContent.kt:50-74 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/CompressPdfToolContent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/flatten/FlattenPdfToolContent.kt` as WHOLE FILES: 88% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/CompressPdfToolContent.kt:50` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CompressPdfToolComponent` in one and `FlattenPdfToolComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (25 lines × 2) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:347 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:347-371 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:381-405 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17 lines × 3) · ×4
  • Duplicated block (17 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ColorRowSelector.kt:141 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ColorRowSelector.kt:141-157 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:195-211 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:212-228 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ColorRowSelector.kt:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:701 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:701-717 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:279-295 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:695-711 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:168 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:168-184 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:182-198 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:211-227 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `DeleteExifComponent` in one and `LimitsResizeComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (17 lines × 3) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:307 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:307-323 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:300-316 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:372-388 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 52 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:307` it begins part-way through the construct above it, so those 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 × 3) · ×4
  • Duplicated block (13–14 lines × 3) feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:210 — feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:210-223 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:189-201 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:165-177 — before extracting anything, compare `feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt` and `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:210` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13–14 lines × 3) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:190 — feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:190-202 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:230-243 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:373-386 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/screenLogic/ImageStitchingComponent.kt:190` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–14 lines × 3) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:456 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:456-468 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:562-575 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:669-682 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/LayersRenderer.kt:456` it does not close everything it opens, so those exact lines 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 × 3) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483-495 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:540-553 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:367-379 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483` it begins part-way through the construct above it, so those 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 × 3) · ×4
  • Duplicated block (10 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:393 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:393-402 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:479-488 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:397-406 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:393` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10 lines × 3) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197-206 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:213-222 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:272-281 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/tool/PixelationCommands.kt:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:590 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:590-599 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:625-634 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:709-718 — 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 `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:590` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:659 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:659-668 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1205-1214 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1407-1416 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 20 separate duplicated blocks between them, totalling at least 191 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:659` it begins part-way through the construct above it, so those 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 × 3) · ×4
  • Duplicated block (9 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:558 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:558-566 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:889-897 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:559-567 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 3) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/CompareContent.kt:175 — feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/CompareContent.kt:175-183 | feature/image-preview/src/main/java/com/t8rin/imagetoolbox/feature/image_preview/presentation/ImagePreviewContent.kt:385-393 | feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/PickColorFromImageContent.kt:202-210 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (9 lines × 3) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:414 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:414-422 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:476-484 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:538-546 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ShapeLayerParamsSelector.kt:414` it does not close everything it opens, so those exact lines 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) lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:39 — lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:39-47 | lib/palette/src/main/java/com/t8rin/palette/coders/SKPPaletteCoder.kt:40-48 | lib/palette/src/main/java/com/t8rin/palette/coders/SkencilPaletteCoder.kt:44-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.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.
D5 · Coupling · Unstable project ImageToolbox · ×4
  • Unstable project ImageToolbox:core:ui — ImageToolbox:core:ui has instability 0.83 with 3 dependents.
  • Unstable project ImageToolbox:feature:recognize-text — ImageToolbox:feature:recognize-text has instability 0.83 with 1 dependents.
  • Unstable project ImageToolbox:feature:root — ImageToolbox:feature:root has instability 0.99 with 1 dependents.
  • Unstable project ImageToolbox:feature:single-edit — ImageToolbox:feature:single-edit has instability 0.82 with 2 dependents.
D17 · Explicit Debt · TodoComment · ×3
  • TodoComment core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/AnimateContentSizeNoClip.kt:216 — // TODO(b/322878517): Figure out a way to seamlessly continue the animation after — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:318 — // //TODO Change pan when zoom is bigger than 1f and touchRegion is inside overlay rect — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment lib/palette/src/main/java/com/t8rin/palette/Palette.kt:247 — // TODO: Implement OkLab interpolation — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (6 members, 50+ identical tokens) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:111 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:111-399 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:119-524 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:109-254 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:91-298 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelector.kt:69-202 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelector.kt:72-215 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:127 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:127-489 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:341-492 | feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:80-278 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImage.kt:77-244 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:124-469 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:97-436 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
  • Members sharing a duplicated core (6 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:87 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:87-169 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:185-282 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:54-119 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:134-200 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:55-119 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:134-202 — 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 · Duplicated block (26 lines × 2) · ×3
  • Duplicated block (26 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:293 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:293-318 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:341-366 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:293` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:86 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:86-111 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRailForFavorites.kt:162-187 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBarForFavorites.kt:86` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt:111 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt:111-136 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenameSuffixSettingItem.kt:104-129 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenameSuffixSettingItem.kt` as WHOLE FILES: 83% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FilenamePrefixSettingItem.kt:111` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 (24 lines × 2) · ×3
  • Duplicated block (24 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:129 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:129-152 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:139-162 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:129` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (24 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:693 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:693-716 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:687-710 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:693` 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) lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:242 — lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:242-265 | lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:471-494 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/curves/src/main/java/com/t8rin/curves/GPUImageColorCurvesFilter.kt:242` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×3
  • Duplicated block (21–22 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:162 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:162-183 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:167-187 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 167 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:162` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (21–22 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:119 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:119-139 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:126-147 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (21–22 lines × 2) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:213 — feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:213-233 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:348-369 — before extracting anything, compare `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt` and `feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:213` 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 (20 lines × 4) · ×3
  • Duplicated block (20 lines × 4) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:125 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:125-144 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:196-215 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:58-77 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:139-158 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:295 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:295-314 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:68-87 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsTopAppBarActions.kt:77-96 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:291-310 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.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 (20 lines × 4) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:136 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:136-155 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:139-158 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:127-146 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:147-166 — before extracting anything, compare `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `FormatConversionComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×3
  • Duplicated block (18–19 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskItem.kt:182 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskItem.kt:182-199 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskItem.kt:137-155 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/MaskItem.kt:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–19 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/LauncherScreenSelector.kt:191 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/LauncherScreenSelector.kt:191-208 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:272-290 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/LauncherScreenSelector.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. 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 (18–19 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:619 — lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:619-636 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:702-720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.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.
D4 · Code Duplication · Duplicated block (18 lines × 3) · ×3
  • Duplicated block (18 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:86 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:86-103 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:87-104 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:106-123 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt: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.
  • Duplicated block (18 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:359 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:359-376 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:406-424 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:213-231 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/resize_group/ResizeTypeSelector.kt:359` 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) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:327 — lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:327-344 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:408-425 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:480-497 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17 lines × 4) · ×3
  • Duplicated block (17 lines × 4) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:142 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:142-158 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:107-123 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:106-122 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:95-111 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:142` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 4) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:107 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:107-126 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:113-132 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:106-122 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:126-142 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:107` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:104` calls `mutableStateOf`, `isPortraitOrientationAsState` and `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:107` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 4) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:75 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:75-91 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:118-134 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:117-133 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:106-122 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:75` it begins part-way through the construct above it, so those 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 × 3) · ×3
  • Duplicated block (13 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:47 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:47-59 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:126-138 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:191-203 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/LoadingDialog.kt:47` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:135 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:135-147 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:134-146 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:151-163 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:135` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:132` calls `animateFloatAsState`, `coerceAtLeast` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:149` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:789 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:789-801 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:943-955 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:503-515 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt` as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 140 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:789` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×3
  • Duplicated block (11 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:208 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:208-218 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:224-234 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:183-193 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (11 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:302 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:302-312 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:205-215 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:162-172 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:926 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:926-936 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:960-970 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1161-1171 — 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 `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:926` it does not close everything it opens, so those 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) · ×3
  • Duplicated block (10–11 lines × 2) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:100 — feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:100-110 | feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:159-168 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/screenLogic/Base64ToolsComponent.kt:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10–11 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:196 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:196-206 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:263-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:196` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (10–11 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:209 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:209-219 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:275-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 `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:209` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×3
  • Duplicated block (9–10 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/DrawUtils.kt:34 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/DrawUtils.kt:34-42 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/AndroidFilterMaskApplier.kt:178-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 `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/DrawUtils.kt:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–10 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:171 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:171-180 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:240-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:171` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9–10 lines × 2) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:184 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:184-193 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:252-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:184` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (8–9 lines × 4) · ×3
  • Duplicated block (8–9 lines × 4) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:479 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:479-486 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:841-848 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:704-712 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:363-370 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:479` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 4) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:482 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:482-489 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:783-790 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:707-715 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:366-373 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:482` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:480` calls `listOf` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8–9 lines × 4) lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:83 — lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:83-90 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:146-153 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:176-184 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:205-212 — 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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×3
  • Duplicated block (7 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483-489 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:784-790 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:540-547 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:708-715 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:367-373 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:483` it begins part-way through the construct above it, so those 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, `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:480` calls `listOf` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871-877 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:519-526 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:579-586 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:832-838 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:478-484 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:871` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:88 — lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:88-94 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:151-157 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:182-188 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:210-216 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:238-244 — 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 `lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (6 lines × 3) · ×3
  • Duplicated block (6 lines × 3) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsBitmapPreview.kt:51 — feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsBitmapPreview.kt:51-56 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsButtons.kt:55-60 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsControls.kt:81-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsBitmapPreview.kt:51` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:815 — feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:815-823 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/screenLogic/PhotomosaicComponent.kt:344-349 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:488-496 — before extracting anything, compare `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:825 — feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:825-833 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/screenLogic/PhotomosaicComponent.kt:351-356 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:498-506 — before extracting anything, compare `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
X3 · Exception handling · Swallowed exception (empty catch) · ×3
  • Swallowed exception (empty catch) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:212 — 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) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:224 — 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) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:235 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D15 · Churn × Complexity Hotspots · Repeated repair · ×2
  • Repeated repair: feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt:105 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.kt changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is StyleTransferProcessor.process at line 105), 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: “Fixed style transfer models maximum resolution by #3160”; “Fixed style transfer models in AI tools by #3144”; “Fixed AI tools processing cancellation by #3076”. 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-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/StyleTransferProcessor.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/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/SavingFolder.kt core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/SavingFolder.kt:53 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/SavingFolder.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 10 (its worst body is SavingFolder.getInstance at line 53), 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: “Fixed saving images to their original folders when processing folders with subfolders”; “Regress: Fixed saving to original folder by #3042”; “Fixed saving to the original folder and overwriting files”. 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-07-15..2026-10-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-15 12:00:00 +03:00' --until='2026-10-13 12:00:00 +03:00' --full-history --no-merges -- core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/SavingFolder.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.
D2 · Cognitive Complexity · PointData.generateInterpolatedOffsets (cognitive 25) · ×2
  • PointData.generateInterpolatedOffsets (cognitive 25) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/data/AndroidGradientMaker.kt:245 — PointData.generateInterpolatedOffsets has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (13 pts), match/switch 2 (7 pts), if/else 3 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • PointData.generateInterpolatedOffsets (cognitive 25) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MeshGradient.kt:211 — PointData.generateInterpolatedOffsets has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (13 pts), match/switch 2 (7 pts), if/else 3 (5 pts) (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ShapeLayerRendererKt.drawShapeLayer (cognitive 16) · ×2
  • ShapeLayerRendererKt.drawShapeLayer (cognitive 16) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:182 — ShapeLayerRendererKt.drawShapeLayer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 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. This shape REPEATS in the file: one other method here (ShapeLayerRendererKt.drawShapeLayer) 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.
  • ShapeLayerRendererKt.drawShapeLayer (cognitive 16) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:232 — ShapeLayerRendererKt.drawShapeLayer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (15 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. This shape REPEATS in the file: one other method here (ShapeLayerRendererKt.drawShapeLayer) 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 · Near-duplicate member family (7 members, 16 shared lines) · ×2
  • Near-duplicate member family (7 members, 16 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 — These 7 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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.
  • Near-duplicate member family (7 members, 16 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:381-423 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 7 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (7 members, 14 shared lines) · ×2
  • Near-duplicate member family (7 members, 14 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 — These 7 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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.
  • Near-duplicate member family (7 members, 14 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:425-467 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:530-567 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 7 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member pair (70 shared lines) · ×2
  • Near-duplicate member pair (70 shared lines) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:77 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:77-335 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:95-398 — These two members are variants of one another: 70 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
  • Near-duplicate member pair (70 shared lines) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:94 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:94-177 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:237-321 — These two members are variants of one another: 70 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (11 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (11 members, 50+ identical tokens) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:46 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:46-92 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatFileModelPairItem.kt:57-121 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatImageModelPairItem.kt:44-82 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:42-78 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:41-87 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberMirrorSidePairItem.kt:42-78 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:42-78 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:55-149 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:49-129 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:53-142 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:45-95 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
  • Members sharing a duplicated core (11 members, 50+ identical tokens) lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:364 — lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:364-374 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:536-547 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:585-598 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:618-631 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:665-676 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:696-709 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:771-784 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:848-861 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:923-934 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1000-1013 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1079-1092 — These 11 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 11 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 11 times.
D4 · Code Duplication · Duplicated block (56 lines × 2) · ×2
  • Duplicated block (56 lines × 2) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt:110 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt:110-165 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ToolsHiddenForShareSettingItem.kt:109-164 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ToolsHiddenForShareSettingItem.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/BrightnessEnforcementSettingItem.kt:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (56 lines × 2) lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:100 — lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:100-155 | lib/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt:100-155 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt` and `lib/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (45 lines × 2) · ×2
  • Duplicated block (45 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:128 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:128-172 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:127-171 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.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 (45 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:82 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:82-126 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:88-132 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:82` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×2
  • Duplicated block (39 lines × 2) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:111 — feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:111-149 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt:115-153 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:111` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (39 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:182 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:182-220 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:197-235 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:182` 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 (32 lines × 2) · ×2
  • Duplicated block (32 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:151 — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:151-182 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:171-202 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 262 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:151` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `LimitsResizeComponent` in one and `WeightResizeComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (32 lines × 2) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:508 — lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:508-539 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:684-715 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:508` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (28–29 lines × 2) · ×2
  • Duplicated block (28–29 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:193 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.kt:193-221 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheet.kt:169-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/SeamCarvingMaskSheet.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 (28–29 lines × 2) feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpListContent.kt:146 — feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpListContent.kt:146-173 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/TutorialCategoryContent.kt:61-89 — before extracting anything, compare `feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpListContent.kt` and `feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/TutorialCategoryContent.kt` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpListContent.kt:146` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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–27 lines × 2) · ×2
  • Duplicated block (26–27 lines × 2) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:175 — feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:175-200 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:196-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:196` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (26–27 lines × 2) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:454 — feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:454-479 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:486-512 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:454` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. 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 (25–26 lines × 2) · ×2
  • Duplicated block (25–26 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:153 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:153-177 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:296-321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/CupertinoSwitch.kt:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (25–26 lines × 2) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:296 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:296-320 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:321-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:296` 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 (21 lines × 3) · ×2
  • Duplicated block (21 lines × 3) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:136 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:136-156 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:208-228 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:245-265 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:136` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (21 lines × 3) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:167 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:167-187 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:179-199 | feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:154-174 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:167` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (18–20 lines × 2) · ×2
  • Duplicated block (18–20 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:319 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:319-336 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt:318-337 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:319` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18–20 lines × 2) feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:208 — feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:208-227 | feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:278-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pick-color/src/main/java/com/t8rin/imagetoolbox/feature/pick_color/presentation/components/PickColorFromImageTopAppBar.kt:208` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 4) · ×2
  • Duplicated block (19 lines × 4) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:203 — feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:203-221 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:263-281 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:272-290 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersTopAppBarActions.kt:56-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 4) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:90 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:90-108 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:96-114 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:84-102 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:104-122 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:104` calls `mutableStateOf` and `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:110` 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 lines × 5) · ×2
  • Duplicated block (18 lines × 5) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:258 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:258-275 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:239-256 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:206-223 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:356-373 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:321-338 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:258` it begins part-way through the construct above it, so those exact lines 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 × 5) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:259 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:259-276 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:272-289 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:376-393 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:292-309 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:348-365 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:259` it begins part-way through the construct above it, so those 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 × 3) · ×2
  • Duplicated block (17–18 lines × 3) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:238 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:238-254 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:355-372 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:212-229 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:238` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 × 3) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1360 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1360-1377 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1425-1441 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1463-1480 — 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 `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1360` it begins part-way through the construct above it, so those 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, `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1379` calls `curveButton` and `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1442` 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 (17 lines × 13) · ×2
  • Duplicated block (17 lines × 13) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:370 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:370-386 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:331-347 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:316-332 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:269-285 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:378-394 | feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:337-353 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:315-331 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:220-236 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:378-394 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:337-353 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelectorSheetContent.kt:150-166 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:638-654 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureSearchSheet.kt:267-283 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:370` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:389` calls `weight` and `feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:356` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (17 lines × 13) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:376 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:376-392 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:337-353 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:322-338 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:275-291 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:384-400 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:624-640 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:321-337 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:226-242 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:384-400 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:343-359 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelectorSheetContent.kt:156-172 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:644-660 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureSearchSheet.kt:273-289 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:376` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:318` calls `Spacer`, `weight` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:621` 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–17 lines × 2) · ×2
  • Duplicated block (14–17 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:209 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:209-225 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSearchAndFilter.kt:146-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. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:209` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–17 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:701 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:701-717 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:741-754 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:701` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 5) · ×2
  • Duplicated block (16 lines × 5) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:274 — feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:274-289 | feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:205-220 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:265-280 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:274-289 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersTopAppBarActions.kt:58-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times.
  • Duplicated block (16 lines × 5) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:727 — feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:727-742 | feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:261-276 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:242-257 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:209-224 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:359-374 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:727` it does not close everything it opens, so those 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–16 lines × 2) · ×2
  • Duplicated block (12–16 lines × 2) feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/components/FractalParamsSelection.kt:105 — feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/components/FractalParamsSelection.kt:105-116 | feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/components/NoiseParamsSelection.kt:59-74 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/components/FractalParamsSelection.kt:105` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note 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–16 lines × 2) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/DropShadowSection.kt:93 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/DropShadowSection.kt:93-108 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/MarkupLayerTextDefaultsSettingItem.kt:342-353 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/DropShadowSection.kt:93` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×2
  • Duplicated block (15 lines × 4) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:160 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:160-174 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:125-139 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:124-138 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:113-127 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:160` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 4) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:113 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:113-127 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:149-163 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:132-146 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:140-154 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` and `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageCutterComponent` in one and `ImageStackingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:130` calls `toLong` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:111` 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 (14–15 lines × 3) · ×2
  • Duplicated block (14–15 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:687 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:687-700 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:143-157 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:681-694 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:687` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:65 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:65-79 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:84-98 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:102-115 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:65` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:65` calls `onFilterChange` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/ColorModelTripleItem.kt:102` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14–15 lines × 2) · ×2
  • Duplicated block (14–15 lines × 2) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:740 — feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:740-754 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/screenLogic/MarkupLayersComponent.kt:780-793 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:740` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14–15 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:288 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:288-301 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:679-693 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:288` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 × 2) · ×2
  • Duplicated block (13–14 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt:439 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt:439-452 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt:480-492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13–14 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentNoData.kt:96 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentNoData.kt:96-109 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:667-679 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentNoData.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:664` calls `Column` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentNoData.kt:95` 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 (12–14 lines × 2) · ×2
  • Duplicated block (12–14 lines × 2) feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/screenLogic/PaletteToolsComponent.kt:167 — feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/screenLogic/PaletteToolsComponent.kt:167-180 | feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/screenLogic/PaletteToolsComponent.kt:225-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/screenLogic/PaletteToolsComponent.kt:167` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12–14 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:233 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:233-244 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:342-355 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×2
  • Duplicated block (13 lines × 5) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:263 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:263-275 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:490-502 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:199-211 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelector.kt:167-179 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelector.kt:174-186 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:263` it begins part-way through the construct above it, so those exact lines 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 × 5) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:52 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:52-64 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:69-81 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/RectParamsSelector.kt:66-78 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:71-83 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/TriangleParamsSelector.kt:52-64 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:84` calls `padding` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/OvalParamsSelector.kt:67` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:139 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:139-149 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:147-157 | feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:134-144 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:150-160 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:152-162 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:139` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:756 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:756-766 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:856-866 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:292-302 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:478-488 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:463-473 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10 lines × 6) · ×2
  • Duplicated block (10 lines × 6) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:42 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:42-51 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:54-63 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:66-75 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:78-87 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:90-99 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:102-111 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 6) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:53 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:53-62 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:64-73 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:75-84 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:86-95 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:97-106 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:108-117 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×2
  • Duplicated block (10 lines × 5) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:84 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:84-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:85-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:94-103 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:104-113 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:114-123 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:249 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:249-258 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:674-683 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:35-44 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:96-105 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:526-535 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:249` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×2
  • Duplicated block (9–10 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:169 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:169-177 | feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:185-194 | feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:208-216 | feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:235-244 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–10 lines × 4) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166-174 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:876-884 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:584-593 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:357-365 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161-169 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:835-843 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:923-931 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:352-360 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 368 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 4) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:193 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:193-201 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:917-925 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:944-952 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:995-1003 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (8 lines × 7) · ×2
  • Duplicated block (8 lines × 7) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171-178 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:881-888 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:934-941 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:989-996 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:224-231 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:445-452 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:119-126 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 7) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176-183 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:226-233 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:820-827 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:939-946 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:994-1001 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:406-413 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:450-457 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 6) · ×2
  • Duplicated block (8 lines × 6) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1378 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1378-1385 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1391-1398 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1404-1411 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1445-1452 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1457-1464 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1469-1476 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 6) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt:557 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/screenLogic/AiToolsComponent.kt:557-564 | feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:622-629 | feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/screenLogic/LoadNetImageComponent.kt:161-168 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:671-678 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/screenLogic/WallpapersExportComponent.kt:167-174 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:637-644 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×2
  • Duplicated block (7–8 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:180 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/data/AndroidApngConverter.kt:180-187 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/data/AndroidJxlConverter.kt:191-197 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/data/AndroidWebpConverter.kt:161-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7–8 lines × 3) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:234 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:234-241 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:247-253 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:258-265 — 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 `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:234` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 12) · ×2
  • Duplicated block (7 lines × 12) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161-167 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211-217 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:306-312 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:463-469 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:687-694 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:919-925 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:974-980 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:209-215 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:307-313 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:352-358 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166-172 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:539-545 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 12) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1366 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1366-1372 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1434-1440 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:910-916 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:769-775 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:816-822 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:863-869 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:910-916 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1464-1470 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1614-1620 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1738-1744 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1818-1824 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:98-105 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 10) · ×2
  • Duplicated block (7 lines × 10) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176-182 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:226-232 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:886-892 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:939-945 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:994-1000 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:229-235 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:406-412 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:450-456 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:555-561 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:503-509 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 10) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473-479 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:572-578 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:698-704 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:929-935 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:984-990 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:219-225 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:440-446 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:114-120 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:176-182 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:488-494 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:473` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 7) · ×2
  • Duplicated block (7 lines × 7) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/screenLogic/CurvesComponent.kt:427 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/screenLogic/CurvesComponent.kt:427-433 | feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:291-299 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:494-502 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:340-348 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:463-471 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:651-659 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:539-547 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 × 7) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/screenLogic/CurvesComponent.kt:435 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/screenLogic/CurvesComponent.kt:435-441 | feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt:301-309 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:504-512 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:350-358 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:473-481 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:661-669 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:549-557 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/screenLogic/DeleteExifComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D1 · Cyclomatic Complexity · SettingItemKt.SettingItem (cyclomatic 154) · ×1
  • SettingItemKt.SettingItem (cyclomatic 154) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SettingItem.kt:55 — SettingItemKt.SettingItem has cyclomatic complexity 154 (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 · BitmapDrawerKt.BitmapDrawer (cyclomatic 95) · ×1
  • BitmapDrawerKt.BitmapDrawer (cyclomatic 95) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:113 — BitmapDrawerKt.BitmapDrawer has cyclomatic complexity 95 (threshold 15). To reduce it, separate the cases: extract each independent 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 · SettingsContentKt.SettingsContent (cyclomatic 67) · ×1
  • SettingsContentKt.SettingsContent (cyclomatic 67) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:138 — SettingsContentKt.SettingsContent has cyclomatic complexity 67 (threshold 15). To reduce it, separate the cases: extract each independent 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 · HandleDeeplinksKt.handleDeeplinks (cyclomatic 53) · ×1
  • HandleDeeplinksKt.handleDeeplinks (cyclomatic 53) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/HandleDeeplinks.kt:39 — HandleDeeplinksKt.handleDeeplinks 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 · QualitySelectorKt.QualitySelector (cyclomatic 52) · ×1
  • QualitySelectorKt.QualitySelector (cyclomatic 52) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:91 — QualitySelectorKt.QualitySelector 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 · MarkupLayersContextActionsKt.MarkupLayersContextActions (cyclomatic 46) · ×1
  • MarkupLayersContextActionsKt.MarkupLayersContextActions (cyclomatic 46) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersContextActions.kt:82 — MarkupLayersContextActionsKt.MarkupLayersContextActions has cyclomatic complexity 46 (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 · BottomButtonsBlockKt.BottomButtonsBlock (cyclomatic 46) · ×1
  • BottomButtonsBlockKt.BottomButtonsBlock (cyclomatic 46) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:86 — BottomButtonsBlockKt.BottomButtonsBlock 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 · ApngToolsContentKt.ApngToolsContent (cyclomatic 44) · ×1
  • ApngToolsContentKt.ApngToolsContent (cyclomatic 44) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:105 — ApngToolsContentKt.ApngToolsContent has cyclomatic complexity 44 (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 · AFPaletteCoder.decode (cyclomatic 43) · ×1
  • AFPaletteCoder.decode (cyclomatic 43) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:38 — AFPaletteCoder.decode has cyclomatic complexity 43 (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 · WebpToolsContentKt.WebpToolsContent (cyclomatic 43) · ×1
  • WebpToolsContentKt.WebpToolsContent (cyclomatic 43) feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:106 — WebpToolsContentKt.WebpToolsContent has cyclomatic complexity 43 (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 · CPLPaletteCoder.decode (cyclomatic 41) · ×1
  • CPLPaletteCoder.decode (cyclomatic 41) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:64 — CPLPaletteCoder.decode 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 · ScreenPreferenceSelectionKt.ScreenPreferenceSelection (cyclomatic 41) · ×1
  • ScreenPreferenceSelectionKt.ScreenPreferenceSelection (cyclomatic 41) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:101 — ScreenPreferenceSelectionKt.ScreenPreferenceSelection 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 · AdaptiveLayoutScreenKt.AdaptiveLayoutScreen (cyclomatic 41) · ×1
  • AdaptiveLayoutScreenKt.AdaptiveLayoutScreen (cyclomatic 41) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveLayoutScreen.kt:95 — AdaptiveLayoutScreenKt.AdaptiveLayoutScreen 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 · FreeCornersCropperKt.FreeCornersCropper (cyclomatic 40) · ×1
  • FreeCornersCropperKt.FreeCornersCropper (cyclomatic 40) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:91 — FreeCornersCropperKt.FreeCornersCropper 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 · FaceClusterer.cluster (cyclomatic 40) · ×1
  • FaceClusterer.cluster (cyclomatic 40) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt:73 — FaceClusterer.cluster 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 · AssistantKnowledge.retrieve (cyclomatic 40) · ×1
  • AssistantKnowledge.retrieve (cyclomatic 40) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt:68 — AssistantKnowledge.retrieve 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 · MediaSemanticSearchControlsKt.MediaSemanticSearchControls (cyclomatic 38) · ×1
  • MediaSemanticSearchControlsKt.MediaSemanticSearchControls (cyclomatic 38) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt:78 — MediaSemanticSearchControlsKt.MediaSemanticSearchControls 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 · FractalPreviewKt.FractalPreview (cyclomatic 37) · ×1
  • FractalPreviewKt.FractalPreview (cyclomatic 37) feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/components/FractalPreview.kt:73 — FractalPreviewKt.FractalPreview has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ScreenListKt.screensFor (cyclomatic 36) · ×1
  • ScreenListKt.screensFor (cyclomatic 36) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt:32 — ScreenListKt.screensFor 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.
D1 · Cyclomatic Complexity · DrawEditOptionKt.DrawEditOption (cyclomatic 35) · ×1
  • DrawEditOptionKt.DrawEditOption (cyclomatic 35) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:116 — DrawEditOptionKt.DrawEditOption has cyclomatic complexity 35 (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 · MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays (cyclomatic 35) · ×1
  • MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays (cyclomatic 35) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:109 — MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · AndroidImageDrawApplier.applyDrawToImage (cyclomatic 34) · ×1
  • AndroidImageDrawApplier.applyDrawToImage (cyclomatic 34) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:92 — AndroidImageDrawApplier.applyDrawToImage has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaPickerGridKt.MediaPickerGrid (cyclomatic 33) · ×1
  • MediaPickerGridKt.MediaPickerGrid (cyclomatic 33) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGrid.kt:63 — MediaPickerGridKt.MediaPickerGrid 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 · AspectRatioSelectorKt.AspectRatioSelector (cyclomatic 33) · ×1
  • AspectRatioSelectorKt.AspectRatioSelector (cyclomatic 33) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt:97 — AspectRatioSelectorKt.AspectRatioSelector 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 · QrTypeUtilsKt.toIntent (cyclomatic 32) · ×1
  • QrTypeUtilsKt.toIntent (cyclomatic 32) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:86 — QrTypeUtilsKt.toIntent 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 · PaletteToolsContentKt.PaletteToolsContent (cyclomatic 32) · ×1
  • PaletteToolsContentKt.PaletteToolsContent (cyclomatic 32) feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/PaletteToolsContent.kt:87 — PaletteToolsContentKt.PaletteToolsContent 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 · GifToolsContentKt.GifToolsContent (cyclomatic 32) · ×1
  • GifToolsContentKt.GifToolsContent (cyclomatic 32) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:60 — GifToolsContentKt.GifToolsContent 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 · AiToolsContentKt.AiToolsContent (cyclomatic 32) · ×1
  • AiToolsContentKt.AiToolsContent (cyclomatic 32) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/AiToolsContent.kt:79 — AiToolsContentKt.AiToolsContent 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 · AndroidFilenameCreator.constructImageFilename (cyclomatic 32) · ×1
  • AndroidFilenameCreator.constructImageFilename (cyclomatic 32) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFilenameCreator.kt:110 — AndroidFilenameCreator.constructImageFilename 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 · AndroidImageCombiner.combineImages (cyclomatic 31) · ×1
  • AndroidImageCombiner.combineImages (cyclomatic 31) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/AndroidImageCombiner.kt:78 — AndroidImageCombiner.combineImages 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.
D1 · Cyclomatic Complexity · AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen (cyclomatic 31) · ×1
  • AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen (cyclomatic 31) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:97 — AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen 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.
D1 · Cyclomatic Complexity · AndroidFileController.saveImpl (cyclomatic 31) · ×1
  • AndroidFileController.saveImpl (cyclomatic 31) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:152 — AndroidFileController.saveImpl 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.
D1 · Cyclomatic Complexity · FullscreenEditOptionKt.FullscreenEditOption (cyclomatic 30) · ×1
  • FullscreenEditOptionKt.FullscreenEditOption (cyclomatic 30) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:108 — FullscreenEditOptionKt.FullscreenEditOption 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 · MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor (cyclomatic 30) · ×1
  • MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor (cyclomatic 30) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt:204 — MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JxlToolsContentKt.JxlToolsContent (cyclomatic 30) · ×1
  • JxlToolsContentKt.JxlToolsContent (cyclomatic 30) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:54 — JxlToolsContentKt.JxlToolsContent has cyclomatic complexity 30 (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 · DrawContentKt.DrawContent (cyclomatic 30) · ×1
  • DrawContentKt.DrawContent (cyclomatic 30) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:99 — DrawContentKt.DrawContent has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AndroidFileController.moveImpl (cyclomatic 30) · ×1
  • AndroidFileController.moveImpl (cyclomatic 30) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:473 — AndroidFileController.moveImpl 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 · ColorSelectionRowKt.ColorSelectionRow (cyclomatic 28) · ×1
  • ColorSelectionRowKt.ColorSelectionRow (cyclomatic 28) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:75 — ColorSelectionRowKt.ColorSelectionRow has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FilterTemplateManagerKt.FilterTemplateManager (cyclomatic 28) · ×1
  • FilterTemplateManagerKt.FilterTemplateManager (cyclomatic 28) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateManager.kt:101 — FilterTemplateManagerKt.FilterTemplateManager has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · QRCode.calculateMaskPenalty (cyclomatic 26) · ×1
  • QRCode.calculateMaskPenalty (cyclomatic 26) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:131 — QRCode.calculateMaskPenalty 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 · CorelXMLHandler.startElement (cyclomatic 26) · ×1
  • CorelXMLHandler.startElement (cyclomatic 26) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:55 — CorelXMLHandler.startElement 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 · DynamicCropState.updateOverlayRect (cyclomatic 26) · ×1
  • DynamicCropState.updateOverlayRect (cyclomatic 26) lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:395 — DynamicCropState.updateOverlayRect has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FrameImageView.snapToBorders (cyclomatic 26) · ×1
  • FrameImageView.snapToBorders (cyclomatic 26) lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:538 — FrameImageView.snapToBorders has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · TextureParamsSelectionKt.TextureParamsSelection (cyclomatic 26) · ×1
  • TextureParamsSelectionKt.TextureParamsSelection (cyclomatic 26) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:74 — TextureParamsSelectionKt.TextureParamsSelection 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 · CodabarEncoder.encode (cyclomatic 25) · ×1
  • CodabarEncoder.encode (cyclomatic 25) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/CodabarEncoder.kt:5 — CodabarEncoder.encode 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 · MinimalEncoder.encode (cyclomatic 25) · ×1
  • MinimalEncoder.encode (cyclomatic 25) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:59 — MinimalEncoder.encode 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 · SwatchbookerXMLHandler.endElement (cyclomatic 25) · ×1
  • SwatchbookerXMLHandler.endElement (cyclomatic 25) lib/palette/src/main/java/com/t8rin/palette/coders/SwatchbookerCoder.kt:98 — SwatchbookerXMLHandler.endElement has cyclomatic complexity 25 (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 · MarkupLayersSideMenuColumnKt.MarkupLayersSideMenuColumn (cyclomatic 25) · ×1
  • MarkupLayersSideMenuColumnKt.MarkupLayersSideMenuColumn (cyclomatic 25) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersSideMenuColumn.kt:90 — MarkupLayersSideMenuColumnKt.MarkupLayersSideMenuColumn 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 · EnhancedModalBottomSheetKt.EnhancedModalSheetImpl (cyclomatic 25) · ×1
  • EnhancedModalBottomSheetKt.EnhancedModalSheetImpl (cyclomatic 25) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:198 — EnhancedModalBottomSheetKt.EnhancedModalSheetImpl 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 · PictureKt.CoilPicture (cyclomatic 25) · ×1
  • PictureKt.CoilPicture (cyclomatic 25) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:179 — PictureKt.CoilPicture 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 · FilenamePatternEditSheetKt.FilenamePatternEditSheet (cyclomatic 25) · ×1
  • FilenamePatternEditSheetKt.FilenamePatternEditSheet (cyclomatic 25) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/FilenamePatternEditSheet.kt:77 — FilenamePatternEditSheetKt.FilenamePatternEditSheet 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 · ImageCurvesEditorKt.ImageCurvesEditor (cyclomatic 24) · ×1
  • ImageCurvesEditorKt.ImageCurvesEditor (cyclomatic 24) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:169 — ImageCurvesEditorKt.ImageCurvesEditor 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 · SpotHealParamsSelectorKt.SpotHealParamsSelector (cyclomatic 24) · ×1
  • SpotHealParamsSelectorKt.SpotHealParamsSelector (cyclomatic 24) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/SpotHealParamsSelector.kt:88 — SpotHealParamsSelectorKt.SpotHealParamsSelector 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.
D1 · Cyclomatic Complexity · WavyShape.createOutline (cyclomatic 24) · ×1
  • WavyShape.createOutline (cyclomatic 24) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/WavyShape.kt:111 — WavyShape.createOutline 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.
D1 · Cyclomatic Complexity · Code128Encoder.chooseCode (cyclomatic 23) · ×1
  • Code128Encoder.chooseCode (cyclomatic 23) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:465 — Code128Encoder.chooseCode 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 · GeometryUtils.shrinkPathCollage_3_3 (cyclomatic 23) · ×1
  • GeometryUtils.shrinkPathCollage_3_3 (cyclomatic 23) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:133 — GeometryUtils.shrinkPathCollage_3_3 has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ActiveLayerGestureModifierKt.activeLayerGestures (cyclomatic 23) · ×1
  • ActiveLayerGestureModifierKt.activeLayerGestures (cyclomatic 23) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ActiveLayerGestureModifier.kt:42 — ActiveLayerGestureModifierKt.activeLayerGestures 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 · EditBoxKt.EditBox (cyclomatic 23) · ×1
  • EditBoxKt.EditBox (cyclomatic 23) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditBox.kt:101 — EditBoxKt.EditBox 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.
D1 · Cyclomatic Complexity · EditLayerSheetKt.EditLayerSheet (cyclomatic 23) · ×1
  • EditLayerSheetKt.EditLayerSheet (cyclomatic 23) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:107 — EditLayerSheetKt.EditLayerSheet 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 · PathHelper.drawPath (cyclomatic 23) · ×1
  • PathHelper.drawPath (cyclomatic 23) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:399 — PathHelper.drawPath 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.
D1 · Cyclomatic Complexity · CropContentKt.CropContent (cyclomatic 23) · ×1
  • CropContentKt.CropContent (cyclomatic 23) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:97 — CropContentKt.CropContent 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.
D1 · Cyclomatic Complexity · TopAppBarTitleKt.TopAppBarTitle (cyclomatic 23) · ×1
  • TopAppBarTitleKt.TopAppBarTitle (cyclomatic 23) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/TopAppBarTitle.kt:41 — TopAppBarTitleKt.TopAppBarTitle has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FilterItemKt.FilterItem (cyclomatic 23) · ×1
  • FilterItemKt.FilterItem (cyclomatic 23) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:91 — FilterItemKt.FilterItem 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.
D1 · Cyclomatic Complexity · Moire.applyMask (cyclomatic 22) · ×1
  • Moire.applyMask (cyclomatic 22) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:179 — Moire.applyMask has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhotoFilterCurvesControl.onDraw (cyclomatic 22) · ×1
  • PhotoFilterCurvesControl.onDraw (cyclomatic 22) lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:679 — PhotoFilterCurvesControl.onDraw 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 · SettingsOpenButtonKt.SettingsOpenButton (cyclomatic 22) · ×1
  • SettingsOpenButtonKt.SettingsOpenButton (cyclomatic 22) feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/SettingsOpenButton.kt:85 — SettingsOpenButtonKt.SettingsOpenButton 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 · MediaPeopleOverviewKt.PeopleGroupSettings (cyclomatic 22) · ×1
  • MediaPeopleOverviewKt.PeopleGroupSettings (cyclomatic 22) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt:342 — MediaPeopleOverviewKt.PeopleGroupSettings 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 · MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable (cyclomatic 22) · ×1
  • MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable (cyclomatic 22) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt:83 — MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable 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 · LayerKt.Layer (cyclomatic 22) · ×1
  • LayerKt.Layer (cyclomatic 22) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/Layer.kt:45 — LayerKt.Layer 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 · MainContentImplKt.MainContentImpl (cyclomatic 22) · ×1
  • MainContentImplKt.MainContentImpl (cyclomatic 22) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainContentImpl.kt:63 — MainContentImplKt.MainContentImpl has cyclomatic complexity 22 (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 · CompareScreenContentImplKt.CompareScreenContentImpl (cyclomatic 22) · ×1
  • CompareScreenContentImplKt.CompareScreenContentImpl (cyclomatic 22) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:71 — CompareScreenContentImplKt.CompareScreenContentImpl has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImageFormatSelectorKt.ImageFormatSelector (cyclomatic 22) · ×1
  • ImageFormatSelectorKt.ImageFormatSelector (cyclomatic 22) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageFormatSelector.kt:76 — ImageFormatSelectorKt.ImageFormatSelector 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 · EnhancedSliderItemKt.EnhancedSliderItem (cyclomatic 22) · ×1
  • EnhancedSliderItemKt.EnhancedSliderItem (cyclomatic 22) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:79 — EnhancedSliderItemKt.EnhancedSliderItem 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 · AutodeskXMLHandler.endElement (cyclomatic 21) · ×1
  • AutodeskXMLHandler.endElement (cyclomatic 21) lib/palette/src/main/java/com/t8rin/palette/coders/AutodeskColorBookCoder.kt:73 — AutodeskXMLHandler.endElement 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 · RecognizeTextContentKt.RecognizeTextContent (cyclomatic 21) · ×1
  • RecognizeTextContentKt.RecognizeTextContent (cyclomatic 21) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/RecognizeTextContent.kt:74 — RecognizeTextContentKt.RecognizeTextContent 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 · JxlToolsControlsKt.JxlToolsControls (cyclomatic 21) · ×1
  • JxlToolsControlsKt.JxlToolsControls (cyclomatic 21) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsControls.kt:42 — JxlToolsControlsKt.JxlToolsControls has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · FiltersContentKt.FiltersMainContent (cyclomatic 21) · ×1
  • FiltersContentKt.FiltersMainContent (cyclomatic 21) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:117 — FiltersContentKt.FiltersMainContent 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 · AssistantContentKt.AssistantComposer (cyclomatic 21) · ×1
  • AssistantContentKt.AssistantComposer (cyclomatic 21) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:312 — AssistantContentKt.AssistantComposer 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 · EmojiSelectionSheetKt.EmojiSelectionSheet (cyclomatic 21) · ×1
  • EmojiSelectionSheetKt.EmojiSelectionSheet (cyclomatic 21) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/EmojiSelectionSheet.kt:101 — EmojiSelectionSheetKt.EmojiSelectionSheet 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 · FreeCornersCropperKt.detectOneFingerZoomGestures (cyclomatic 20) · ×1
  • FreeCornersCropperKt.detectOneFingerZoomGestures (cyclomatic 20) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:920 — FreeCornersCropperKt.detectOneFingerZoomGestures 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 · DynamicThemeKt.getColorScheme (cyclomatic 20) · ×1
  • DynamicThemeKt.getColorScheme (cyclomatic 20) lib/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:655 — DynamicThemeKt.getColorScheme 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 · MarkupLayersContentKt.MarkupLayersContent (cyclomatic 20) · ×1
  • MarkupLayersContentKt.MarkupLayersContent (cyclomatic 20) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/MarkupLayersContent.kt:121 — MarkupLayersContentKt.MarkupLayersContent 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 · CollageMakerContentKt.CollageMakerContent (cyclomatic 20) · ×1
  • CollageMakerContentKt.CollageMakerContent (cyclomatic 20) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:140 — CollageMakerContentKt.CollageMakerContent 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 · AssistantContentKt.AssistantContent (cyclomatic 20) · ×1
  • AssistantContentKt.AssistantContent (cyclomatic 20) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:126 — AssistantContentKt.AssistantContent 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 · ArchiveFilesPreviewKt.ArchiveFilesPreview (cyclomatic 20) · ×1
  • ArchiveFilesPreviewKt.ArchiveFilesPreview (cyclomatic 20) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchiveFilesPreview.kt:48 — ArchiveFilesPreviewKt.ArchiveFilesPreview 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 · RoundedTextFieldKt.RoundedTextField (cyclomatic 20) · ×1
  • RoundedTextFieldKt.RoundedTextField (cyclomatic 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:157 — RoundedTextFieldKt.RoundedTextField 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 · ZoomableKt.detectTransformGestures (cyclomatic 19) · ×1
  • ZoomableKt.detectTransformGestures (cyclomatic 19) lib/zoomable/src/main/java/net/engawapg/lib/zoomable/Zoomable.kt:66 — ZoomableKt.detectTransformGestures has cyclomatic complexity 19 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · TransformGestureKt.detectPointerTransformGestures (cyclomatic 19) · ×1
  • TransformGestureKt.detectPointerTransformGestures (cyclomatic 19) lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:203 — TransformGestureKt.detectPointerTransformGestures has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PhotoFilterCurvesControl.onTouchEvent (cyclomatic 19) · ×1
  • PhotoFilterCurvesControl.onTouchEvent (cyclomatic 19) lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:421 — PhotoFilterCurvesControl.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 · CropModifierKt.detectOneFingerZoomGestures (cyclomatic 19) · ×1
  • CropModifierKt.detectOneFingerZoomGestures (cyclomatic 19) lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:233 — CropModifierKt.detectOneFingerZoomGestures 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 · GeometryUtils.shrinkPath (cyclomatic 19) · ×1
  • GeometryUtils.shrinkPath (cyclomatic 19) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:207 — GeometryUtils.shrinkPath has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiTouchHandler.touch (cyclomatic 19) · ×1
  • MultiTouchHandler.touch (cyclomatic 19) lib/collages/src/main/java/com/t8rin/collages/view/MultiTouchHandler.kt:80 — MultiTouchHandler.touch has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GradientStrokeCache.render (cyclomatic 19) · ×1
  • GradientStrokeCache.render (cyclomatic 19) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.kt:295 — GradientStrokeCache.render has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · AssistantKnowledge.grounding (cyclomatic 19) · ×1
  • AssistantKnowledge.grounding (cyclomatic 19) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt:373 — AssistantKnowledge.grounding 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.
D1 · Cyclomatic Complexity · AssistantModelSheetKt.AssistantModelItem (cyclomatic 19) · ×1
  • AssistantModelSheetKt.AssistantModelItem (cyclomatic 19) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantModelSheet.kt:196 — AssistantModelSheetKt.AssistantModelItem has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ImageExportProfileSelectorKt.ImageExportProfileSelector (cyclomatic 19) · ×1
  • ImageExportProfileSelectorKt.ImageExportProfileSelector (cyclomatic 19) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportProfileSelector.kt:94 — ImageExportProfileSelectorKt.ImageExportProfileSelector 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.
D1 · Cyclomatic Complexity · EnhancedIconButtonKt.EnhancedIconButton (cyclomatic 19) · ×1
  • EnhancedIconButtonKt.EnhancedIconButton (cyclomatic 19) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedIconButton.kt:59 — EnhancedIconButtonKt.EnhancedIconButton 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.
D1 · Cyclomatic Complexity · EnhancedRangeSliderItemKt.EnhancedRangeSliderItem (cyclomatic 19) · ×1
  • EnhancedRangeSliderItemKt.EnhancedRangeSliderItem (cyclomatic 19) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:81 — EnhancedRangeSliderItemKt.EnhancedRangeSliderItem has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DragHandlerKt.dragHandler (cyclomatic 19) · ×1
  • DragHandlerKt.dragHandler (cyclomatic 19) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/DragHandler.kt:62 — DragHandlerKt.dragHandler has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PairItemKt.PairItem (cyclomatic 19) · ×1
  • PairItemKt.PairItem (cyclomatic 19) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PairItem.kt:40 — PairItemKt.PairItem has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Code39Encoder.tryToConvertToExtendedMode (cyclomatic 18) · ×1
  • Code39Encoder.tryToConvertToExtendedMode (cyclomatic 18) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:73 — Code39Encoder.tryToConvertToExtendedMode 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 · Code93Encoder.tryToConvertToExtendedMode (cyclomatic 18) · ×1
  • Code93Encoder.tryToConvertToExtendedMode (cyclomatic 18) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt:54 — Code93Encoder.tryToConvertToExtendedMode 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 · DynamicCropState.getTouchRegion (cyclomatic 18) · ×1
  • DynamicCropState.getTouchRegion (cyclomatic 18) lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:752 — DynamicCropState.getTouchRegion has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ArchiveEngine.encryptionStatus (cyclomatic 18) · ×1
  • ArchiveEngine.encryptionStatus (cyclomatic 18) lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:359 — ArchiveEngine.encryptionStatus 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: ArchiveEngine.configureWriter (cyclomatic 39) 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 · PatternParamsKt.PatternParams (cyclomatic 18) · ×1
  • PatternParamsKt.PatternParams (cyclomatic 18) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/PatternParams.kt:30 — PatternParamsKt.PatternParams 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 · SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview (cyclomatic 18) · ×1
  • SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview (cyclomatic 18) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/SemanticSearchCategoryContent.kt:117 — SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview 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 · BitmapEraserKt.BitmapEraser (cyclomatic 18) · ×1
  • BitmapEraserKt.BitmapEraser (cyclomatic 18) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/BitmapEraser.kt:84 — BitmapEraserKt.BitmapEraser 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 · DrawCommittedPathKt.drawCommittedPath (cyclomatic 18) · ×1
  • DrawCommittedPathKt.drawCommittedPath (cyclomatic 18) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawCommittedPath.kt:52 — DrawCommittedPathKt.drawCommittedPath 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 · DeleteExifContentKt.DeleteExifContent (cyclomatic 18) · ×1
  • DeleteExifContentKt.DeleteExifContent (cyclomatic 18) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:75 — DeleteExifContentKt.DeleteExifContent 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 · BeforeAfterLayoutImplKt.BeforeAfterSplitLayout (cyclomatic 18) · ×1
  • BeforeAfterLayoutImplKt.BeforeAfterSplitLayout (cyclomatic 18) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayoutImpl.kt:89 — BeforeAfterLayoutImplKt.BeforeAfterSplitLayout 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 · ArchiveToolsContentKt.ArchiveToolsContent (cyclomatic 18) · ×1
  • ArchiveToolsContentKt.ArchiveToolsContent (cyclomatic 18) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/ArchiveToolsContent.kt:61 — ArchiveToolsContentKt.ArchiveToolsContent 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 · OptimizationStyleTransferProcessor.strongWolfe (cyclomatic 18) · ×1
  • OptimizationStyleTransferProcessor.strongWolfe (cyclomatic 18) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:388 — OptimizationStyleTransferProcessor.strongWolfe 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 · SubcomposePictureKt.CoilSubcomposePicture (cyclomatic 18) · ×1
  • SubcomposePictureKt.CoilSubcomposePicture (cyclomatic 18) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt:180 — SubcomposePictureKt.CoilSubcomposePicture 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 · HyperOSSwitchKt.HyperOSSwitch (cyclomatic 18) · ×1
  • HyperOSSwitchKt.HyperOSSwitch (cyclomatic 18) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/HyperOSSwitch.kt:72 — HyperOSSwitchKt.HyperOSSwitch has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ScreenListKt.withSelectedUris (cyclomatic 18) · ×1
  • ScreenListKt.withSelectedUris (cyclomatic 18) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt:414 — ScreenListKt.withSelectedUris has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Code128Encoder.encodeFast (cyclomatic 17) · ×1
  • Code128Encoder.encodeFast (cyclomatic 17) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:334 — Code128Encoder.encodeFast 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 · RoundCornersShape.path (cyclomatic 17) · ×1
  • RoundCornersShape.path (cyclomatic 17) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/options/QrShapeModifiers.kt:59 — RoundCornersShape.path has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ACBPaletteCoder.decode (cyclomatic 17) · ×1
  • ACBPaletteCoder.decode (cyclomatic 17) lib/palette/src/main/java/com/t8rin/palette/coders/ACBPaletteCoder.kt:35 — ACBPaletteCoder.decode has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · JCWPaletteCoder.decode (cyclomatic 17) · ×1
  • JCWPaletteCoder.decode (cyclomatic 17) lib/palette/src/main/java/com/t8rin/palette/coders/JCWPaletteCoder.kt:41 — JCWPaletteCoder.decode has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · KotlinPaletteCoder.encode (cyclomatic 17) · ×1
  • KotlinPaletteCoder.encode (cyclomatic 17) lib/palette/src/main/java/com/t8rin/palette/coders/KotlinPaletteCoder.kt:138 — KotlinPaletteCoder.encode 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 · HexUtilsKt.extractHexRGBA (cyclomatic 17) · ×1
  • HexUtilsKt.extractHexRGBA (cyclomatic 17) lib/palette/src/main/java/com/t8rin/palette/utils/HexUtils.kt:32 — HexUtilsKt.extractHexRGBA 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 · FreeCornersCropperKt.detectCropDragGestures (cyclomatic 17) · ×1
  • FreeCornersCropperKt.detectCropDragGestures (cyclomatic 17) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:828 — FreeCornersCropperKt.detectCropDragGestures 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 · SeamCarver.findLowestEnergyVerticalSeamAvoidingMask (cyclomatic 17) · ×1
  • SeamCarver.findLowestEnergyVerticalSeamAvoidingMask (cyclomatic 17) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:450 — SeamCarver.findLowestEnergyVerticalSeamAvoidingMask has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SeamCarver.findForwardVerticalSeamInternal (cyclomatic 17) · ×1
  • SeamCarver.findForwardVerticalSeamInternal (cyclomatic 17) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:595 — SeamCarver.findForwardVerticalSeamInternal has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeometryUtils.createPathWithCircleCorner (cyclomatic 17) · ×1
  • GeometryUtils.createPathWithCircleCorner (cyclomatic 17) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:366 — GeometryUtils.createPathWithCircleCorner has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ImageTracer.colorquantization (cyclomatic 17) · ×1
  • ImageTracer.colorquantization (cyclomatic 17) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:333 — ImageTracer.colorquantization 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 · ImageTracer.blur (cyclomatic 17) · ×1
  • ImageTracer.blur (cyclomatic 17) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1019 — ImageTracer.blur has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · QrTypeUtilsKt.createRaw (cyclomatic 17) · ×1
  • QrTypeUtilsKt.createRaw (cyclomatic 17) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:272 — QrTypeUtilsKt.createRaw has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LibrariesContainerKt.LibrariesScaffold (cyclomatic 17) · ×1
  • LibrariesContainerKt.LibrariesScaffold (cyclomatic 17) feature/libraries-info/src/main/java/com/t8rin/imagetoolbox/feature/libraries_info/presentation/components/LibrariesContainer.kt:301 — LibrariesContainerKt.LibrariesScaffold has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · JxlToolsBitmapPreviewKt.JxlToolsBitmapPreview (cyclomatic 17) · ×1
  • JxlToolsBitmapPreviewKt.JxlToolsBitmapPreview (cyclomatic 17) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsBitmapPreview.kt:42 — JxlToolsBitmapPreviewKt.JxlToolsBitmapPreview 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 · EraseBackgroundContentKt.EraseBackgroundContent (cyclomatic 17) · ×1
  • EraseBackgroundContentKt.EraseBackgroundContent (cyclomatic 17) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:116 — EraseBackgroundContentKt.EraseBackgroundContent 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 · DuplicateFinderContentKt.DuplicateFinderContent (cyclomatic 17) · ×1
  • DuplicateFinderContentKt.DuplicateFinderContent (cyclomatic 17) feature/duplicate-finder/src/main/java/com/t8rin/imagetoolbox/feature/duplicate_finder/presentation/DuplicateFinderContent.kt:71 — DuplicateFinderContentKt.DuplicateFinderContent 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 · DrawContentControlsKt.DrawContentControls (cyclomatic 17) · ×1
  • DrawContentControlsKt.DrawContentControls (cyclomatic 17) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:77 — DrawContentControlsKt.DrawContentControls 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 · ImageNotPickedWidgetKt.ClickableActionIcon (cyclomatic 17) · ×1
  • ImageNotPickedWidgetKt.ClickableActionIcon (cyclomatic 17) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImageNotPickedWidget.kt:191 — ImageNotPickedWidgetKt.ClickableActionIcon has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ImageStickyHeaderKt.imageStickyHeader (cyclomatic 17) · ×1
  • ImageStickyHeaderKt.imageStickyHeader (cyclomatic 17) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImageStickyHeader.kt:85 — ImageStickyHeaderKt.imageStickyHeader 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 · TripleItemKt.TripleItem (cyclomatic 17) · ×1
  • TripleItemKt.TripleItem (cyclomatic 17) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/TripleItem.kt:39 — TripleItemKt.TripleItem has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · MinimalEncoder.encode (cyclomatic 16) · ×1
  • MinimalEncoder.encode (cyclomatic 16) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:182 — MinimalEncoder.encode 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 · ACOPaletteCoder.decode (cyclomatic 16) · ×1
  • ACOPaletteCoder.decode (cyclomatic 16) lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:44 — ACOPaletteCoder.decode 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 · ModalSheetLayoutKt.ModalSheetLayout (cyclomatic 16) · ×1
  • ModalSheetLayoutKt.ModalSheetLayout (cyclomatic 16) lib/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheetLayout.kt:320 — ModalSheetLayoutKt.ModalSheetLayout 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 · PhotoFilterCurvesControl.moveActivePoint (cyclomatic 16) · ×1
  • PhotoFilterCurvesControl.moveActivePoint (cyclomatic 16) lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:572 — PhotoFilterCurvesControl.moveActivePoint 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 · ParamsManager.updateParams (cyclomatic 16) · ×1
  • ParamsManager.updateParams (cyclomatic 16) lib/collages/src/main/java/com/t8rin/collages/utils/ParamsManager.kt:59 — ParamsManager.updateParams has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MediaPickerHavePermissionsKt.MediaPickerHavePermissions (cyclomatic 16) · ×1
  • MediaPickerHavePermissionsKt.MediaPickerHavePermissions (cyclomatic 16) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerHavePermissions.kt:82 — MediaPickerHavePermissionsKt.MediaPickerHavePermissions 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 · JxlToolsComponent.setType (cyclomatic 16) · ×1
  • JxlToolsComponent.setType (cyclomatic 16) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:134 — JxlToolsComponent.setType 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 · FiltersContentControlsKt.FiltersContentControls (cyclomatic 16) · ×1
  • FiltersContentControlsKt.FiltersContentControls (cyclomatic 16) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:76 — FiltersContentControlsKt.FiltersContentControls 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 · AssistantContentKt.AssistantConversation (cyclomatic 16) · ×1
  • AssistantContentKt.AssistantConversation (cyclomatic 16) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:487 — AssistantContentKt.AssistantConversation has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ArchiveToolsControlsKt.ArchiveToolsControls (cyclomatic 16) · ×1
  • ArchiveToolsControlsKt.ArchiveToolsControls (cyclomatic 16) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchiveToolsControls.kt:72 — ArchiveToolsControlsKt.ArchiveToolsControls 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 · DataSelectorKt.DataSelector (cyclomatic 16) · ×1
  • DataSelectorKt.DataSelector (cyclomatic 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/DataSelector.kt:74 — DataSelectorKt.DataSelector 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 · OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog (cyclomatic 16) · ×1
  • OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog (cyclomatic 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:111 — OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog 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 · ValueDialogKt.ValueDialog (cyclomatic 16) · ×1
  • ValueDialogKt.ValueDialog (cyclomatic 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/value/ValueDialog.kt:71 — ValueDialogKt.ValueDialog 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 · TemplateFilter.equals (cyclomatic 16) · ×1
  • TemplateFilter.equals (cyclomatic 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/TemplateFilter.kt:32 — TemplateFilter.equals has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AsciiParamsItemKt.AsciiParamsItem (cyclomatic 16) · ×1
  • AsciiParamsItemKt.AsciiParamsItem (cyclomatic 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/AsciiParamsItem.kt:75 — AsciiParamsItemKt.AsciiParamsItem has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeifDecoder.decode (cyclomatic 16) · ×1
  • HeifDecoder.decode (cyclomatic 16) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt:49 — HeifDecoder.decode 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 · OriginalFileDeletionHelper.deleteFile (cyclomatic 16) · ×1
  • OriginalFileDeletionHelper.deleteFile (cyclomatic 16) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/OriginalFileDeletionHelper.kt:175 — OriginalFileDeletionHelper.deleteFile 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.
D2 · Cognitive Complexity · BitmapDrawerKt.BitmapDrawer (cognitive 128) · ×1
  • BitmapDrawerKt.BitmapDrawer (cognitive 128) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:113 — BitmapDrawerKt.BitmapDrawer has cognitive complexity 128 (threshold 15). Drivers by points: if/else 56 (79 pts), boolean chains 49 (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 · SettingsContentKt.SettingsContent (cognitive 126) · ×1
  • SettingsContentKt.SettingsContent (cognitive 126) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:138 — SettingsContentKt.SettingsContent has cognitive complexity 126 (threshold 15). Drivers by points: if/else 77 (107 pts), boolean chains 17, match/switch 2 (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 · BottomButtonsBlockKt.BottomButtonsBlock (cognitive 102) · ×1
  • BottomButtonsBlockKt.BottomButtonsBlock (cognitive 102) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:86 — BottomButtonsBlockKt.BottomButtonsBlock has cognitive complexity 102 (threshold 15). Drivers by points: if/else 59 (95 pts), boolean chains 7 (nesting depth added 36). To reduce it, split the body into named stages: move each independent 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 · HandleDeeplinksKt.handleDeeplinks (cognitive 98) · ×1
  • HandleDeeplinksKt.handleDeeplinks (cognitive 98) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/HandleDeeplinks.kt:39 — HandleDeeplinksKt.handleDeeplinks has cognitive complexity 98 (threshold 15). Drivers by points: if/else 29 (65 pts), match/switch 8 (27 pts), boolean chains 6 (nesting depth added 55). To reduce it, split the body into named stages: move each independent 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 · AndroidImageCombiner.combineImages (cognitive 75) · ×1
  • AndroidImageCombiner.combineImages (cognitive 75) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/AndroidImageCombiner.kt:78 — AndroidImageCombiner.combineImages has cognitive complexity 75 (threshold 15). Drivers by points: if/else 29 (53 pts), match/switch 7 (19 pts), boolean chains 2, loops 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent 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 · AFPaletteCoder.decode (cognitive 73) · ×1
  • AFPaletteCoder.decode (cognitive 73) lib/palette/src/main/java/com/t8rin/palette/coders/AFPaletteCoder.kt:38 — AFPaletteCoder.decode has cognitive complexity 73 (threshold 15). Drivers by points: error handling 23 (42 pts), if/else 13 (25 pts), loops 2 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 33). To reduce it, split the body into named stages: move each independent 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 · ScreenPreferenceSelectionKt.ScreenPreferenceSelection (cognitive 71) · ×1
  • ScreenPreferenceSelectionKt.ScreenPreferenceSelection (cognitive 71) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:101 — ScreenPreferenceSelectionKt.ScreenPreferenceSelection has cognitive complexity 71 (threshold 15). Drivers by points: if/else 37 (52 pts), boolean chains 14, match/switch 3 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CPLPaletteCoder.decode (cognitive 69) · ×1
  • CPLPaletteCoder.decode (cognitive 69) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:64 — CPLPaletteCoder.decode has cognitive complexity 69 (threshold 15). Drivers by points: if/else 23 (44 pts), error handling 4 (15 pts), match/switch 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidImageDrawApplier.applyDrawToImage (cognitive 68) · ×1
  • AndroidImageDrawApplier.applyDrawToImage (cognitive 68) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:92 — AndroidImageDrawApplier.applyDrawToImage has cognitive complexity 68 (threshold 15). Drivers by points: if/else 33 (57 pts), boolean chains 10, match/switch 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AdaptiveLayoutScreenKt.AdaptiveLayoutScreen (cognitive 68) · ×1
  • AdaptiveLayoutScreenKt.AdaptiveLayoutScreen (cognitive 68) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveLayoutScreen.kt:95 — AdaptiveLayoutScreenKt.AdaptiveLayoutScreen has cognitive complexity 68 (threshold 15). Drivers by points: if/else 33 (47 pts), boolean chains 19, loops 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidFileController.moveImpl (cognitive 60) · ×1
  • AndroidFileController.moveImpl (cognitive 60) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:473 — AndroidFileController.moveImpl has cognitive complexity 60 (threshold 15). Drivers by points: if/else 30 (50 pts), boolean chains 7, match/switch 1 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaPickerGridKt.MediaPickerGrid (cognitive 59) · ×1
  • MediaPickerGridKt.MediaPickerGrid (cognitive 59) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGrid.kt:63 — MediaPickerGridKt.MediaPickerGrid has cognitive complexity 59 (threshold 15). Drivers by points: if/else 35 (48 pts), boolean chains 10, 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 · GeometryUtils.createPathWithCircleCorner (cognitive 58) · ×1
  • GeometryUtils.createPathWithCircleCorner (cognitive 58) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:366 — GeometryUtils.createPathWithCircleCorner has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (52 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaSemanticSearchControlsKt.MediaSemanticSearchControls (cognitive 58) · ×1
  • MediaSemanticSearchControlsKt.MediaSemanticSearchControls (cognitive 58) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchControls.kt:78 — MediaSemanticSearchControlsKt.MediaSemanticSearchControls has cognitive complexity 58 (threshold 15). Drivers by points: if/else 24 (33 pts), boolean chains 18, match/switch 4 (7 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FractalPreviewKt.FractalPreview (cognitive 58) · ×1
  • FractalPreviewKt.FractalPreview (cognitive 58) feature/fractal-generation/src/main/java/com/t8rin/imagetoolbox/feature/fractal_generation/presentation/components/FractalPreview.kt:73 — FractalPreviewKt.FractalPreview has cognitive complexity 58 (threshold 15). Drivers by points: if/else 29 (45 pts), boolean chains 12, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidFileController.saveImpl (cognitive 58) · ×1
  • AndroidFileController.saveImpl (cognitive 58) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:152 — AndroidFileController.saveImpl has cognitive complexity 58 (threshold 15). Drivers by points: if/else 30 (49 pts), boolean chains 9 (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 · AndroidFilenameCreator.constructImageFilename (cognitive 57) · ×1
  • AndroidFilenameCreator.constructImageFilename (cognitive 57) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFilenameCreator.kt:110 — AndroidFilenameCreator.constructImageFilename has cognitive complexity 57 (threshold 15). Drivers by points: if/else 44 (48 pts), boolean chains 9 (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 · CorelXMLHandler.startElement (cognitive 56) · ×1
  • CorelXMLHandler.startElement (cognitive 56) lib/palette/src/main/java/com/t8rin/palette/coders/CorelXMLPaletteCoder.kt:55 — CorelXMLHandler.startElement has cognitive complexity 56 (threshold 15). Drivers by points: if/else 16 (33 pts), error handling 5 (20 pts), match/switch 2 (3 pts) (nesting depth added 33). 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 · FaceClusterer.cluster (cognitive 54) · ×1
  • FaceClusterer.cluster (cognitive 54) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/data/FaceClusterer.kt:73 — FaceClusterer.cluster has cognitive complexity 54 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 13, loops 4 (5 pts), match/switch 1 (3 pts) (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.
D2 · Cognitive Complexity · QRCode.calculateMaskPenalty (cognitive 53) · ×1
  • QRCode.calculateMaskPenalty (cognitive 53) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:131 — QRCode.calculateMaskPenalty has cognitive complexity 53 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 12 (18 pts), boolean chains 3 (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 · FreeCornersCropperKt.FreeCornersCropper (cognitive 52) · ×1
  • FreeCornersCropperKt.FreeCornersCropper (cognitive 52) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:91 — FreeCornersCropperKt.FreeCornersCropper has cognitive complexity 52 (threshold 15). Drivers by points: if/else 41 (43 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 · GeometryUtils.shrinkPathCollage_3_3 (cognitive 52) · ×1
  • GeometryUtils.shrinkPathCollage_3_3 (cognitive 52) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:133 — GeometryUtils.shrinkPathCollage_3_3 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 21 (43 pts), boolean chains 8, loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FullscreenEditOptionKt.FullscreenEditOption (cognitive 52) · ×1
  • FullscreenEditOptionKt.FullscreenEditOption (cognitive 52) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.kt:108 — FullscreenEditOptionKt.FullscreenEditOption has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (39 pts), boolean chains 13 (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 · ActiveLayerGestureModifierKt.activeLayerGestures (cognitive 52) · ×1
  • ActiveLayerGestureModifierKt.activeLayerGestures (cognitive 52) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/ActiveLayerGestureModifier.kt:42 — ActiveLayerGestureModifierKt.activeLayerGestures has cognitive complexity 52 (threshold 15). Drivers by points: if/else 23 (46 pts), boolean chains 5, loops 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.
D2 · Cognitive Complexity · AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen (cognitive 52) · ×1
  • AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen (cognitive 52) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:97 — AdaptiveBottomScaffoldLayoutScreenKt.AdaptiveBottomScaffoldLayoutScreen has cognitive complexity 52 (threshold 15). Drivers by points: if/else 28 (39 pts), boolean chains 12, 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 · AiToolsContentKt.AiToolsContent (cognitive 51) · ×1
  • AiToolsContentKt.AiToolsContent (cognitive 51) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/AiToolsContent.kt:79 — AiToolsContentKt.AiToolsContent has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28 (40 pts), boolean chains 8, match/switch 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FreeCornersCropperKt.detectOneFingerZoomGestures (cognitive 48) · ×1
  • FreeCornersCropperKt.detectOneFingerZoomGestures (cognitive 48) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:920 — FreeCornersCropperKt.detectOneFingerZoomGestures has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (40 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 29). 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 · CropModifierKt.detectOneFingerZoomGestures (cognitive 48) · ×1
  • CropModifierKt.detectOneFingerZoomGestures (cognitive 48) lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:233 — CropModifierKt.detectOneFingerZoomGestures has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (41 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 30). 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 · AssistantKnowledge.retrieve (cognitive 48) · ×1
  • AssistantKnowledge.retrieve (cognitive 48) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt:68 — AssistantKnowledge.retrieve has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 17, match/switch 3 (4 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ApngToolsContentKt.ApngToolsContent (cognitive 47) · ×1
  • ApngToolsContentKt.ApngToolsContent (cognitive 47) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:105 — ApngToolsContentKt.ApngToolsContent has cognitive complexity 47 (threshold 15). Drivers by points: if/else 35 (36 pts), boolean chains 6, match/switch 4 (5 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 · MinimalEncoder.encode (cognitive 46) · ×1
  • MinimalEncoder.encode (cognitive 46) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:59 — MinimalEncoder.encode has cognitive complexity 46 (threshold 15). Drivers by points: if/else 16 (33 pts), boolean chains 7, match/switch 2 (5 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DrawEditOptionKt.DrawEditOption (cognitive 46) · ×1
  • DrawEditOptionKt.DrawEditOption (cognitive 46) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:116 — DrawEditOptionKt.DrawEditOption has cognitive complexity 46 (threshold 15). Drivers by points: if/else 29, boolean chains 15, 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 · EnhancedSliderItemKt.EnhancedSliderItem (cognitive 46) · ×1
  • EnhancedSliderItemKt.EnhancedSliderItem (cognitive 46) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:79 — EnhancedSliderItemKt.EnhancedSliderItem has cognitive complexity 46 (threshold 15). Drivers by points: if/else 30 (42 pts), boolean chains 4 (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 · MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays (cognitive 45) · ×1
  • MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays (cognitive 45) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:109 — MediaPickerGridWithOverlaysKt.MediaPickerGridWithOverlays has cognitive complexity 45 (threshold 15). Drivers by points: boolean chains 22, if/else 17 (21 pts), match/switch 1 (2 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor (cognitive 45) · ×1
  • MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor (cognitive 45) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategoriesSheet.kt:204 — MediaSemanticSearchCategoriesSheetKt.SemanticSearchCategoryEditor has cognitive complexity 45 (threshold 15). Drivers by points: if/else 26 (33 pts), boolean chains 12 (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 · DrawContentKt.DrawContent (cognitive 45) · ×1
  • DrawContentKt.DrawContent (cognitive 45) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:99 — DrawContentKt.DrawContent has cognitive complexity 45 (threshold 15). Drivers by points: if/else 27 (31 pts), boolean chains 13, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ColorSelectionRowKt.ColorSelectionRow (cognitive 45) · ×1
  • ColorSelectionRowKt.ColorSelectionRow (cognitive 45) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorSelectionRow.kt:75 — ColorSelectionRowKt.ColorSelectionRow has cognitive complexity 45 (threshold 15). Drivers by points: if/else 33 (39 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · ImageCurvesEditorKt.ImageCurvesEditor (cognitive 44) · ×1
  • ImageCurvesEditorKt.ImageCurvesEditor (cognitive 44) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:169 — ImageCurvesEditorKt.ImageCurvesEditor has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (34 pts), boolean chains 6, match/switch 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WebpToolsContentKt.WebpToolsContent (cognitive 44) · ×1
  • WebpToolsContentKt.WebpToolsContent (cognitive 44) feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:106 — WebpToolsContentKt.WebpToolsContent has cognitive complexity 44 (threshold 15). Drivers by points: if/else 33, boolean chains 6, match/switch 4 (5 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 · ImageTracer.layering (cognitive 44) · ×1
  • ImageTracer.layering (cognitive 44) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:502 — ImageTracer.layering has cognitive complexity 44 (threshold 15). Drivers by points: if/else 19 (41 pts), loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DragHandlerKt.dragHandler (cognitive 44) · ×1
  • DragHandlerKt.dragHandler (cognitive 44) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/DragHandler.kt:62 — DragHandlerKt.dragHandler has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 1 (3 pts), match/switch 1 (3 pts), boolean chains 2 (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 · FilterTemplateManagerKt.FilterTemplateManager (cognitive 44) · ×1
  • FilterTemplateManagerKt.FilterTemplateManager (cognitive 44) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateManager.kt:101 — FilterTemplateManagerKt.FilterTemplateManager has cognitive complexity 44 (threshold 15). Drivers by points: if/else 30 (36 pts), boolean chains 6, match/switch 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ZoomableKt.detectTransformGestures (cognitive 43) · ×1
  • ZoomableKt.detectTransformGestures (cognitive 43) lib/zoomable/src/main/java/net/engawapg/lib/zoomable/Zoomable.kt:66 — ZoomableKt.detectTransformGestures has cognitive complexity 43 (threshold 15). Drivers by points: if/else 15 (39 pts), boolean chains 4 (nesting depth added 24). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · CodabarEncoder.encode (cognitive 43) · ×1
  • CodabarEncoder.encode (cognitive 43) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/CodabarEncoder.kt:5 — CodabarEncoder.encode has cognitive complexity 43 (threshold 15). Drivers by points: if/else 16 (30 pts), loops 4 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SettingsOpenButtonKt.SettingsOpenButton (cognitive 43) · ×1
  • SettingsOpenButtonKt.SettingsOpenButton (cognitive 43) feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/SettingsOpenButton.kt:85 — SettingsOpenButtonKt.SettingsOpenButton has cognitive complexity 43 (threshold 15). Drivers by points: if/else 36 (40 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Code128Encoder.encodeFast (cognitive 42) · ×1
  • Code128Encoder.encodeFast (cognitive 42) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:334 — Code128Encoder.encodeFast has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 3 (11 pts), loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TopAppBarTitleKt.TopAppBarTitle (cognitive 42) · ×1
  • TopAppBarTitleKt.TopAppBarTitle (cognitive 42) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/TopAppBarTitle.kt:41 — TopAppBarTitleKt.TopAppBarTitle has cognitive complexity 42 (threshold 15). Drivers by points: if/else 18 (28 pts), boolean chains 8, match/switch 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageExpander.copyUnknownPatch (cognitive 41) · ×1
  • ImageExpander.copyUnknownPatch (cognitive 41) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/expand/ImageExpander.kt:386 — ImageExpander.copyUnknownPatch has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (34 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransformGestureKt.detectPointerTransformGestures (cognitive 41) · ×1
  • TransformGestureKt.detectPointerTransformGestures (cognitive 41) lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:203 — TransformGestureKt.detectPointerTransformGestures has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (33 pts), boolean chains 5, match/switch 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GeometryUtils.shrinkPath (cognitive 41) · ×1
  • GeometryUtils.shrinkPath (cognitive 41) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:207 — GeometryUtils.shrinkPath has cognitive complexity 41 (threshold 15). Drivers by points: if/else 13 (31 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AspectRatioSelectorKt.AspectRatioSelector (cognitive 41) · ×1
  • AspectRatioSelectorKt.AspectRatioSelector (cognitive 41) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/AspectRatioSelector.kt:97 — AspectRatioSelectorKt.AspectRatioSelector has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 13, match/switch 3 (5 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 · QrTypeUtilsKt.toIntent (cognitive 40) · ×1
  • QrTypeUtilsKt.toIntent (cognitive 40) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:86 — QrTypeUtilsKt.toIntent has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (32 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EditLayerSheetKt.EditLayerSheet (cognitive 40) · ×1
  • EditLayerSheetKt.EditLayerSheet (cognitive 40) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:107 — EditLayerSheetKt.EditLayerSheet has cognitive complexity 40 (threshold 15). Drivers by points: if/else 19 (33 pts), match/switch 3 (7 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 · FiltersContentControlsKt.FiltersContentControls (cognitive 40) · ×1
  • FiltersContentControlsKt.FiltersContentControls (cognitive 40) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:76 — FiltersContentControlsKt.FiltersContentControls has cognitive complexity 40 (threshold 15). Drivers by points: if/else 18 (39 pts), match/switch 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EmojiSelectionSheetKt.EmojiSelectionSheet (cognitive 40) · ×1
  • EmojiSelectionSheetKt.EmojiSelectionSheet (cognitive 40) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/EmojiSelectionSheet.kt:101 — EmojiSelectionSheetKt.EmojiSelectionSheet has cognitive complexity 40 (threshold 15). Drivers by points: if/else 30 (38 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MarkupLayersContextActionsKt.MarkupLayersContextActions (cognitive 39) · ×1
  • MarkupLayersContextActionsKt.MarkupLayersContextActions (cognitive 39) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersContextActions.kt:82 — MarkupLayersContextActionsKt.MarkupLayersContextActions has cognitive complexity 39 (threshold 15). Drivers by points: if/else 24 (30 pts), match/switch 6, boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ImageTracer.colorquantization (cognitive 38) · ×1
  • ImageTracer.colorquantization (cognitive 38) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:333 — ImageTracer.colorquantization has cognitive complexity 38 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 8 (17 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MarkupLayersSideMenuColumnKt.MarkupLayersSideMenuColumn (cognitive 38) · ×1
  • MarkupLayersSideMenuColumnKt.MarkupLayersSideMenuColumn (cognitive 38) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersSideMenuColumn.kt:90 — MarkupLayersSideMenuColumnKt.MarkupLayersSideMenuColumn has cognitive complexity 38 (threshold 15). Drivers by points: if/else 31 (34 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CompareScreenContentImplKt.CompareScreenContentImpl (cognitive 38) · ×1
  • CompareScreenContentImplKt.CompareScreenContentImpl (cognitive 38) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContentImpl.kt:71 — CompareScreenContentImplKt.CompareScreenContentImpl has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 3, match/switch 1 (nesting depth added 17). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · OptimizationStyleTransferProcessor.strongWolfe (cognitive 38) · ×1
  • OptimizationStyleTransferProcessor.strongWolfe (cognitive 38) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/OptimizationStyleTransferProcessor.kt:388 — OptimizationStyleTransferProcessor.strongWolfe has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (32 pts), boolean chains 4, loops 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WavyShape.createOutline (cognitive 38) · ×1
  • WavyShape.createOutline (cognitive 38) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/WavyShape.kt:111 — WavyShape.createOutline has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 3, loops 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 · FilterItemKt.FilterItem (cognitive 38) · ×1
  • FilterItemKt.FilterItem (cognitive 38) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterItem.kt:91 — FilterItemKt.FilterItem has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (31 pts), boolean chains 7 (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 · Code128Encoder.chooseCode (cognitive 37) · ×1
  • Code128Encoder.chooseCode (cognitive 37) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:465 — Code128Encoder.chooseCode has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (29 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GifToolsContentKt.GifToolsContent (cognitive 37) · ×1
  • GifToolsContentKt.GifToolsContent (cognitive 37) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:60 — GifToolsContentKt.GifToolsContent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 29, boolean chains 5, match/switch 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SpotHealParamsSelectorKt.SpotHealParamsSelector (cognitive 37) · ×1
  • SpotHealParamsSelectorKt.SpotHealParamsSelector (cognitive 37) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/SpotHealParamsSelector.kt:88 — SpotHealParamsSelectorKt.SpotHealParamsSelector has cognitive complexity 37 (threshold 15). Drivers by points: if/else 25 (28 pts), boolean chains 5, error handling 2 (4 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 · ScreenListKt.screensFor (cognitive 37) · ×1
  • ScreenListKt.screensFor (cognitive 37) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/utils/ScreenList.kt:32 — ScreenListKt.screensFor has cognitive complexity 37 (threshold 15). Drivers by points: if/else 27 (30 pts), match/switch 3 (4 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SeamCarver.findForwardVerticalSeamInternal (cognitive 36) · ×1
  • SeamCarver.findForwardVerticalSeamInternal (cognitive 36) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:595 — SeamCarver.findForwardVerticalSeamInternal has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (30 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathHelper.drawStar (cognitive 36) · ×1
  • PathHelper.drawStar (cognitive 36) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:244 — PathHelper.drawStar has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PictureKt.CoilPicture (cognitive 36) · ×1
  • PictureKt.CoilPicture (cognitive 36) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:179 — PictureKt.CoilPicture has cognitive complexity 36 (threshold 15). Drivers by points: if/else 20 (27 pts), boolean chains 7, match/switch 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 · MinimalEncoder.encode (cognitive 35) · ×1
  • MinimalEncoder.encode (cognitive 35) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:182 — MinimalEncoder.encode has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (34 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 · FreeCornersCropperKt.detectCropDragGestures (cognitive 35) · ×1
  • FreeCornersCropperKt.detectCropDragGestures (cognitive 35) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:828 — FreeCornersCropperKt.detectCropDragGestures has cognitive complexity 35 (threshold 15). Drivers by points: if/else 16 (30 pts), boolean chains 4, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TransformGestureKt.detectTransformGestures (cognitive 35) · ×1
  • TransformGestureKt.detectTransformGestures (cognitive 35) lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:68 — TransformGestureKt.detectTransformGestures has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (30 pts), boolean chains 4, loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DynamicCropState.updateOverlayRect (cognitive 34) · ×1
  • DynamicCropState.updateOverlayRect (cognitive 34) lib/cropper/src/main/java/com/t8rin/cropper/state/DynamicCropState.kt:395 — DynamicCropState.updateOverlayRect has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25 (33 pts), match/switch 1 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GeometryUtils.createPathWithCircleCorner (cognitive 34) · ×1
  • GeometryUtils.createPathWithCircleCorner (cognitive 34) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:462 — GeometryUtils.createPathWithCircleCorner has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CropContentKt.CropContent (cognitive 34) · ×1
  • CropContentKt.CropContent (cognitive 34) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/CropContent.kt:97 — CropContentKt.CropContent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 25 (30 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AssistantContentKt.AssistantComposer (cognitive 34) · ×1
  • AssistantContentKt.AssistantComposer (cognitive 34) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:312 — AssistantContentKt.AssistantComposer has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 6 (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 · PhotoFilterCurvesControl.onDraw (cognitive 33) · ×1
  • PhotoFilterCurvesControl.onDraw (cognitive 33) lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:679 — PhotoFilterCurvesControl.onDraw has cognitive complexity 33 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CollageLayoutFactory.collageParametricGrid (cognitive 33) · ×1
  • CollageLayoutFactory.collageParametricGrid (cognitive 33) lib/collages/src/main/java/com/t8rin/collages/utils/CollageLayoutFactory.kt:112 — CollageLayoutFactory.collageParametricGrid has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (29 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameImageView.snapToBorders (cognitive 33) · ×1
  • FrameImageView.snapToBorders (cognitive 33) lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:538 — FrameImageView.snapToBorders has cognitive complexity 33 (threshold 15). Drivers by points: if/else 24 (30 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PaletteToolsContentKt.PaletteToolsContent (cognitive 33) · ×1
  • PaletteToolsContentKt.PaletteToolsContent (cognitive 33) feature/palette-tools/src/main/java/com/t8rin/imagetoolbox/feature/palette_tools/presentation/PaletteToolsContent.kt:87 — PaletteToolsContentKt.PaletteToolsContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21, boolean chains 9, match/switch 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CollageMakerContentKt.CollageMakerContent (cognitive 33) · ×1
  • CollageMakerContentKt.CollageMakerContent (cognitive 33) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:140 — CollageMakerContentKt.CollageMakerContent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 29 (31 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.
D2 · Cognitive Complexity · Moire.applyMask (cognitive 32) · ×1
  • Moire.applyMask (cognitive 32) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:179 — Moire.applyMask has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 5 (7 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EnhancedRangeSliderItemKt.EnhancedRangeSliderItem (cognitive 32) · ×1
  • EnhancedRangeSliderItemKt.EnhancedRangeSliderItem (cognitive 32) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:81 — EnhancedRangeSliderItemKt.EnhancedRangeSliderItem has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (25 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · QRCodeSetup.applyMaskPattern (cognitive 31) · ×1
  • QRCodeSetup.applyMaskPattern (cognitive 31) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/internals/QRCodeSetup.kt:236 — QRCodeSetup.applyMaskPattern has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (24 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageTracer.blur (cognitive 31) · ×1
  • ImageTracer.blur (cognitive 31) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:1019 — ImageTracer.blur has cognitive complexity 31 (threshold 15). Drivers by points: loops 8 (15 pts), if/else 6 (14 pts), boolean chains 2 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ImagesPreviewWithSelectionKt.ImagesPreviewWithSelection (cognitive 31) · ×1
  • ImagesPreviewWithSelectionKt.ImagesPreviewWithSelection (cognitive 31) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:88 — ImagesPreviewWithSelectionKt.ImagesPreviewWithSelection has cognitive complexity 31 (threshold 15). Drivers by points: if/else 23 (30 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ProcessImagesPreferenceSheetKt.ProcessImagesPreferenceSheet (cognitive 31) · ×1
  • ProcessImagesPreferenceSheetKt.ProcessImagesPreferenceSheet (cognitive 31) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:116 — ProcessImagesPreferenceSheetKt.ProcessImagesPreferenceSheet has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 3 (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 · SeamCarver.findLowestEnergyVerticalSeamAvoidingMask (cognitive 30) · ×1
  • SeamCarver.findLowestEnergyVerticalSeamAvoidingMask (cognitive 30) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:450 — SeamCarver.findLowestEnergyVerticalSeamAvoidingMask has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 5 (6 pts), boolean chains 3 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhotoFilterCurvesControl.onTouchEvent (cognitive 30) · ×1
  • PhotoFilterCurvesControl.onTouchEvent (cognitive 30) lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:421 — PhotoFilterCurvesControl.onTouchEvent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 3, match/switch 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameImageView.onTouchEvent (cognitive 30) · ×1
  • FrameImageView.onTouchEvent (cognitive 30) lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:495 — FrameImageView.onTouchEvent has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 2 (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 · MultiTouchHandler.touch (cognitive 30) · ×1
  • MultiTouchHandler.touch (cognitive 30) lib/collages/src/main/java/com/t8rin/collages/view/MultiTouchHandler.kt:80 — MultiTouchHandler.touch has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 2, match/switch 1 (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · BeforeAfterLayoutImplKt.BeforeAfterSplitLayout (cognitive 30) · ×1
  • BeforeAfterLayoutImplKt.BeforeAfterSplitLayout (cognitive 30) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/beforeafter/BeforeAfterLayoutImpl.kt:89 — BeforeAfterLayoutImplKt.BeforeAfterSplitLayout has cognitive complexity 30 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 4, 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 · ImageFormatSelectorKt.ImageFormatSelector (cognitive 30) · ×1
  • ImageFormatSelectorKt.ImageFormatSelector (cognitive 30) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageFormatSelector.kt:76 — ImageFormatSelectorKt.ImageFormatSelector has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20 (21 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 · ImageStickyHeaderKt.imageStickyHeader (cognitive 30) · ×1
  • ImageStickyHeaderKt.imageStickyHeader (cognitive 30) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImageStickyHeader.kt:85 — ImageStickyHeaderKt.imageStickyHeader has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (27 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.
D2 · Cognitive Complexity · FadingEdgesKt.fadingEdges (cognitive 30) · ×1
  • FadingEdgesKt.fadingEdges (cognitive 30) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/FadingEdges.kt:37 — FadingEdgesKt.fadingEdges has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (27 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 · AutodeskXMLHandler.endElement (cognitive 29) · ×1
  • AutodeskXMLHandler.endElement (cognitive 29) lib/palette/src/main/java/com/t8rin/palette/coders/AutodeskColorBookCoder.kt:73 — AutodeskXMLHandler.endElement has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (25 pts), boolean chains 3, match/switch 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HEXPaletteCoder.decode (cognitive 29) · ×1
  • HEXPaletteCoder.decode (cognitive 29) lib/palette/src/main/java/com/t8rin/palette/coders/HEXPaletteCoder.kt:39 — HEXPaletteCoder.decode has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (18 pts), error handling 2 (8 pts), loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GradientStrokeCache.render (cognitive 29) · ×1
  • GradientStrokeCache.render (cognitive 29) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.kt:295 — GradientStrokeCache.render has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Api21Impl.getLocaleConfigResourceId (cognitive 29) · ×1
  • Api21Impl.getLocaleConfigResourceId (cognitive 29) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/LocaleConfigCompat.kt:105 — Api21Impl.getLocaleConfigResourceId has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 3 (6 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DataSelectorKt.DataSelector (cognitive 29) · ×1
  • DataSelectorKt.DataSelector (cognitive 29) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/DataSelector.kt:74 — DataSelectorKt.DataSelector has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QualitySelectorKt.QualitySelector (cognitive 29) · ×1
  • QualitySelectorKt.QualitySelector (cognitive 29) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/QualitySelector.kt:91 — QualitySelectorKt.QualitySelector has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (16 pts), match/switch 7 (10 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UrisPreviewKt.UrisPreview (cognitive 29) · ×1
  • UrisPreviewKt.UrisPreview (cognitive 29) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/UrisPreview.kt:78 — UrisPreviewKt.UrisPreview has cognitive complexity 29 (threshold 15). Drivers by points: if/else 18 (26 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 · LiquidToggleKt.LiquidToggle (cognitive 29) · ×1
  • LiquidToggleKt.LiquidToggle (cognitive 29) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/LiquidToggle.kt:91 — LiquidToggleKt.LiquidToggle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SwipeableV2State.computeTarget (cognitive 28) · ×1
  • SwipeableV2State.computeTarget (cognitive 28) lib/modalsheet/src/main/java/com/t8rin/modalsheet/SwipeableV2.kt:423 — SwipeableV2State.computeTarget has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParamsManager.updateParams (cognitive 28) · ×1
  • ParamsManager.updateParams (cognitive 28) lib/collages/src/main/java/com/t8rin/collages/utils/ParamsManager.kt:59 — ParamsManager.updateParams has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 6 (8 pts), boolean chains 1, error handling 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArchiveEngine.encryptionStatus (cognitive 28) · ×1
  • ArchiveEngine.encryptionStatus (cognitive 28) lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:359 — ArchiveEngine.encryptionStatus has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 5, error handling 2 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaImageKt.MediaImage (cognitive 28) · ×1
  • MediaImageKt.MediaImage (cognitive 28) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImage.kt:68 — MediaImageKt.MediaImage has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24 (28 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 · MediaPeopleOverviewKt.PeopleGroupSettings (cognitive 28) · ×1
  • MediaPeopleOverviewKt.PeopleGroupSettings (cognitive 28) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt:342 — MediaPeopleOverviewKt.PeopleGroupSettings has cognitive complexity 28 (threshold 15). Drivers by points: if/else 17 (19 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 · ArchiveToolsContentKt.ArchiveToolsContent (cognitive 28) · ×1
  • ArchiveToolsContentKt.ArchiveToolsContent (cognitive 28) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/ArchiveToolsContent.kt:61 — ArchiveToolsContentKt.ArchiveToolsContent has cognitive complexity 28 (threshold 15). Drivers by points: if/else 21 (24 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EnhancedModalBottomSheetKt.EnhancedModalSheetImpl (cognitive 28) · ×1
  • EnhancedModalBottomSheetKt.EnhancedModalSheetImpl (cognitive 28) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:198 — EnhancedModalBottomSheetKt.EnhancedModalSheetImpl has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 8 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImageContainerKt.ImageContainer (cognitive 28) · ×1
  • ImageContainerKt.ImageContainer (cognitive 28) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImageContainer.kt:42 — ImageContainerKt.ImageContainer has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 4 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SubcomposePictureKt.CoilSubcomposePicture (cognitive 28) · ×1
  • SubcomposePictureKt.CoilSubcomposePicture (cognitive 28) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt:180 — SubcomposePictureKt.CoilSubcomposePicture has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19 (23 pts), boolean chains 5 (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 · RoundedTextFieldKt.RoundedTextField (cognitive 28) · ×1
  • RoundedTextFieldKt.RoundedTextField (cognitive 28) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:157 — RoundedTextFieldKt.RoundedTextField has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (22 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.
D2 · Cognitive Complexity · AsciiParamsItemKt.AsciiParamsItem (cognitive 28) · ×1
  • AsciiParamsItemKt.AsciiParamsItem (cognitive 28) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/AsciiParamsItem.kt:75 — AsciiParamsItemKt.AsciiParamsItem has cognitive complexity 28 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 1, match/switch 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageForensics.detectCopyMove (cognitive 27) · ×1
  • ImageForensics.detectCopyMove (cognitive 27) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/forensics/ImageForensics.kt:188 — ImageForensics.detectCopyMove has cognitive complexity 27 (threshold 15). Drivers by points: loops 7 (15 pts), if/else 5 (12 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · TextDetector.extractConnectedComponents (cognitive 27) · ×1
  • TextDetector.extractConnectedComponents (cognitive 27) lib/neural-tools/src/main/java/com/t8rin/neural_tools/ocr/PaddleOCR.kt:555 — TextDetector.extractConnectedComponents has cognitive complexity 27 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 2 (9 pts), boolean chains 3 (nesting depth added 17). 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 · FrameImageView.buildRealClearPath (cognitive 27) · ×1
  • FrameImageView.buildRealClearPath (cognitive 27) lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:844 — FrameImageView.buildRealClearPath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (25 pts), match/switch 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LayerKt.Layer (cognitive 27) · ×1
  • LayerKt.Layer (cognitive 27) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/Layer.kt:45 — LayerKt.Layer has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 11, 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 · DrawCommittedPathKt.drawCommittedPath (cognitive 27) · ×1
  • DrawCommittedPathKt.drawCommittedPath (cognitive 27) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawCommittedPath.kt:52 — DrawCommittedPathKt.drawCommittedPath has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 8 (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 · EnhancedIconButtonKt.EnhancedIconButton (cognitive 27) · ×1
  • EnhancedIconButtonKt.EnhancedIconButton (cognitive 27) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedIconButton.kt:59 — EnhancedIconButtonKt.EnhancedIconButton has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 3, loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HyperOSSwitchKt.HyperOSSwitch (cognitive 27) · ×1
  • HyperOSSwitchKt.HyperOSSwitch (cognitive 27) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/HyperOSSwitch.kt:72 — HyperOSSwitchKt.HyperOSSwitch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22 (24 pts), boolean chains 3 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KotlinPaletteCoder.encode (cognitive 26) · ×1
  • KotlinPaletteCoder.encode (cognitive 26) lib/palette/src/main/java/com/t8rin/palette/coders/KotlinPaletteCoder.kt:138 — KotlinPaletteCoder.encode has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (20 pts), error handling 3 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExtendedFrameImage.parametricStackedRowStrips (cognitive 26) · ×1
  • ExtendedFrameImage.parametricStackedRowStrips (cognitive 26) lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:83 — ExtendedFrameImage.parametricStackedRowStrips has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16 (25 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextureParamsSelectionKt.TextureParamsSelection (cognitive 26) · ×1
  • TextureParamsSelectionKt.TextureParamsSelection (cognitive 26) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:74 — TextureParamsSelectionKt.TextureParamsSelection has cognitive complexity 26 (threshold 15). Drivers by points: if/else 20 (22 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable (cognitive 26) · ×1
  • MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable (cognitive 26) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerRootContentEmbeddable.kt:83 — MediaPickerRootContentEmbeddableKt.MediaPickerRootContentEmbeddable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13, boolean chains 9, match/switch 2 (4 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 · AppLogsContentKt.AppLogsContent (cognitive 26) · ×1
  • AppLogsContentKt.AppLogsContent (cognitive 26) feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:106 — AppLogsContentKt.AppLogsContent has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MaterialShadowKt.materialShadow (cognitive 26) · ×1
  • MaterialShadowKt.materialShadow (cognitive 26) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/MaterialShadow.kt:61 — MaterialShadowKt.materialShadow has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (16 pts), match/switch 2 (6 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.
D2 · Cognitive Complexity · SwatchbookerXMLHandler.endElement (cognitive 25) · ×1
  • SwatchbookerXMLHandler.endElement (cognitive 25) lib/palette/src/main/java/com/t8rin/palette/coders/SwatchbookerCoder.kt:98 — SwatchbookerXMLHandler.endElement has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, 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 · FrameImageView.setSpace (cognitive 25) · ×1
  • FrameImageView.setSpace (cognitive 25) lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:634 — FrameImageView.setSpace has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (5 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EditBoxKt.EditBox (cognitive 25) · ×1
  • EditBoxKt.EditBox (cognitive 25) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditBox.kt:101 — EditBoxKt.EditBox has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 7, 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 · BitmapEraserKt.BitmapEraser (cognitive 25) · ×1
  • BitmapEraserKt.BitmapEraser (cognitive 25) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/components/BitmapEraser.kt:84 — BitmapEraserKt.BitmapEraser has cognitive complexity 25 (threshold 15). Drivers by points: if/else 22, 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 · DrawUtilsKt.createDrawPaint (cognitive 25) · ×1
  • DrawUtilsKt.createDrawPaint (cognitive 25) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawUtils.kt:288 — DrawUtilsKt.createDrawPaint has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HelperGridKt.drawHelperGrid (cognitive 25) · ×1
  • HelperGridKt.drawHelperGrid (cognitive 25) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/HelperGrid.kt:47 — HelperGridKt.drawHelperGrid has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SVGHandler.startElement (cognitive 24) · ×1
  • SVGHandler.startElement (cognitive 24) lib/palette/src/main/java/com/t8rin/palette/coders/SVGPaletteCoder.kt:56 — SVGHandler.startElement has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 1 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeamCarver.findMaskBounds (cognitive 24) · ×1
  • SeamCarver.findMaskBounds (cognitive 24) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:833 — SeamCarver.findMaskBounds has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaMaProcessor.inpaintTiled (cognitive 24) · ×1
  • LaMaProcessor.inpaintTiled (cognitive 24) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt:308 — LaMaProcessor.inpaintTiled has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 2 (3 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DynamicThemeKt.getColorScheme (cognitive 24) · ×1
  • DynamicThemeKt.getColorScheme (cognitive 24) lib/dynamic-theme/src/main/java/com/t8rin/dynamic/theme/DynamicTheme.kt:655 — DynamicThemeKt.getColorScheme has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageTracer.pathscan (cognitive 24) · ×1
  • ImageTracer.pathscan (cognitive 24) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:535 — ImageTracer.pathscan has cognitive complexity 24 (threshold 15). Drivers by points: if/else 3 (14 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CategorizedSettingsKt.CategorizedSettings (cognitive 24) · ×1
  • CategorizedSettingsKt.CategorizedSettings (cognitive 24) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CategorizedSettings.kt:54 — CategorizedSettingsKt.CategorizedSettings has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PdfContactSheetToolComponent.createCaptionLines (cognitive 24) · ×1
  • PdfContactSheetToolComponent.createCaptionLines (cognitive 24) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/contact_sheet/screenLogic/PdfContactSheetToolComponent.kt:112 — PdfContactSheetToolComponent.createCaptionLines has cognitive complexity 24 (threshold 15). Drivers by points: if/else 23 (24 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 · MarkupLayersContentKt.MarkupLayersContent (cognitive 24) · ×1
  • MarkupLayersContentKt.MarkupLayersContent (cognitive 24) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/MarkupLayersContent.kt:121 — MarkupLayersContentKt.MarkupLayersContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 4, match/switch 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FilteredScreenListForKt.filteredScreenListFor (cognitive 24) · ×1
  • FilteredScreenListForKt.filteredScreenListFor (cognitive 24) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/FilteredScreenListFor.kt:30 — FilteredScreenListForKt.filteredScreenListFor has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 5, 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.
D2 · Cognitive Complexity · MainContentImplKt.MainContentImpl (cognitive 24) · ×1
  • MainContentImplKt.MainContentImpl (cognitive 24) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainContentImpl.kt:63 — MainContentImplKt.MainContentImpl has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13, boolean chains 9, 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 · JxlToolsContentKt.JxlToolsContent (cognitive 24) · ×1
  • JxlToolsContentKt.JxlToolsContent (cognitive 24) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:54 — JxlToolsContentKt.JxlToolsContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15, match/switch 5 (7 pts), boolean chains 2 (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 · AssistantContentKt.AssistantContent (cognitive 24) · ×1
  • AssistantContentKt.AssistantContent (cognitive 24) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:126 — AssistantContentKt.AssistantContent has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (17 pts), boolean chains 7 (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 · AssistantModelSheetKt.AssistantModelItem (cognitive 24) · ×1
  • AssistantModelSheetKt.AssistantModelItem (cognitive 24) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantModelSheet.kt:196 — AssistantModelSheetKt.AssistantModelItem has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 8, match/switch 3 (4 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 · ImageExportProfileSelectorKt.ImageExportProfileSelector (cognitive 24) · ×1
  • ImageExportProfileSelectorKt.ImageExportProfileSelector (cognitive 24) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportProfileSelector.kt:94 — ImageExportProfileSelectorKt.ImageExportProfileSelector has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 6 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PaintNETPaletteCoder.decode (cognitive 23) · ×1
  • PaintNETPaletteCoder.decode (cognitive 23) lib/palette/src/main/java/com/t8rin/palette/coders/PaintNETPaletteCoder.kt:34 — PaintNETPaletteCoder.decode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 3, 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 · LaMaProcessor.bitmapToTensor (cognitive 23) · ×1
  • LaMaProcessor.bitmapToTensor (cognitive 23) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt:527 — LaMaProcessor.bitmapToTensor has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (6 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 · ModalSheetLayoutKt.ModalSheetLayout (cognitive 23) · ×1
  • ModalSheetLayoutKt.ModalSheetLayout (cognitive 23) lib/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheetLayout.kt:320 — ModalSheetLayoutKt.ModalSheetLayout has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (20 pts), 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 · ArchiveEngine.extract (cognitive 23) · ×1
  • ArchiveEngine.extract (cognitive 23) lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:170 — ArchiveEngine.extract has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QrCodePreviewKt.QrCodePreview (cognitive 23) · ×1
  • QrCodePreviewKt.QrCodePreview (cognitive 23) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrCodePreview.kt:66 — QrCodePreviewKt.QrCodePreview has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (19 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FiltersContentKt.FiltersMainContent (cognitive 23) · ×1
  • FiltersContentKt.FiltersMainContent (cognitive 23) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/FiltersContent.kt:117 — FiltersContentKt.FiltersMainContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, boolean chains 7, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EraseBackgroundContentKt.EraseBackgroundContent (cognitive 23) · ×1
  • EraseBackgroundContentKt.EraseBackgroundContent (cognitive 23) feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:116 — EraseBackgroundContentKt.EraseBackgroundContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ArchiveToolsControlsKt.ArchiveToolsControls (cognitive 23) · ×1
  • ArchiveToolsControlsKt.ArchiveToolsControls (cognitive 23) feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchiveToolsControls.kt:72 — ArchiveToolsControlsKt.ArchiveToolsControls has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4 (9 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 · CustomRangeSliderUtilsKt.rangeSliderPressDragModifier (cognitive 23) · ×1
  • CustomRangeSliderUtilsKt.rangeSliderPressDragModifier (cognitive 23) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSliderUtils.kt:41 — CustomRangeSliderUtilsKt.rangeSliderPressDragModifier has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomSliderUtilsKt.awaitPointerSlopOrCancellation (cognitive 23) · ×1
  • CustomSliderUtilsKt.awaitPointerSlopOrCancellation (cognitive 23) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomSliderUtils.kt:111 — CustomSliderUtilsKt.awaitPointerSlopOrCancellation has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OverlayKt.drawOverlay (cognitive 22) · ×1
  • OverlayKt.drawOverlay (cognitive 22) lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:324 — OverlayKt.drawOverlay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (18 pts), match/switch 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 · MediaPickerHavePermissionsKt.MediaPickerHavePermissions (cognitive 22) · ×1
  • MediaPickerHavePermissionsKt.MediaPickerHavePermissions (cognitive 22) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerHavePermissions.kt:82 — MediaPickerHavePermissionsKt.MediaPickerHavePermissions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15, boolean chains 7. 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 · JxlToolsComponent.setType (cognitive 22) · ×1
  • JxlToolsComponent.setType (cognitive 22) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:134 — JxlToolsComponent.setType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (21 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.
D2 · Cognitive Complexity · NeuralModelsColumnKt.NeuralModelsColumn (cognitive 22) · ×1
  • NeuralModelsColumnKt.NeuralModelsColumn (cognitive 22) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:100 — NeuralModelsColumnKt.NeuralModelsColumn has cognitive complexity 22 (threshold 15). Drivers by points: if/else 19 (20 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · JxlBackend.compress (cognitive 22) · ×1
  • JxlBackend.compress (cognitive 22) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/image/utils/compressor/JxlBackend.kt:38 — JxlBackend.compress has cognitive complexity 22 (threshold 15). Drivers by points: if/else 14 (20 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.
D2 · Cognitive Complexity · YoloSegRemover.processSegmentation (cognitive 21) · ×1
  • YoloSegRemover.processSegmentation (cognitive 21) lib/neural-tools/src/main/java/com/t8rin/neural_tools/bgremover/YoloSegRemover.kt:126 — YoloSegRemover.processSegmentation has cognitive complexity 21 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 4 (9 pts), match/switch 1 (2 pts) (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 · PhotoFilterCurvesControl.moveActivePoint (cognitive 21) · ×1
  • PhotoFilterCurvesControl.moveActivePoint (cognitive 21) lib/curves/src/main/java/com/t8rin/curves/view/PhotoFilterCurvesControl.kt:572 — PhotoFilterCurvesControl.moveActivePoint has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeometryUtils.createPathWithCubicCorner (cognitive 21) · ×1
  • GeometryUtils.createPathWithCubicCorner (cognitive 21) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:317 — GeometryUtils.createPathWithCubicCorner has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 1, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameImageView.buildRealPath (cognitive 21) · ×1
  • FrameImageView.buildRealPath (cognitive 21) lib/collages/src/main/java/com/t8rin/collages/view/FrameImageView.kt:751 — FrameImageView.buildRealPath has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RecognizeTextContentKt.RecognizeTextContent (cognitive 21) · ×1
  • RecognizeTextContentKt.RecognizeTextContent (cognitive 21) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/RecognizeTextContent.kt:74 — RecognizeTextContentKt.RecognizeTextContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, match/switch 3 (4 pts), boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MainContentKt.MainContent (cognitive 21) · ×1
  • MainContentKt.MainContent (cognitive 21) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/MainContent.kt:86 — MainContentKt.MainContent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DrawContentControlsKt.DrawContentControls (cognitive 21) · ×1
  • DrawContentControlsKt.DrawContentControls (cognitive 21) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:77 — DrawContentControlsKt.DrawContentControls has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, boolean chains 8, match/switch 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · DrawGradientKt.colourSegments (cognitive 21) · ×1
  • DrawGradientKt.colourSegments (cognitive 21) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawGradient.kt:511 — DrawGradientKt.colourSegments has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, 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 · ColorRowSelectorKt.ColorRowSelector (cognitive 21) · ×1
  • ColorRowSelectorKt.ColorRowSelector (cognitive 21) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ColorRowSelector.kt:77 — ColorRowSelectorKt.ColorRowSelector has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FilterPreviewSheetKt.FilterPreviewSheet (cognitive 21) · ×1
  • FilterPreviewSheetKt.FilterPreviewSheet (cognitive 21) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterPreviewSheet.kt:80 — FilterPreviewSheetKt.FilterPreviewSheet has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OriginalFileDeletionHelper.deleteFile (cognitive 21) · ×1
  • OriginalFileDeletionHelper.deleteFile (cognitive 21) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/OriginalFileDeletionHelper.kt:175 — OriginalFileDeletionHelper.deleteFile has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 3, 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 · Code128Encoder.check (cognitive 20) · ×1
  • Code128Encoder.check (cognitive 20) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code128Encoder.kt:298 — Code128Encoder.check has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), match/switch 2 (4 pts), boolean chains 1, 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 · RoundCornersShape.path (cognitive 20) · ×1
  • RoundCornersShape.path (cognitive 20) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/options/QrShapeModifiers.kt:59 — RoundCornersShape.path has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 8. 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 · ACOPaletteCoder.decode (cognitive 20) · ×1
  • ACOPaletteCoder.decode (cognitive 20) lib/palette/src/main/java/com/t8rin/palette/coders/ACOPaletteCoder.kt:44 — ACOPaletteCoder.decode has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (2 pts), match/switch 1 (2 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 · ClipTokenizer.basicTokens (cognitive 20) · ×1
  • ClipTokenizer.basicTokens (cognitive 20) lib/neural-tools/src/main/java/com/t8rin/neural_tools/search/ClipTokenizer.kt:66 — ClipTokenizer.basicTokens has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 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 · TextureSearchSheetKt.TextureSearchSheet (cognitive 20) · ×1
  • TextureSearchSheetKt.TextureSearchSheet (cognitive 20) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureSearchSheet.kt:91 — TextureSearchSheetKt.TextureSearchSheet has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DuplicateFinderContentKt.DuplicateFinderContent (cognitive 20) · ×1
  • DuplicateFinderContentKt.DuplicateFinderContent (cognitive 20) feature/duplicate-finder/src/main/java/com/t8rin/imagetoolbox/feature/duplicate_finder/presentation/DuplicateFinderContent.kt:71 — DuplicateFinderContentKt.DuplicateFinderContent has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 7. 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 · AssistantKnowledge.grounding (cognitive 20) · ×1
  • AssistantKnowledge.grounding (cognitive 20) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/data/AssistantKnowledge.kt:373 — AssistantKnowledge.grounding has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (13 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 · AiProcessor.drawTile (cognitive 20) · ×1
  • AiProcessor.drawTile (cognitive 20) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AiProcessor.kt:493 — AiProcessor.drawTile has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 4, loops 2 (3 pts), error handling 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 · AndroidAiToolsRepository.fetchDownloadedModels (cognitive 20) · ×1
  • AndroidAiToolsRepository.fetchDownloadedModels (cognitive 20) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/AndroidAiToolsRepository.kt:630 — AndroidAiToolsRepository.fetchDownloadedModels has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SaveResultHandlerImpl.parseSaveResults (cognitive 20) · ×1
  • SaveResultHandlerImpl.parseSaveResults (cognitive 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/SaveResultHandler.kt:107 — SaveResultHandlerImpl.parseSaveResults has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaCheckBoxKt.MediaCheckBox (cognitive 20) · ×1
  • MediaCheckBoxKt.MediaCheckBox (cognitive 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/MediaCheckBox.kt:52 — MediaCheckBoxKt.MediaCheckBox has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog (cognitive 20) · ×1
  • OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog (cognitive 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:111 — OneTimeSaveLocationSelectionDialogKt.OneTimeSaveLocationSelectionDialog has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 6. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ContainerKt.container (cognitive 20) · ×1
  • ContainerKt.container (cognitive 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/modifier/Container.kt:49 — ContainerKt.container has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17 (19 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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 · PreferenceRowKt.PreferenceRow (cognitive 20) · ×1
  • PreferenceRowKt.PreferenceRow (cognitive 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/PreferenceRow.kt:64 — PreferenceRowKt.PreferenceRow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 18 (20 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ScreenPreferenceKt.ScreenPreference (cognitive 20) · ×1
  • ScreenPreferenceKt.ScreenPreference (cognitive 20) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/preferences/ScreenPreference.kt:27 — ScreenPreferenceKt.ScreenPreference has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · CollageLayoutFactory.collageLinear (cognitive 19) · ×1
  • CollageLayoutFactory.collageLinear (cognitive 19) lib/collages/src/main/java/com/t8rin/collages/utils/CollageLayoutFactory.kt:80 — CollageLayoutFactory.collageLinear has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (19 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GeometryUtils.commonShrinkPath (cognitive 19) · ×1
  • GeometryUtils.commonShrinkPath (cognitive 19) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:266 — GeometryUtils.commonShrinkPath has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageTracer.fitSequence (cognitive 19) · ×1
  • ImageTracer.fitSequence (cognitive 19) feature/svg-maker/src/main/java/com/t8rin/imagetoolbox/feature/svg_maker/data/tracer/ImageTracer.kt:677 — ImageTracer.fitSequence has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidPdfManager.printPdf (cognitive 19) · ×1
  • AndroidPdfManager.printPdf (cognitive 19) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/data/AndroidPdfManager.kt:1190 — AndroidPdfManager.printPdf has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AndroidImageCombiner.calculateCombinedImageDimensions (cognitive 19) · ×1
  • AndroidImageCombiner.calculateCombinedImageDimensions (cognitive 19) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/AndroidImageCombiner.kt:283 — AndroidImageCombiner.calculateCombinedImageDimensions has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, 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 · VHSNtscFilterKt.toNtscSettings (cognitive 19) · ×1
  • VHSNtscFilterKt.toNtscSettings (cognitive 19) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/VHSNtscFilter.kt:54 — VHSNtscFilterKt.toNtscSettings has cognitive complexity 19 (threshold 15). Drivers by points: if/else 18 (19 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CompressionLabComponent.findCandidate (cognitive 19) · ×1
  • CompressionLabComponent.findCandidate (cognitive 19) feature/compression-lab/src/main/java/com/t8rin/imagetoolbox/feature/compression_lab/presentation/screenLogic/CompressionLabComponent.kt:450 — CompressionLabComponent.findCandidate has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (10 pts), loops 2 (4 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PresetSelectorKt.PresetSelector (cognitive 19) · ×1
  • PresetSelectorKt.PresetSelector (cognitive 19) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/PresetSelector.kt:101 — PresetSelectorKt.PresetSelector has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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 · EnhancedButtonGroupKt.EnhancedButtonGroup (cognitive 19) · ×1
  • EnhancedButtonGroupKt.EnhancedButtonGroup (cognitive 19) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedButtonGroup.kt:292 — EnhancedButtonGroupKt.EnhancedButtonGroup has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, 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 · Circle.transform (cognitive 18) · ×1
  • Circle.transform (cognitive 18) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/options/QrCodeShape.kt:75 — Circle.transform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LaMaProcessor.inpaint (cognitive 18) · ×1
  • LaMaProcessor.inpaint (cognitive 18) lib/neural-tools/src/main/java/com/t8rin/neural_tools/inpaint/LaMaProcessor.kt:161 — LaMaProcessor.inpaint has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImageCurvesEditorKt.CurvesControls (cognitive 18) · ×1
  • ImageCurvesEditorKt.CurvesControls (cognitive 18) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1305 — ImageCurvesEditorKt.CurvesControls has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 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 · ImageColorDetectorKt.ImageColorDetector (cognitive 18) · ×1
  • ImageColorDetectorKt.ImageColorDetector (cognitive 18) lib/colors/src/main/java/com/t8rin/colors/ImageColorDetector.kt:90 — ImageColorDetectorKt.ImageColorDetector has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QrTypeUtilsKt.createRaw (cognitive 18) · ×1
  • QrTypeUtilsKt.createRaw (cognitive 18) feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/QrTypeUtils.kt:272 — QrTypeUtilsKt.createRaw has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 1, match/switch 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ResizeAndConvertContentKt.ResizeAndConvertContent (cognitive 18) · ×1
  • ResizeAndConvertContentKt.ResizeAndConvertContent (cognitive 18) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:97 — ResizeAndConvertContentKt.ResizeAndConvertContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14, 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 · MultiFrameFusionEngine.largestValidRectangle (cognitive 18) · ×1
  • MultiFrameFusionEngine.largestValidRectangle (cognitive 18) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/data/MultiFrameFusionEngine.kt:299 — MultiFrameFusionEngine.largestValidRectangle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaSemanticSearchCategoriesKt.CategoryChip (cognitive 18) · ×1
  • MediaSemanticSearchCategoriesKt.CategoryChip (cognitive 18) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSemanticSearchCategories.kt:164 — MediaSemanticSearchCategoriesKt.CategoryChip has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview (cognitive 18) · ×1
  • SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview (cognitive 18) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/SemanticSearchCategoryContent.kt:117 — SemanticSearchCategoryContentKt.SemanticSearchCategoryPreview has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (11 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 · CompressionLabContentKt.CompressionLabContent (cognitive 18) · ×1
  • CompressionLabContentKt.CompressionLabContent (cognitive 18) feature/compression-lab/src/main/java/com/t8rin/imagetoolbox/feature/compression_lab/presentation/CompressionLabContent.kt:69 — CompressionLabContentKt.CompressionLabContent has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, 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 · DepthProcessor.suppressUncertainBackground (cognitive 18) · ×1
  • DepthProcessor.suppressUncertainBackground (cognitive 18) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/data/DepthProcessor.kt:507 — DepthProcessor.suppressUncertainBackground has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UriUtilsKt.naturalCompareTo (cognitive 18) · ×1
  • UriUtilsKt.naturalCompareTo (cognitive 18) core/utils/src/main/java/com/t8rin/imagetoolbox/core/utils/UriUtils.kt:500 — UriUtilsKt.naturalCompareTo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 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 · ValueDialogKt.ValueDialog (cognitive 18) · ×1
  • ValueDialogKt.ValueDialog (cognitive 18) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/value/ValueDialog.kt:71 — ValueDialogKt.ValueDialog has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 7, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · TemplateFilter.equals (cognitive 18) · ×1
  • TemplateFilter.equals (cognitive 18) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/domain/model/TemplateFilter.kt:32 — TemplateFilter.equals has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 3, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AddFiltersSheetKt.AddFiltersSheet (cognitive 18) · ×1
  • AddFiltersSheetKt.AddFiltersSheet (cognitive 18) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:107 — AddFiltersSheetKt.AddFiltersSheet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 14 (15 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Code39Encoder.tryToConvertToExtendedMode (cognitive 17) · ×1
  • Code39Encoder.tryToConvertToExtendedMode (cognitive 17) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:73 — Code39Encoder.tryToConvertToExtendedMode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Code93Encoder.tryToConvertToExtendedMode (cognitive 17) · ×1
  • Code93Encoder.tryToConvertToExtendedMode (cognitive 17) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt:54 — Code93Encoder.tryToConvertToExtendedMode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HexUtilsKt.extractHexRGBA (cognitive 17) · ×1
  • HexUtilsKt.extractHexRGBA (cognitive 17) lib/palette/src/main/java/com/t8rin/palette/utils/HexUtils.kt:32 — HexUtilsKt.extractHexRGBA has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 pts), match/switch 2, boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SeamCarver.findLowestEnergyVerticalSeam (cognitive 17) · ×1
  • SeamCarver.findLowestEnergyVerticalSeam (cognitive 17) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/seam_carving/SeamCarver.kt:868 — SeamCarver.findLowestEnergyVerticalSeam has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (5 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CropEditOptionKt.CropEditOption (cognitive 17) · ×1
  • CropEditOptionKt.CropEditOption (cognitive 17) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/CropEditOption.kt:88 — CropEditOptionKt.CropEditOption has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 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.
D2 · Cognitive Complexity · MediaPeopleOverviewKt.MediaPeopleOverview (cognitive 17) · ×1
  • MediaPeopleOverviewKt.MediaPeopleOverview (cognitive 17) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleOverview.kt:111 — MediaPeopleOverviewKt.MediaPeopleOverview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ShapeLayerRendererKt.buildStarPath (cognitive 17) · ×1
  • ShapeLayerRendererKt.buildStarPath (cognitive 17) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/ShapeLayerRenderer.kt:551 — ShapeLayerRendererKt.buildStarPath has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (17 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LayerKt.GroupLayer (cognitive 17) · ×1
  • LayerKt.GroupLayer (cognitive 17) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/Layer.kt:163 — LayerKt.GroupLayer has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 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.
D2 · Cognitive Complexity · MainDrawerContentKt.MainDrawerContent (cognitive 17) · ×1
  • MainDrawerContentKt.MainDrawerContent (cognitive 17) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainDrawerContent.kt:58 — MainDrawerContentKt.MainDrawerContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LibrariesContainerKt.LibrariesScaffold (cognitive 17) · ×1
  • LibrariesContainerKt.LibrariesScaffold (cognitive 17) feature/libraries-info/src/main/java/com/t8rin/imagetoolbox/feature/libraries_info/presentation/components/LibrariesContainer.kt:301 — LibrariesContainerKt.LibrariesScaffold has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 7, error handling 1 (2 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · JxlToolsBitmapPreviewKt.JxlToolsBitmapPreview (cognitive 17) · ×1
  • JxlToolsBitmapPreviewKt.JxlToolsBitmapPreview (cognitive 17) feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsBitmapPreview.kt:42 — JxlToolsBitmapPreviewKt.JxlToolsBitmapPreview has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImagePreviewContentKt.ImagePreviewContent (cognitive 17) · ×1
  • ImagePreviewContentKt.ImagePreviewContent (cognitive 17) feature/image-preview/src/main/java/com/t8rin/imagetoolbox/feature/image_preview/presentation/ImagePreviewContent.kt:109 — ImagePreviewContentKt.ImagePreviewContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12, boolean chains 5. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · AndroidImageCutter.cutHorizontally (cognitive 17) · ×1
  • AndroidImageCutter.cutHorizontally (cognitive 17) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:122 — AndroidImageCutter.cutHorizontally has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AndroidImageCutter.cutVertically) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · AndroidImageCutter.cutVertically (cognitive 17) · ×1
  • AndroidImageCutter.cutVertically (cognitive 17) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/data/AndroidImageCutter.kt:200 — AndroidImageCutter.cutVertically has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (AndroidImageCutter.cutHorizontally) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · PixelationTool.getPixelColor (cognitive 17) · ×1
  • PixelationTool.getPixelColor (cognitive 17) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/utils/pixelation/PixelationTool.kt:147 — PixelationTool.getPixelColor has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompareScreenContentKt.CompareScreenContent (cognitive 17) · ×1
  • CompareScreenContentKt.CompareScreenContent (cognitive 17) feature/compare/src/main/java/com/t8rin/imagetoolbox/feature/compare/presentation/components/CompareScreenContent.kt:114 — CompareScreenContentKt.CompareScreenContent has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 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.
D2 · Cognitive Complexity · AssistantContentKt.AssistantConversation (cognitive 17) · ×1
  • AssistantContentKt.AssistantConversation (cognitive 17) feature/assistant/src/main/java/com/t8rin/imagetoolbox/feature/assistant/presentation/AssistantContent.kt:487 — AssistantContentKt.AssistantConversation has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts) (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ColorInfoKt.ColorInfo (cognitive 17) · ×1
  • ColorInfoKt.ColorInfo (cognitive 17) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorInfo.kt:84 — ColorInfoKt.ColorInfo has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HeifDecoder.decode (cognitive 17) · ×1
  • HeifDecoder.decode (cognitive 17) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt:49 — HeifDecoder.decode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 3, match/switch 2, error handling 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 · RoundCornersFrameShape.path (cognitive 16) · ×1
  • RoundCornersFrameShape.path (cognitive 16) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/options/QrFrameShape.kt:191 — RoundCornersFrameShape.path 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 · QRCode.encode (cognitive 16) · ×1
  • QRCode.encode (cognitive 16) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/qrcode/QRCode.kt:70 — QRCode.encode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (13 pts), loops 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Moire.detectNoiseType (cognitive 16) · ×1
  • Moire.detectNoiseType (cognitive 16) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/moire/Moire.kt:99 — Moire.detectNoiseType has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 3 (4 pts), boolean chains 2, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModalSheetLayoutKt.ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection (cognitive 16) · ×1
  • ModalSheetLayoutKt.ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection (cognitive 16) lib/modalsheet/src/main/java/com/t8rin/modalsheet/ModalSheetLayout.kt:512 — ModalSheetLayoutKt.ConsumeSwipeWithinBottomSheetBoundsNestedScrollConnection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ArchiveEngine.create (cognitive 16) · ×1
  • ArchiveEngine.create (cognitive 16) lib/archive/src/main/java/com/t8rin/archive/ArchiveEngine.kt:35 — ArchiveEngine.create has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 3, error handling 1, 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 · PaddleOCRModelSelectorSheetContentKt.PaddleOCRModelSelectorSheetContent (cognitive 16) · ×1
  • PaddleOCRModelSelectorSheetContentKt.PaddleOCRModelSelectorSheetContent (cognitive 16) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelectorSheetContent.kt:74 — PaddleOCRModelSelectorSheetContentKt.PaddleOCRModelSelectorSheetContent 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.
D2 · Cognitive Complexity · PhotomosaicContentKt.PhotomosaicContent (cognitive 16) · ×1
  • PhotomosaicContentKt.PhotomosaicContent (cognitive 16) feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:97 — PhotomosaicContentKt.PhotomosaicContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MediaPeopleSuggestionsSheetKt.MediaPeopleSuggestionsSheet (cognitive 16) · ×1
  • MediaPeopleSuggestionsSheetKt.MediaPeopleSuggestionsSheet (cognitive 16) feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPeopleSuggestionsSheet.kt:68 — MediaPeopleSuggestionsSheetKt.MediaPeopleSuggestionsSheet has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 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 · CvStitchHelper.stitchScreenshots (cognitive 16) · ×1
  • CvStitchHelper.stitchScreenshots (cognitive 16) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/CvStitchHelper.kt:376 — CvStitchHelper.stitchScreenshots has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (16 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CvStitchHelper.largestFilledRectangle (cognitive 16) · ×1
  • CvStitchHelper.largestFilledRectangle (cognitive 16) feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/data/CvStitchHelper.kt:1137 — CvStitchHelper.largestFilledRectangle has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathPaintPreviewKt.PathPaintPreview (cognitive 16) · ×1
  • PathPaintPreviewKt.PathPaintPreview (cognitive 16) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/PathPaintPreview.kt:54 — PathPaintPreviewKt.PathPaintPreview has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (16 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PathHelper.drawPolygon (cognitive 16) · ×1
  • PathHelper.drawPolygon (cognitive 16) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/PathHelper.kt:192 — PathHelper.drawPolygon has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CropperKt.Cropper (cognitive 16) · ×1
  • CropperKt.Cropper (cognitive 16) feature/crop/src/main/java/com/t8rin/imagetoolbox/feature/crop/presentation/components/Cropper.kt:69 — CropperKt.Cropper has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 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.
D2 · Cognitive Complexity · ColorLibraryContentKt.ColorLibraryContent (cognitive 16) · ×1
  • ColorLibraryContentKt.ColorLibraryContent (cognitive 16) feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:100 — ColorLibraryContentKt.ColorLibraryContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 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.
D2 · Cognitive Complexity · CodePreviewBitmapRendererKt.createGeometry (cognitive 16) · ×1
  • CodePreviewBitmapRendererKt.createGeometry (cognitive 16) feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/components/CodePreviewBitmapRenderer.kt:83 — CodePreviewBitmapRendererKt.createGeometry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NeuralModelTypeResourcesKt.NeuralModelSpeedBadge (cognitive 16) · ×1
  • NeuralModelTypeResourcesKt.NeuralModelSpeedBadge (cognitive 16) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelTypeResources.kt:230 — NeuralModelTypeResourcesKt.NeuralModelSpeedBadge has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), match/switch 3 (4 pts), boolean chains 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImagePickerImpl.pickImageWithMode (cognitive 16) · ×1
  • ImagePickerImpl.pickImageWithMode (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt:191 — ImagePickerImpl.pickImageWithMode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (ImagePickerKt.localImagePickerMode) 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 · ImagePickerKt.localImagePickerMode (cognitive 16) · ×1
  • ImagePickerKt.localImagePickerMode (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ImagePicker.kt:257 — ImagePickerKt.localImagePickerMode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (15 pts), match/switch 1 (nesting depth added 5). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (ImagePickerImpl.pickImageWithMode) 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 · GradientPaletteEditorKt.GradientPaletteEditor (cognitive 16) · ×1
  • GradientPaletteEditorKt.GradientPaletteEditor (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteEditor.kt:81 — GradientPaletteEditorKt.GradientPaletteEditor has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CustomRangeSliderKt.rangeSliderStartThumbSemantics (cognitive 16) · ×1
  • CustomRangeSliderKt.rangeSliderStartThumbSemantics (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:435 — CustomRangeSliderKt.rangeSliderStartThumbSemantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (CustomRangeSliderKt.rangeSliderEndThumbSemantics) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomRangeSliderKt.rangeSliderEndThumbSemantics (cognitive 16) · ×1
  • CustomRangeSliderKt.rangeSliderEndThumbSemantics (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomRangeSlider.kt:497 — CustomRangeSliderKt.rangeSliderEndThumbSemantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (CustomRangeSliderKt.rangeSliderStartThumbSemantics) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomSliderKt.sliderSemantics (cognitive 16) · ×1
  • CustomSliderKt.sliderSemantics (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/custom_slider/CustomSlider.kt:381 — CustomSliderKt.sliderSemantics has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RoundedTextFieldKt.RoundedTextFieldColors (cognitive 16) · ×1
  • RoundedTextFieldKt.RoundedTextFieldColors (cognitive 16) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/RoundedTextField.kt:369 — RoundedTextFieldKt.RoundedTextFieldColors has cognitive complexity 16 (threshold 15). Drivers by points: if/else 16. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · FavoritesContentKt.FavoritesContent (cognitive 16) · ×1
  • FavoritesContentKt.FavoritesContent (cognitive 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/FavoritesContent.kt:64 — FavoritesContentKt.FavoritesContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GmicCommandsInfoSheetKt.readGmicCatalog (cognitive 16) · ×1
  • GmicCommandsInfoSheetKt.readGmicCatalog (cognitive 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:478 — GmicCommandsInfoSheetKt.readGmicCatalog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 3 (6 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D35 · Change Coupling · Change coupling clique · ×1
  • Change coupling clique: ScreenSearch.kt, ScreenUtils.kt, ChildProvider.kt core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt — 3 files — `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenSearch.kt`, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/navigation/ScreenUtils.kt`, `feature/root/src/main/java/com/t8rin/imagetoolbox/feature/root/presentation/components/navigation/ChildProvider.kt` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
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 (7 members, 18 shared lines) · ×1
  • Near-duplicate member family (7 members, 18 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 — These 7 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Near-duplicate member family (6 members, 15 shared lines) · ×1
  • Near-duplicate member family (6 members, 15 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 — These 6 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 19 shared lines) · ×1
  • Near-duplicate member family (5 members, 19 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:549-599 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 — These 5 members are variants of one another: a block of 19 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 18 shared lines) · ×1
  • Near-duplicate member family (5 members, 18 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:754-801 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:336-379 — These 5 members are variants of one another: a block of 18 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 16 shared lines) · ×1
  • Near-duplicate member family (5 members, 16 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:447-495 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 5 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 15 shared lines) · ×1
  • Near-duplicate member family (5 members, 15 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:72 — lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:72-94 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:135-157 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:159-188 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:194-216 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:222-244 — These 5 members are variants of one another: a block of 15 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 14 shared lines) · ×1
  • Near-duplicate member family (5 members, 14 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:145-193 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:195-243 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:903-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:958-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:198-241 — These 5 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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, 35 shared lines) · ×1
  • Near-duplicate member family (4 members, 35 shared lines) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:77 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:77-340 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:72-265 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:81-339 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:87-387 — These 4 members are variants of one another: a block of 35 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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, 16 shared lines) · ×1
  • Near-duplicate member family (4 members, 16 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:854-903 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:495-553 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:555-613 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:461-520 — These 4 members are variants of one another: a block of 16 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 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, 7 shared lines) · ×1
  • Near-duplicate member family (3 members, 7 shared lines) lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670 — lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:670-726 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:92-151 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:153-213 — These 3 members are variants of one another: a block of 7 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 (200 shared lines) · ×1
  • Near-duplicate member pair (200 shared lines) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:157 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:157-428 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:478-762 — These two members are variants of one another: 200 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 (158 shared lines) · ×1
  • Near-duplicate member pair (158 shared lines) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:77 — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:77-326 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:95-398 — These two members are variants of one another: 158 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 (136 shared lines) · ×1
  • Near-duplicate member pair (136 shared lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:76 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:76-328 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:99-463 — These two members are variants of one another: 136 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (132 shared lines) · ×1
  • Near-duplicate member pair (132 shared lines) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:105 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:105-429 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:109-386 — These two members are variants of one another: 132 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 (97 shared lines) · ×1
  • Near-duplicate member pair (97 shared lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:76 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:76-328 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:77-326 — These two members are variants of one another: 97 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 (90 shared lines) · ×1
  • Near-duplicate member pair (90 shared lines) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:76 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:76-328 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:95-398 — These two members are variants of one another: 90 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 (89 shared lines) · ×1
  • Near-duplicate member pair (89 shared lines) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:99 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:99-463 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:95-525 — These two members are variants of one another: 89 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 (75 shared lines) · ×1
  • Near-duplicate member pair (75 shared lines) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:71 — feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:71-275 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:97-436 — These two members are variants of one another: 75 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 (61 shared lines) · ×1
  • Near-duplicate member pair (61 shared lines) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:81 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:81-200 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt:87-202 — These two members are variants of one another: 61 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (59 shared lines) · ×1
  • Near-duplicate member pair (59 shared lines) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:118 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/FileReorderVerticalList.kt:118-362 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/ImageReorderCarousel.kt:107-358 — These two members are variants of one another: 59 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 (52 shared lines) · ×1
  • Near-duplicate member pair (52 shared lines) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:77 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:77-335 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:77-326 — These two members are variants of one another: 52 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (46 shared lines) · ×1
  • Near-duplicate member pair (46 shared lines) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:654 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:654-785 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:648-778 — These two members are variants of one another: 46 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:45 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:45-128 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:44-117 — 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 (41 shared lines) · ×1
  • Near-duplicate member pair (41 shared lines) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:43 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:43-113 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:43-108 — These two members are variants of one another: 41 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (34 shared lines) · ×1
  • Near-duplicate member pair (34 shared lines) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:73 — lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:73-116 | lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt:54-97 — These two members are variants of one another: 34 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:125 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:125-156 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/DepthParamsSelector.kt:234-265 — 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 (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:216 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:216-248 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/screenLogic/EraseBackgroundComponent.kt:177-211 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:987 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:987-1018 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1020-1051 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Members sharing a duplicated core (68 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (68 members, 50+ identical tokens) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:29 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:29-143 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:33-110 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:152-228 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:230-313 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:315-398 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:400-482 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:484-566 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:568-650 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:652-729 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:731-823 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:825-901 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1278-1362 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1364-1430 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1432-1493 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1530-1623 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1660-1750 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:32-100 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:102-170 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:172-240 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:242-310 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:312-376 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:378-450 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:452-516 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:518-578 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:908-966 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:968-1026 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1028-1096 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1098-1166 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:33-182 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:184-349 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:351-493 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:32-146 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:32-139 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:141-236 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:34-88 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:90-143 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:145-197 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:199-251 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:253-305 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:307-361 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:363-415 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:417-469 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:471-517 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:519-565 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:567-615 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:617-665 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:667-715 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:717-765 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:767-812 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:814-859 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:861-906 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:908-953 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:955-1001 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1003-1049 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1051-1097 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1099-1145 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1147-1197 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1199-1249 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1251-1301 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1303-1353 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1462-1508 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1545-1606 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1612-1652 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1658-1703 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1736-1773 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1775-1814 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1816-1856 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:96-129 — These 68 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 68 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 68 times.
D4 · Code Duplication · Members sharing a duplicated core (9 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (9 members, 50+ identical tokens) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:111 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:111-399 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:119-524 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:91-298 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:122-413 | feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:108-407 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:102-357 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:86-210 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelector.kt:69-202 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelector.kt:72-215 — These 9 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 9 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 9 times.
D4 · Code Duplication · Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (8 members, 50+ identical tokens) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:101 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/selection/ImageExportPresetItems.kt:101-179 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:117-430 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:111-645 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/ColorStopSelection.kt:159-290 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPresetSelector.kt:255-328 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/DownloadedLanguageItem.kt:90-280 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelectorSheetContent.kt:217-289 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FontItem.kt:57-126 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
D4 · Code Duplication · Duplicated block (80–81 lines × 2) · ×1
  • Duplicated block (80–81 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:466 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:466-545 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/utils/DrawUtils.kt:395-475 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/data/AndroidImageDrawApplier.kt:466` it begins part-way through the construct above it, so those 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 (76 lines × 2) · ×1
  • Duplicated block (76 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:340 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:340-415 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:674-749 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:340` it does not close everything it opens, so those 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 (72 lines × 2) · ×1
  • Duplicated block (72 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:233 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:233-304 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:230-301 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.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.
D4 · Code Duplication · Duplicated block (69–70 lines × 2) · ×1
  • Duplicated block (69–70 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:197 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:197-266 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:198-266 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (62–68 lines × 2) · ×1
  • Duplicated block (62–68 lines × 2) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/image_comparison/ImageDiffTool.kt:520 — lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/image_comparison/ImageDiffTool.kt:520-587 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/image_comparison/ImageDiffTool.kt:793-854 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/image_comparison/ImageDiffTool.kt:520` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (59 lines × 6) · ×1
  • Duplicated block (59 lines × 6) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:197 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:197-255 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:424-482 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:133-191 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:167-225 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelector.kt:101-159 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelector.kt:108-166 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:197` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (53–59 lines × 2) · ×1
  • Duplicated block (53–59 lines × 2) feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt:112 — feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt:112-170 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/TextParamsContent.kt:76-128 — before extracting anything, compare `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/TextParamsContent.kt` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:112 — lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:112-170 | lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:277-335 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/gesture/src/main/java/com/t8rin/gesture/TransformGesture.kt:112` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (57 lines × 2) · ×1
  • Duplicated block (57 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_pages/ExtractPagesPdfToolContent.kt:107 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_pages/ExtractPagesPdfToolContent.kt:107-163 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt:88-144 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_pages/ExtractPagesPdfToolContent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/SplitPdfToolContent.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ExtractPagesPdfToolComponent` in one and `SplitPdfToolComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (55 lines × 2) · ×1
  • Duplicated block (55 lines × 2) feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:172 — feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:172-226 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt:182-236 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (51 lines × 2) · ×1
  • Duplicated block (51 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:228 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:228-278 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:237-287 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:228` it begins part-way through the construct above it, so those 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 (50 lines × 2) · ×1
  • Duplicated block (50 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:324 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:324-373 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:320-369 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:324` 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 (49 lines × 2) · ×1
  • Duplicated block (49 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorPicker.kt:210 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorPicker.kt:210-258 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorPicker.kt:330-378 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/color_picker/ColorPicker.kt:210` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (47–48 lines × 2) · ×1
  • Duplicated block (47–48 lines × 2) lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:243 — lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:243-289 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:925-972 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 `lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (46–47 lines × 2) · ×1
  • Duplicated block (46–47 lines × 2) feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:199 — feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:199-244 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/EraseBackgroundEditOption.kt:148-194 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:199` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (44 lines × 2) · ×1
  • Duplicated block (44 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:219 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:219-262 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt:217-260 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:219` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (43 lines × 2) · ×1
  • Duplicated block (43 lines × 2) core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:273 — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:273-315 | core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:598-640 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/data/src/main/java/com/t8rin/imagetoolbox/core/data/saving/AndroidFileController.kt:273` it begins part-way through the construct above it, so those 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 (41–43 lines × 2) · ×1
  • Duplicated block (41–43 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:205 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:205-247 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:217-257 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 116 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:205` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (42 lines × 2) · ×1
  • Duplicated block (42 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:103 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:103-144 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt:105-146 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 118 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (39–42 lines × 2) · ×1
  • Duplicated block (39–42 lines × 2) feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:84 — feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:84-122 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:101-142 — before extracting anything, compare `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt` and `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 262 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `LimitsResizeComponent` in one and `WeightResizeComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:255 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:255-295 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:253-293 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt` as WHOLE FILES: this scan already matched 11 separate duplicated blocks between them, totalling at least 187 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:255` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (38–40 lines × 2) · ×1
  • Duplicated block (38–40 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:253 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:253-290 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt:399-438 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/DrawEditOption.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentControls.kt:253` 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 (40 lines × 2) · ×1
  • Duplicated block (40 lines × 2) lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:172 — lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt:172-211 | lib/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt:172-211 — before extracting anything, compare `lib/cropper/src/main/java/com/t8rin/cropper/image/ImageWithConstraints.kt` and `lib/image/src/main/java/com/t8rin/image/ImageWithConstraints.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 124 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: `Canvas` names `androidx.compose.foundation.Canvas` in one and `androidx.compose.ui.graphics.Canvas` in another — different types that share a simple name, which is why the text matched. A single extracted unit cannot be given a parameter type that fits both, so unifying those types (or introducing a shared abstraction over them) is the step that has to come BEFORE the extraction above; if they are deliberately separate, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (35–38 lines × 3) · ×1
  • Duplicated block (35–38 lines × 3) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:383 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:383-420 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt:190-227 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/DrawPathModeInfoSheet.kt:51-85 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawModeSelector.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:383` it does not close everything it opens, so those 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–38 lines × 2) · ×1
  • Duplicated block (37–38 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/TopAppBarTitle.kt:86 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/TopAppBarTitle.kt:86-122 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/TopAppBarTitle.kt:146-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/text/TopAppBarTitle.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 (38 lines × 2) · ×1
  • Duplicated block (38 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRail.kt:72 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRail.kt:72-109 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRailForFavorites.kt:72-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRail.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.
D4 · Code Duplication · Duplicated block (37 lines × 5) · ×1
  • Duplicated block (37 lines × 5) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:57 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:57-93 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt:57-93 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackingParamsSelector.kt:45-81 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/AnimatedJxlParamsSelector.kt:52-88 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.kt:52-88 — before extracting anything, compare `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifParamsSelector.kt` and `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/components/StackingParamsSelector.kt` as WHOLE FILES: 82% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `onValueChange` to `(ApngParams) -> Unit` in one and `(GifParams) -> Unit` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:131 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:131-167 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:139-175 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:131` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `ImageStitchingComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (35–37 lines × 2) · ×1
  • Duplicated block (35–37 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/components/SignaturePreview.kt:60 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/components/SignaturePreview.kt:60-94 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt:65-101 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/components/SignaturePreview.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 71 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/components/SignaturePreview.kt:60` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `params` to `PdfSignatureParams` in one and `PdfWatermarkParams` 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 (31–36 lines × 2) · ×1
  • Duplicated block (31–36 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:151 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:151-181 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt:155-190 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:151` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/HyperOSSlider.kt:76 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/HyperOSSlider.kt:76-111 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/HyperOSSlider.kt:148-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/HyperOSSlider.kt:76` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35 lines × 4) · ×1
  • Duplicated block (35 lines × 4) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:66 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:66-100 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:147-181 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:77-111 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:160-194 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (35 lines × 3) · ×1
  • Duplicated block (35 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:127 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:127-161 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/AnimatedJxlParamsSelector.kt:120-154 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.kt:101-135 — before extracting anything, compare `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/AnimatedJxlParamsSelector.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/components/WebpParamsSelector.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 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/components/ApngParamsSelector.kt:127` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 (33–35 lines × 2) · ×1
  • Duplicated block (33–35 lines × 2) lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1356 — lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1356-1388 | lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1458-1492 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/curves/src/main/java/com/t8rin/curves/ImageCurvesEditor.kt:1356` 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 (34 lines × 3) · ×1
  • Duplicated block (34 lines × 3) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:108 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:108-141 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:107-140 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:96-129 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:108` 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSlider.kt:62 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSlider.kt:62-95 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSlider.kt:184-217 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:100 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:100-133 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:128-160 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:100` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `FormatConversionComponent` in one and `ResizeAndConvertComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (26–34 lines × 2) · ×1
  • Duplicated block (26–34 lines × 2) lib/documentscanner/src/main/java/com/t8rin/documentscanner/utils/ImageUtil.kt:128 — lib/documentscanner/src/main/java/com/t8rin/documentscanner/utils/ImageUtil.kt:128-161 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/FreeCrop.kt:106-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.
D4 · Code Duplication · Duplicated block (3–34 lines × 4) · ×1
  • Duplicated block (3–34 lines × 4) lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:65 — lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:65-67 | lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:48-81 | lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:48-50 | lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt:58-91 — before extracting anything, compare `lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt` and `lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:48` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:51` calls `toIntOrNull` and `lib/palette/src/main/java/com/t8rin/palette/coders/CorelPainterCoder.kt:68` 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 (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:355 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:355-386 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:480-510 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:355` it does not close everything it opens, so those exact 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 (31 lines × 3) · ×1
  • Duplicated block (31 lines × 3) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:60 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:60-90 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/RectParamsSelector.kt:57-87 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt:62-92 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt` and `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/StarParamsSelector.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 75 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/element/PolygonParamsSelector.kt:60` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (28–31 lines × 2) · ×1
  • Duplicated block (28–31 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:327 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:327-357 | feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/components/ShaderPreview.kt:125-152 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:327` it begins part-way through the construct above it, so those 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 × 2) · ×1
  • Duplicated block (29–31 lines × 2) lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:420 — lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:420-450 | lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:492-520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:420` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:521` calls `checkNotNull` and `lib/collages/src/main/java/com/t8rin/collages/utils/GeometryUtils.kt:451` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (27–30 lines × 2) · ×1
  • Duplicated block (27–30 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:182 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:182-211 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt:202-228 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedSliderItem.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 152 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedRangeSliderItem.kt:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28–29 lines × 3) · ×1
  • Duplicated block (28–29 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:246 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:246-274 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:351-378 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:439-467 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:246` it begins part-way through the construct above it, so those exact 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 (29 lines × 2) · ×1
  • Duplicated block (29 lines × 2) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:220 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:220-248 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/screenLogic/EraseBackgroundComponent.kt:183-211 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.kt:220` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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–29 lines × 2) · ×1
  • Duplicated block (27–29 lines × 2) feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:269 — feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:269-295 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:181-209 — before extracting anything, compare `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/screenLogic/GradientMakerComponent.kt:269` it begins part-way through the construct above it, so those 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–28 lines × 2) · ×1
  • Duplicated block (23–28 lines × 2) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:147 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:147-169 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:150-177 — before extracting anything, compare `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `FormatConversionComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (26–27 lines × 3) · ×1
  • Duplicated block (26–27 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:275 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:275-301 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:381-406 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:468-494 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/buttons/BottomButtonsBlock.kt:275` it begins part-way through the construct above it, so those 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 lines × 4) · ×1
  • Duplicated block (26 lines × 4) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:260 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:260-285 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:241-266 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:208-233 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:358-383 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.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.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:156 — feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:156-181 | feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:148-168 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 77 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:156` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageStackingComponent` in one and `MultiFrameFusionComponent` 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 (24–26 lines × 2) · ×1
  • Duplicated block (24–26 lines × 2) feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguageColumnForSearch.kt:74 — feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguageColumnForSearch.kt:74-99 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguagesColumn.kt:248-271 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/OCRLanguageColumnForSearch.kt:74` 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 (24–25 lines × 4) · ×1
  • Duplicated block (24–25 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:316 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:316-339 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:89-113 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsTopAppBarActions.kt:98-122 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:312-335 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (23–25 lines × 2) · ×1
  • Duplicated block (23–25 lines × 2) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:244 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:244-266 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:388-412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:244` it does not close everything it opens, so those 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–25 lines × 3) · ×1
  • Duplicated block (9–25 lines × 3) feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/WatermarkDataSelector.kt:79 — feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/WatermarkDataSelector.kt:79-103 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/WatermarkDataSelector.kt:107-131 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/WatermarkDataSelector.kt:135-143 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/WatermarkDataSelector.kt:79` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (24–25 lines × 2) · ×1
  • Duplicated block (24–25 lines × 2) lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:330 — lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:330-354 | lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:400-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 `lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt:330` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (23–24 lines × 4) · ×1
  • Duplicated block (23–24 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:265 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:265-288 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:308-330 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:333-355 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/screenLogic/WebpToolsComponent.kt:263-286 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:264` calls `getFramePositions` and `feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/screenLogic/JxlToolsComponent.kt:332` 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 × 4) · ×1
  • Duplicated block (24 lines × 4) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:100 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:100-123 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt:145-168 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:170-193 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:185-208 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/components/PdfPagesRearrangeGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 121 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/components/MetadataEditor.kt:100` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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–24 lines × 3) · ×1
  • Duplicated block (22–24 lines × 3) feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:425 — feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:425-446 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:577-599 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:647-670 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/EditLayerSheet.kt:425` it begins part-way through the construct above it, so those exact 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 (21–24 lines × 2) · ×1
  • Duplicated block (21–24 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/PasswordRequestDialog.kt:99 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/PasswordRequestDialog.kt:99-122 | feature/archive-tools/src/main/java/com/t8rin/imagetoolbox/feature/archive_tools/presentation/components/ArchivePasswordDialog.kt:88-108 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/PasswordRequestDialog.kt:99` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:111 — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:111-134 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationRail.kt:182-204 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainNavigationBar.kt:111` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 (22–23 lines × 6) · ×1
  • Duplicated block (22–23 lines × 6) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:279 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:279-301 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagesPreviewWithSelection.kt:369-390 | feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:177-198 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImage.kt:159-180 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt:276-298 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:199-220 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt` and `feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 256 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:279` it begins part-way through the construct above it, so those 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 × 3) · ×1
  • Duplicated block (22–23 lines × 3) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/DropShadowFilter.kt:85 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/DropShadowFilter.kt:85-106 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/PictureLayerShadowRenderer.kt:107-128 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/data/utils/TextLayerShadowRenderer.kt:90-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/data/model/DropShadowFilter.kt:85` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20–23 lines × 2) · ×1
  • Duplicated block (20–23 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:234 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:234-256 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaSearchAndFilter.kt:167-186 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:234` it begins part-way through the construct above it, so those exact 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 (22–23 lines × 2) · ×1
  • Duplicated block (22–23 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:90 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:90-111 | feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/addEditMaskSheet/AddEditMaskSheetControls.kt:164-186 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note 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 (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) lib/palette/src/main/java/com/t8rin/palette/utils/BytesReader.kt:215 — lib/palette/src/main/java/com/t8rin/palette/utils/BytesReader.kt:215-237 | lib/palette/src/main/java/com/t8rin/palette/utils/BytesReader.kt:241-261 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/utils/BytesReader.kt:215` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:87 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:87-108 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt:107-128 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTripleItem.kt:96-117 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberQuadItem.kt` as WHOLE FILES: 85% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberPairItem.kt:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–22 lines × 2) · ×1
  • Duplicated block (18–22 lines × 2) feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:245 — feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:245-262 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:396-417 — before extracting anything, compare `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt` and `feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 94 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:245` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20–21 lines × 3) · ×1
  • Duplicated block (20–21 lines × 3) feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:749 — feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt:749-769 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:304-323 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:352-371 — before extracting anything, compare `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt` and `feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt` as WHOLE FILES: this scan already matched 12 separate duplicated blocks between them, totalling at least 267 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/collage-maker/src/main/java/com/t8rin/imagetoolbox/collage_maker/presentation/CollageMakerContent.kt: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.
D4 · Code Duplication · Duplicated block (16–21 lines × 2) · ×1
  • Duplicated block (16–21 lines × 2) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:162 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:162-177 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:194-214 — before extracting anything, compare `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:162` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `ResizeAndConvertComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:261 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:261-280 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt:258-278 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/components/PdfPagesRotationGrid.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 195 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/components/PdfPagesRemoveGrid.kt:261` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (20 lines × 5) · ×1
  • Duplicated block (20 lines × 5) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:252 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:252-271 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:219-238 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:217-236 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:265-284 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:369-388 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:252` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (17–20 lines × 4) · ×1
  • Duplicated block (17–20 lines × 4) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:70 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:70-89 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/components/RemoveAnnotationsPreview.kt:51-70 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/components/SignaturePreview.kt:58-74 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt:63-81 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/components/RemoveAnnotationsPreview.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 70 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. Note first that the copies are not typed on the same thing: the declarations holding them bind `params` to `PdfCropParams` in one and `PdfRemoveAnnotationParams` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/components/WatermarkPreview.kt:60` calls `rememberPdfTextStyle`, `asPdfPreviewText` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/components/CropPreview.kt:69` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–20 lines × 3) · ×1
  • Duplicated block (11–20 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:172 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:172-182 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:207-226 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:208-227 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:584 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:584-602 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:334-353 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:571-589 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:584` 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 (20 lines × 3) · ×1
  • Duplicated block (20 lines × 3) lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:205 — lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:205-224 | lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:252-271 | lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:299-318 — 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 `lib/cropper/src/main/java/com/t8rin/cropper/draw/Overlay.kt:205` it does not close everything it opens, so those 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 × 13) · ×1
  • Duplicated block (18–19 lines × 13) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BloomParamsItem.kt:96 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BloomParamsItem.kt:96-113 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:96-113 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:85-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:95-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:95-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:97-114 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:95-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:90-107 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:90-107 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:90-107 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:94-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:77-94 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:83-101 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BloomParamsItem.kt:96` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–19 lines × 7) · ×1
  • Duplicated block (16–19 lines × 7) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:173 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:173-191 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt:134-151 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:140-157 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:173-190 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:159-176 | feature/multi-frame-fusion/src/main/java/com/t8rin/imagetoolbox/feature/multi_frame_fusion/presentation/MultiFrameFusionContent.kt:148-163 | feature/photomosaic/src/main/java/com/t8rin/imagetoolbox/feature/photomosaic/presentation/PhotomosaicContent.kt:164-179 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 57 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `FormatConversionComponent` in one and `ImageCutterComponent` 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 (18–19 lines × 7) · ×1
  • Duplicated block (18–19 lines × 7) feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:250 — feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:250-268 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:217-235 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:215-233 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:291-308 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:339-356 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:263-281 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:367-385 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` and `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 136 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:250` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:290` calls `isNotEmpty` and `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:214` 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 (19 lines × 5) · ×1
  • Duplicated block (19 lines × 5) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CacheAutoClearIntervalSettingItem.kt:88 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CacheAutoClearIntervalSettingItem.kt:88-106 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:87-105 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ShapeTypeSettingItem.kt:93-111 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:93-111 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SwitchTypeSettingItem.kt:98-116 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/CacheAutoClearIntervalSettingItem.kt:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–19 lines × 3) · ×1
  • Duplicated block (16–19 lines × 3) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:166 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:166-181 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:200-218 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:212-228 — before extracting anything, compare `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt` and `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 59 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `ResizeAndConvertComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (18–19 lines × 3) · ×1
  • Duplicated block (18–19 lines × 3) feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:316 — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:316-334 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/IconShapeSettingItem.kt:149-166 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/IconShapeSettingItem.kt:183-200 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/DrawLineStyleSelector.kt:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–19 lines × 2) · ×1
  • Duplicated block (13–19 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:183 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:183-195 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt:192-210 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.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 (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt:60 — feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt:60-78 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/TextParamsContent.kt:61-77 — before extracting anything, compare `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/TextParamsContent.kt` as WHOLE FILES: 87% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/components/selectors/StampParamsContent.kt:60` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–18 lines × 7) · ×1
  • Duplicated block (14–18 lines × 7) feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:159 — feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:159-172 | feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:140-157 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:164-181 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/GradientMakerContent.kt:125-142 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/LimitsResizeContent.kt:153-170 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:163-180 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/WeightResizeContent.kt:173-190 — before extracting anything, compare `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 66 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:159` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CurvesComponent` in one and `DeleteExifComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/curves/src/main/java/com/t8rin/imagetoolbox/feature/curves/presentation/CurvesContent.kt:156` calls `mutableStateOf` and `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:160` 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 (17–18 lines × 6) · ×1
  • Duplicated block (17–18 lines × 6) feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:269 — feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:269-286 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt:250-266 | feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:217-233 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:215-231 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:291-307 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:367-383 — before extracting anything, compare `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt` and `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/FormatConversionContent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 96 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/delete-exif/src/main/java/com/t8rin/imagetoolbox/feature/delete_exif/presentation/DeleteExifContent.kt:269` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:290` calls `isNotEmpty` and `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:214` 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 lines × 6) · ×1
  • Duplicated block (18 lines × 6) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176-193 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:226-243 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:939-956 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:994-1011 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:406-423 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:450-467 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–18 lines × 5) · ×1
  • Duplicated block (16–18 lines × 5) feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:129 — feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:129-144 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt:287-304 | feature/edit-exif/src/main/java/com/t8rin/imagetoolbox/feature/edit_exif/presentation/EditExifContent.kt:144-159 | feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt:296-313 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:203-218 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/DrawContent.kt` and `feature/erase-background/src/main/java/com/t8rin/imagetoolbox/feature/erase_background/presentation/EraseBackgroundContent.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/base64-tools/src/main/java/com/t8rin/imagetoolbox/feature/base64_tools/presentation/Base64ToolsContent.kt:129` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `Base64ToolsComponent` in one and `EditExifComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (18 lines × 4) · ×1
  • Duplicated block (18 lines × 4) feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:211 — feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:211-228 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:323-340 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/DownloadedLanguageItem.kt:107-124 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FontItem.kt:68-85 — there are 4 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 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 `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–18 lines × 4) · ×1
  • Duplicated block (17–18 lines × 4) feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:76 — feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:76-93 | feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt:195-211 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt:205-221 | feature/wallpapers-export/src/main/java/com/t8rin/imagetoolbox/feature/wallpapers_export/presentation/components/WallpapersActionButtons.kt:79-96 — before extracting anything, compare `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/NoiseGenerationContent.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/TextureGenerationContent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageActionButtons.kt:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:373 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:373-387 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:411-428 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 68 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/screenLogic/ApngToolsComponent.kt:373` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) · ×1
  • Duplicated block (17–18 lines × 2) feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:244 — feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:244-261 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SendLogsSettingItem.kt:54-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (14–18 lines × 2) · ×1
  • Duplicated block (14–18 lines × 2) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:207 — feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:207-224 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureSearchSheet.kt:203-216 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:207` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–18 lines × 4) · ×1
  • Duplicated block (4–18 lines × 4) lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:92 — lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:92-95 | lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:99-116 | lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt:73-76 | lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt:80-97 — before extracting anything, compare `lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt` and `lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (14–17 lines × 11) · ×1
  • Duplicated block (14–17 lines × 11) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:50 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:50-63 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatFileModelPairItem.kt:61-74 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatImageModelPairItem.kt:48-61 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBlurEdgeModePairItem.kt:46-59 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberBooleanPairItem.kt:45-58 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberMirrorSidePairItem.kt:46-59 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:46-59 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/FloatPaletteImageModelTripleItem.kt:60-73 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelColorModelTripleItem.kt:54-67 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberColorModelPopArtTripleItem.kt:58-71 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:57-73 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 11 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 11 times. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:50` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/FloatColorModelPairItem.kt:64` calls `onFilterChange`, `toModel` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:74` 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–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:135 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:135-149 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt:137-153 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:135` it does not close everything it opens, so those exact 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–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/CodePreviewContent.kt:93 — feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/CodePreviewContent.kt:93-109 | feature/screenshot-framing/src/main/java/com/t8rin/imagetoolbox/feature/screenshot_framing/presentation/ScreenshotFramingContent.kt:90-102 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/code-preview/src/main/java/com/t8rin/imagetoolbox/feature/code_preview/presentation/CodePreviewContent.kt:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `CodePreviewComponent` in one and `ScreenshotFramingComponent` 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 (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:97 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:97-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:98-113 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SmearParamsItem.kt:92-107 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:118-133 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 84 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ArcParamsItem.kt:97` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–16 lines × 4) · ×1
  • Duplicated block (7–16 lines × 4) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:172 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:172-178 | feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt:207-222 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientSizeSelector.kt:55-69 | feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt:208-223 — before extracting anything, compare `feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/controls/DrawContentNoDataControls.kt` and `feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/presentation/components/MarkupLayersNoDataControls.kt` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 171 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/ColorImageExportDialog.kt:172` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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–16 lines × 2) · ×1
  • Duplicated block (10–16 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:400 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterTemplateInfoSheet.kt:400-409 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/TemplateFilterSelectionItem.kt:70-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:658 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:658-670 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:689-704 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/screenLogic/GifToolsComponent.kt:658` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 (15–16 lines × 2) · ×1
  • Duplicated block (15–16 lines × 2) feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/data/AndroidWatermarkApplier.kt:109 — feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/data/AndroidWatermarkApplier.kt:109-124 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/data/AndroidWatermarkApplier.kt:145-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. Read the line range as the matched WINDOW rather than a finished unit: at `feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/data/AndroidWatermarkApplier.kt:109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 16) · ×1
  • Duplicated block (15 lines × 16) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:88 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:88-102 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BloomParamsItem.kt:98-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ChannelMixParamsItem.kt:98-112 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/ClaheParamsItem.kt:87-101 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/EnhancedZoomBlurParamsItem.kt:97-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GlitchParamsItem.kt:97-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/KaleidoscopeParamsItem.kt:99-113 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt:89-103 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearTiltShiftParamsItem.kt:97-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/PinchParamsItem.kt:92-106 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RadialTiltShiftParamsItem.kt:92-106 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:108-122 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/WaterParamsItem.kt:92-106 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/quad_components/NumberColorModelQuadItem.kt:97-111 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberBlurEdgeModeTripleItem.kt:79-93 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberNumberColorModelTripleItem.kt:86-100 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/LinearGaussianParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 62 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/BilaterialBlurParamsItem.kt:88` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15 lines × 14) · ×1
  • Duplicated block (15 lines × 14) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:374 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:374-388 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:335-349 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:320-334 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:273-287 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:382-396 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:622-636 | feature/app-logs/src/main/java/com/t8rin/imagetoolbox/presentation/app_logs/AppLogsContent.kt:341-355 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:319-333 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:224-238 | feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt:382-396 | feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaPickerGridWithOverlays.kt:341-355 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelectorSheetContent.kt:154-168 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/SettingsContent.kt:642-656 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureSearchSheet.kt:271-285 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:374` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:373` calls `Spacer`, `weight` and `feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:621` 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 (14–15 lines × 6) · ×1
  • Duplicated block (14–15 lines × 6) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:132 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:132-145 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:203-216 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:65-79 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:146-160 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:76-90 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:159-173 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M2Slider.kt:65` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/M3Slider.kt:73` calls `padding` and `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sliders/FancySlider.kt:129` 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 (15 lines × 5) · ×1
  • Duplicated block (15 lines × 5) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:316 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:316-330 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt:89-103 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsTopAppBarActions.kt:98-112 | feature/load-net-image/src/main/java/com/t8rin/imagetoolbox/feature/load_net_image/presentation/components/LoadNetImageTopAppBarActions.kt:95-109 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:312-326 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsTopAppBarActions.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 60 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:316` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:268 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:268-282 | feature/shader-studio/src/main/java/com/t8rin/imagetoolbox/feature/shader_studio/presentation/components/ShaderPreview.kt:98-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/OtherContent.kt:268` it begins part-way through the construct above it, so those 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 (14 lines × 6) · ×1
  • Duplicated block (14 lines × 6) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:266 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:266-279 | feature/ai-tools/src/main/java/com/t8rin/imagetoolbox/feature/ai_tools/presentation/components/NeuralModelsColumn.kt:231-244 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/ColorStopSelection.kt:183-196 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/DownloadedLanguageItem.kt:127-140 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelectorSheetContent.kt:269-282 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FontItem.kt:88-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 6 times. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/dialogs/OneTimeSaveLocationSelectionDialog.kt:266` it begins part-way through the construct above it, so those 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 × 4) · ×1
  • Duplicated block (13–14 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:658 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:658-671 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.kt:116-128 | feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientMakerNoDataControls.kt:129-141 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:645-658 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsNoDataControls.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 `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:658` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:672` calls `Spacer`, `height`, `preference6` and `feature/gradient-maker/src/main/java/com/t8rin/imagetoolbox/feature/gradient_maker/presentation/components/GradientMakerNoDataControls.kt:142` 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 × 12) · ×1
  • Duplicated block (12–13 lines × 12) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156-167 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:206-217 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:257-268 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:458-469 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:766-777 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:682-694 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:914-925 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:969-980 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:302-313 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:347-358 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:392-403 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:534-545 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:168` calls `listOf` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:778` 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–13 lines × 8) · ×1
  • Duplicated block (12–13 lines × 8) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:366 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:366-378 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:327-339 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:312-324 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:265-277 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:374-386 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelectorSheetContent.kt:116-127 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelectorSheetContent.kt:146-158 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureSearchSheet.kt:263-275 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:366` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 lines × 7) · ×1
  • Duplicated block (13 lines × 7) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:117 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:117-129 | feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt:153-165 | feature/image-stacking/src/main/java/com/t8rin/imagetoolbox/feature/image_stacking/presentation/ImageStackingContent.kt:136-148 | feature/image-stitch/src/main/java/com/t8rin/imagetoolbox/feature/image_stitch/presentation/ImageStitchingContent.kt:144-156 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/ResizeAndConvertContent.kt:177-189 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/SingleEditContent.kt:189-201 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/WatermarkingContent.kt:149-161 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt` and `feature/image-splitting/src/main/java/com/t8rin/imagetoolbox/image_splitting/presentation/ImageSplitterContent.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 120 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/ImageCutterContent.kt:117` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `ImageCutterComponent` in one and `ImageStackingComponent` 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 (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:364 — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:364-376 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifToolsImagePreview.kt:45-57 | feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsBitmapPreview.kt:60-72 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:360-372 — before extracting anything, compare `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt` and `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt` as WHOLE FILES: this scan already matched 17 separate duplicated blocks between them, totalling at least 317 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:364` it does not close everything it opens, so those 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–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:61 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:61-73 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:74-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:61` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/pair_components/NumberTransferFuncPairItem.kt:60` calls `onFilterChange` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/triple_components/NumberTransferFuncBlurEdgeModeTripleItem.kt:73` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6–13 lines × 4) · ×1
  • Duplicated block (6–13 lines × 4) feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:77 — feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:77-89 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:95-107 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:112-117 | feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:130-135 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:77` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:95` calls `padding` and `feature/cipher/src/main/java/com/t8rin/imagetoolbox/feature/cipher/presentation/components/CipherTipSheet.kt:112` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–12 lines × 11) · ×1
  • Duplicated block (9–12 lines × 11) lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:366 — lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:366-374 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:538-547 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:587-598 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:620-631 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:667-676 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:698-709 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:773-784 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:850-861 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:925-934 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1002-1013 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:1081-1092 — all 11 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:366` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 7) · ×1
  • Duplicated block (11–12 lines × 7) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211-221 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:306-316 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:463-473 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:687-698 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:919-929 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:974-984 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:209-219 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 6) · ×1
  • Duplicated block (11–12 lines × 6) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:265 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:265-275 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:492-502 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/GmicCommandsInfoSheet.kt:209-219 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:201-211 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelector.kt:169-180 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelector.kt:176-187 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:265` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12 lines × 6) · ×1
  • Duplicated block (12 lines × 6) feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:96 — feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:96-107 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:116-127 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:136-147 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:156-167 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:179-190 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt:202-213 — 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 `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.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.
D4 · Code Duplication · Duplicated block (9–12 lines × 4) · ×1
  • Duplicated block (9–12 lines × 4) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:113 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:113-121 | feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt:109-120 | feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/components/NoiseParamsSelection.kt:57-68 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:109-120 — before extracting anything, compare `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt` and `feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/components/GifMergeControls.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 93 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/controls/AnimationMergeControls.kt:113` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/noise-generation/src/main/java/com/t8rin/imagetoolbox/noise_generation/presentation/components/NoiseParamsSelection.kt:69` calls `ProvideContainerDefaults` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/TextureParamsSelection.kt:121` 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 (12 lines × 4) · ×1
  • Duplicated block (12 lines × 4) feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:119 — feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:119-130 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ShapeTypeSettingItem.kt:147-158 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt:128-139 | feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SwitchTypeSettingItem.kt:133-144 — before extracting anything, compare `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/SliderTypeSettingItem.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note first that the copies are not typed on the same thing: the declarations holding them bind `shape` to `Shape = ShapeDefaults.center` in one and `Shape = ShapeDefaults.top` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/ShapeTypeSettingItem.kt:160` calls `Icon` and `feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/FlingTypeSettingItem.kt:131` 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 × 4) · ×1
  • Duplicated block (11–12 lines × 4) feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:48 — feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:48-59 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/FbmParams.kt:44-54 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/MarbleParams.kt:38-49 | feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt:62-72 — before extracting anything, compare `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt` and `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/WoodParams.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 40 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/texture-generation/src/main/java/com/t8rin/imagetoolbox/texture_generation/presentation/components/CellularParams.kt:48` it begins part-way through the construct above it, so those exact 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 × 3) · ×1
  • Duplicated block (10–12 lines × 3) core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/OneUISwitch.kt:248 — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/OneUISwitch.kt:248-257 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/OneUISwitch.kt:269-280 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/OneUISwitch.kt:293-302 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/switches/OneUISwitch.kt:248` it does not close everything it opens, so those exact 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) lib/palette/src/main/java/com/t8rin/palette/coders/ACTPaletteCoder.kt:42 — lib/palette/src/main/java/com/t8rin/palette/coders/ACTPaletteCoder.kt:42-51 | lib/palette/src/main/java/com/t8rin/palette/coders/RIFFPaletteCoder.kt:61-72 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `lib/palette/src/main/java/com/t8rin/palette/coders/ACTPaletteCoder.kt:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 16) · ×1
  • Duplicated block (11 lines × 16) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:152 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:152-162 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:202-212 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:253-263 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:454-464 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:558-568 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:762-772 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:505-515 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:565-575 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:678-688 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:910-920 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:965-975 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:298-308 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:343-353 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:388-398 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:484-494 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:530-540 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:152` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 6) · ×1
  • Duplicated block (11 lines × 6) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:172 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:172-182 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:882-892 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:935-945 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:990-1000 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:225-235 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:446-456 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:172` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:321 — feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:321-331 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:444-454 | feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:764-774 | feature/watermarking/src/main/java/com/t8rin/imagetoolbox/feature/watermarking/presentation/screenLogic/WatermarkingComponent.kt:460-470 — before extracting anything, compare `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 55 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/image-cutting/src/main/java/com/t8rin/imagetoolbox/image_cutting/presentation/screenLogic/ImageCutterComponent.kt:321` it begins part-way through the construct above it, so those 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–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:132 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:132-142 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FilterEditOption.kt:164-172 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/components/FiltersContentControls.kt:132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:126 — feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:126-134 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:142-151 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:165-173 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:181-190 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:204-212 | feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:220-229 — 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 `feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt:126` it does not close everything it opens, so those exact 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 lines × 4) · ×1
  • Duplicated block (10 lines × 4) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:118 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:118-127 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:132-141 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt:127-136 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/VoronoiCrystallizeParamsItem.kt:138-147 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/SparkleParamsItem.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 47 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/filterItem/RubberStampParamsItem.kt:118` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/contact_sheet/PdfContactSheetToolContent.kt:52 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/contact_sheet/PdfContactSheetToolContent.kt:52-59 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/images_to_pdf/ImagesToPdfToolContent.kt:46-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 `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/contact_sheet/PdfContactSheetToolContent.kt:52` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `component` to `PdfContactSheetToolComponent` in one and `ImagesToPdfToolComponent` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (9 lines × 144) · ×1
  • Duplicated block (9 lines × 144) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:43 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:43-51 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:57-65 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:71-79 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:85-93 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:99-107 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:113-121 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:126-134 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:49-57 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:65-73 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:81-89 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:168-176 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:209-217 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:246-254 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:262-270 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:278-286 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:294-302 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:331-339 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:347-355 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:363-371 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:379-387 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:416-424 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:432-440 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:448-456 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:500-508 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:516-524 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:532-540 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:584-592 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:600-608 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:616-624 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:668-676 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:684-692 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:700-708 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:749-757 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:767-775 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:785-793 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:803-811 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:839-847 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:853-861 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:867-875 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:881-889 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1294-1302 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1310-1318 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1326-1334 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1342-1350 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1550-1558 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1570-1578 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1590-1598 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1678-1686 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1696-1704 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1714-1722 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:48-56 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:64-72 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:80-88 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:118-126 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:134-142 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:150-158 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:188-196 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:204-212 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:220-228 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:258-266 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:274-282 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:290-298 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:326-334 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:342-350 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:356-364 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:396-404 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:412-420 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:430-438 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:468-476 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:484-492 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:498-506 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:532-540 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:546-554 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:560-568 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1044-1052 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1060-1068 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1076-1084 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1114-1122 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1130-1138 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1146-1154 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:49-57 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:65-73 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:81-89 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:97-105 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:113-121 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:129-137 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:145-153 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:161-169 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:202-210 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:218-226 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:236-244 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:252-260 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:270-278 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:286-294 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:304-312 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:320-328 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:367-375 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:383-391 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:399-407 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:415-423 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:431-439 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:447-455 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:463-471 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:48-56 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:62-70 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:78-86 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:94-102 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:107-115 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:122-130 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:50-58 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:66-74 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:82-90 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:100-108 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:117-125 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:155-163 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:169-177 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:185-193 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:201-209 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:216-224 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:66-74 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:177-185 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:231-239 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:285-293 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:339-347 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:395-403 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:451-459 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:499-507 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:547-555 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:597-605 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:647-655 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:697-705 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:747-755 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:792-800 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:839-847 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:886-894 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:933-941 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:983-991 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1031-1039 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1079-1087 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1127-1135 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1179-1187 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1231-1239 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1283-1291 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1335-1343 — there are 144 copies across 7 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 144 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:746` calls `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:41` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–9 lines × 27) · ×1
  • Duplicated block (8–9 lines × 27) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:52 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:52-59 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:108-116 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:125-132 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:163-170 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:217-224 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:271-278 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:325-332 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:381-388 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:433-440 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:487-494 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:535-542 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:583-590 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:633-640 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:683-690 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:733-740 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:778-785 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:825-832 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:872-879 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:919-926 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:971-978 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1019-1026 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1067-1074 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1115-1122 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1165-1172 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1217-1224 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1269-1276 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1321-1328 — all 27 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:61` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:497` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9 lines × 14) · ×1
  • Duplicated block (9 lines × 14) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:149 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:149-157 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:199-207 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:451-459 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:759-767 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:859-867 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:502-510 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:562-570 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:907-915 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:962-970 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:295-303 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:340-348 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:385-393 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:481-489 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:466-474 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 9) · ×1
  • Duplicated block (9 lines × 9) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:471 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:471-479 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:570-578 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:696-704 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:927-935 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:982-990 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:217-225 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:438-446 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:112-120 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:486-494 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:471` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (9 lines × 8) · ×1
  • Duplicated block (9 lines × 8) core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:206 — core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:206-214 | core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt:433-441 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/AddExifSheet.kt:142-150 | core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/sheets/ProcessImagesPreferenceSheet.kt:176-184 | feature/color-library/src/main/java/com/t8rin/imagetoolbox/color_library/presentation/ColorLibraryContent.kt:170-180 | feature/help/src/main/java/com/t8rin/imagetoolbox/feature/help/presentation/components/HelpScaffold.kt:146-156 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/PaddleOCRModelSelector.kt:110-118 | feature/recognize-text/src/main/java/com/t8rin/imagetoolbox/feature/recognize/text/presentation/components/RecognizeLanguageSelector.kt:117-125 — before extracting anything, compare `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt` and `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/addFilters/AddFiltersSheet.kt` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 157 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `core/filters/src/main/java/com/t8rin/imagetoolbox/core/filters/presentation/widget/FilterSelectionCubeLutBottomContent.kt:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–9 lines × 8) · ×1
  • Duplicated block (7–9 lines × 8) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:147 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:147-155 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:197-205 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:449-457 | lib/collages/src/main/java/com/t8rin/collages/frames/ExtendedFrameImage.kt:203-209 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:905-913 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:960-968 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:338-346 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:383-391 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:147` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:164 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:164-172 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:179-185 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:190-198 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:164` it does not close everything it opens, so those 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–9 lines × 2) · ×1
  • Duplicated block (6–9 lines × 2) feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:280 — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:280-285 | feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt:663-671 — before extracting anything, compare `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt` and `feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 182 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:280` it does not close everything it opens, so those exact 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 × 148) · ×1
  • Duplicated block (8 lines × 148) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:45 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:45-52 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:59-66 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:73-80 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:87-94 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:101-108 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:115-122 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:128-135 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:51-58 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:67-74 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:83-90 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:170-177 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:195-202 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:211-218 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:248-255 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:264-271 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:280-287 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:296-303 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:333-340 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:349-356 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:365-372 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:381-388 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:418-425 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:434-441 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:450-457 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:502-509 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:518-525 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:534-541 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:586-593 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:602-609 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:618-625 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:670-677 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:686-693 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:702-709 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:751-758 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:769-776 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:787-794 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:805-812 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:841-848 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:855-862 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:869-876 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:883-890 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1296-1303 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1312-1319 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1328-1335 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1344-1351 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1552-1559 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1572-1579 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1592-1599 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1680-1687 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1698-1705 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1716-1723 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:50-57 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:66-73 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:82-89 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:120-127 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:136-143 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:152-159 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:190-197 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:206-213 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:222-229 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:260-267 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:276-283 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:292-299 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:328-335 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:344-351 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:358-365 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:398-405 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:414-421 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:432-439 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:470-477 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:486-493 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:500-507 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:534-541 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:548-555 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:562-569 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:919-926 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:946-953 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:997-1004 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1046-1053 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1062-1069 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1078-1085 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1116-1123 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1132-1139 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1148-1155 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:51-58 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:67-74 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:83-90 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:99-106 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:115-122 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:131-138 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:147-154 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:163-170 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:204-211 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:220-227 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:238-245 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:254-261 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:272-279 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:288-295 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:306-313 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:322-329 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:369-376 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:385-392 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:401-408 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:417-424 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:433-440 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:449-456 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:465-472 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:50-57 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:64-71 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:80-87 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:96-103 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:109-116 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:124-131 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:52-59 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:68-75 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:84-91 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:102-109 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:119-126 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:157-164 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:171-178 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:187-194 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:203-210 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:218-225 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:68-75 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:179-186 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:233-240 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:287-294 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:341-348 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:397-404 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:453-460 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:501-508 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:549-556 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:599-606 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:649-656 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:699-706 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:749-756 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:794-801 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:841-848 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:888-895 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:935-942 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:985-992 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1033-1040 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1081-1088 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1129-1136 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1181-1188 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1233-1240 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1285-1292 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1337-1344 — there are 148 copies across 7 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 148 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:60` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:55` 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 (8 lines × 40) · ×1
  • Duplicated block (8 lines × 40) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:31 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:31-38 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:35-42 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:154-161 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:232-239 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:317-324 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:402-409 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:486-493 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:570-577 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:654-661 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:733-740 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:827-834 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1280-1287 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1532-1539 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1662-1669 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:34-41 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:104-111 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:174-181 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:244-251 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:314-321 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:380-387 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:454-461 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:520-527 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:970-977 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1030-1037 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1100-1107 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:35-42 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:186-193 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:353-360 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:34-41 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:34-41 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:143-150 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:92-99 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:957-964 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1005-1012 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1053-1060 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1101-1108 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1149-1156 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1201-1208 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1253-1260 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1305-1312 — there are 40 copies across 7 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 40 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:44` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 34) · ×1
  • Duplicated block (7–8 lines × 34) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:97 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:97-103 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:184-190 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:464-470 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:548-554 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:632-638 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:716-722 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1610-1616 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:935-941 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:986-992 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1013-1019 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:479-485 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:50-56 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:106-113 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:123-129 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:161-167 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:215-221 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:269-275 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:323-329 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:379-385 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:431-437 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:485-491 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:533-539 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:581-587 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:631-637 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:681-687 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:731-737 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:969-975 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1017-1023 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1065-1071 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1113-1119 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1163-1169 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1215-1221 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1267-1273 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1319-1325 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:932` calls `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:94` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 13) · ×1
  • Duplicated block (8 lines × 13) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:36 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:36-43 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:147-154 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:201-208 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:255-262 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:309-316 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:365-372 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:419-426 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:473-480 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:521-528 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:569-576 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:619-626 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:669-676 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:719-726 — all 13 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:45` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:429` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 11) · ×1
  • Duplicated block (8 lines × 11) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:191 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:191-198 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:915-922 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:942-949 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:993-1000 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:774-781 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:821-828 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:868-875 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:915-922 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1786-1793 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1799-1806 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:109-116 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (8 lines × 10) · ×1
  • Duplicated block (8 lines × 10) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:468 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:468-475 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:567-574 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:692-700 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:924-931 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:979-986 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:214-221 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:435-442 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:48-55 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:109-116 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:483-490 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:468` it begins part-way through the construct above it, so those 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 × 9) · ×1
  • Duplicated block (8 lines × 9) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211-218 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:306-313 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:463-470 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:687-695 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:919-926 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:974-981 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:209-216 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:166-173 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:539-546 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 9) · ×1
  • Duplicated block (7–8 lines × 9) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:104 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:104-110 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:723-729 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1617-1623 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1744-1750 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1020-1026 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:486-493 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1600-1606 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1808-1814 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:123-129 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:104` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (6–7 lines × 188) · ×1
  • Duplicated block (6–7 lines × 188) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:34 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:34-39 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:47-53 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:61-67 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:75-81 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:89-95 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:103-109 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:117-123 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:130-136 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:38-43 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:53-59 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:69-75 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:85-91 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:157-162 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:172-178 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:197-203 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:213-219 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:235-240 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:250-256 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:266-272 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:282-288 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:298-304 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:320-325 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:335-341 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:351-357 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:367-373 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:383-389 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:405-410 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:420-426 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:436-442 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:452-458 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:489-494 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:504-510 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:520-526 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:536-542 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:573-578 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:588-594 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:604-610 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:620-626 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:657-662 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:672-678 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:688-694 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:704-710 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:736-741 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:753-759 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:771-777 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:789-795 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:807-813 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:830-835 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:843-849 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:857-863 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:871-877 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:885-891 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1283-1288 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1298-1304 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1314-1320 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1330-1336 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1346-1352 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1535-1540 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1554-1560 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1574-1580 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1594-1600 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1665-1670 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1682-1688 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1700-1706 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1718-1724 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:37-42 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:52-58 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:68-74 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:84-90 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:107-112 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:122-128 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:138-144 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:154-160 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:177-182 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:192-198 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:208-214 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:224-230 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:247-252 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:262-268 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:278-284 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:294-300 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:317-322 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:330-336 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:346-352 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:360-366 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:383-388 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:400-406 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:416-422 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:434-440 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:457-462 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:472-478 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:488-494 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:502-508 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:523-528 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:536-542 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:550-556 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:564-570 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:921-927 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:948-954 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:973-978 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:999-1005 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1033-1038 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1048-1054 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1064-1070 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1080-1086 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1103-1108 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1118-1124 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1134-1140 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1150-1156 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:38-43 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:53-59 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:69-75 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:85-91 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:101-107 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:117-123 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:133-139 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:149-155 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:165-171 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:189-194 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:206-212 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:222-228 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:240-246 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:256-262 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:274-280 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:290-296 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:308-314 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:324-330 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:356-361 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:371-377 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:387-393 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:403-409 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:419-425 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:435-441 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:451-457 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:467-473 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:37-42 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:52-58 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:66-72 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:82-88 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:98-104 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:111-117 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:126-132 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:37-42 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:54-60 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:70-76 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:86-92 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:104-110 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:121-127 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:146-151 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:159-165 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:173-179 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:189-195 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:205-211 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:220-226 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:70-76 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:95-100 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:181-187 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:235-241 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:289-295 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:343-349 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:399-405 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:455-461 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:503-509 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:551-557 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:601-607 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:651-657 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:701-707 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:751-757 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:796-802 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:843-849 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:890-896 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:937-943 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:960-965 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:987-993 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1008-1013 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1035-1041 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1056-1061 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1083-1089 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1104-1109 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1131-1137 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1152-1157 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1183-1189 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1204-1209 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1235-1241 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1256-1261 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1287-1293 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1308-1313 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1339-1345 — there are 188 copies across 7 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 188 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:44` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:41` 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 (6–7 lines × 40) · ×1
  • Duplicated block (6–7 lines × 40) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:39 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:39-44 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:54-60 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:111-117 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:127-133 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:150-155 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:165-171 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:204-209 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:219-225 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:258-263 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:273-279 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:312-317 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:327-333 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:368-373 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:383-389 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:422-427 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:435-441 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:476-481 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:489-495 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:524-529 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:537-543 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:572-577 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:585-591 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:622-627 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:635-641 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:672-677 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:685-691 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:722-727 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:735-741 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:780-786 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:827-833 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:874-880 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:921-927 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:973-979 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1021-1027 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1069-1075 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1117-1123 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1167-1173 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1219-1225 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1271-1277 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1323-1329 — all 40 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:45` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:429` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 24) · ×1
  • Duplicated block (7 lines × 24) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:99 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:99-105 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:186-192 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:466-472 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:550-556 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:634-640 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:718-724 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1379-1385 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1392-1398 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1405-1411 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1446-1452 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1458-1464 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1470-1476 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1612-1618 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:937-943 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:988-994 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1015-1021 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:481-487 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1479-1485 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1595-1601 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1627-1633 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1750-1756 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1803-1809 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1831-1837 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:113-119 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1592` calls `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:98` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 15) · ×1
  • Duplicated block (7 lines × 15) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216-222 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:311-317 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:468-474 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:567-573 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:815-821 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:692-699 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:924-930 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:979-985 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:214-220 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:435-441 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:447-453 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:545-551 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:48-54 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:109-115 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:483-489 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:216` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 11) · ×1
  • Duplicated block (7 lines × 11) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171-177 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:478-484 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:881-887 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:590-597 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:703-710 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:934-940 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:989-995 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:224-230 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:362-368 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:445-451 | lib/collages/src/main/java/com/t8rin/collages/frames/TenFrameImage.kt:119-125 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:171` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275-281 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:331-337 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:884-890 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:275` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1780 — lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1780-1785 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1792-1798 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 179) · ×1
  • Duplicated block (6 lines × 179) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:43 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:43-48 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:57-62 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:71-76 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:85-90 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:99-104 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:113-118 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:126-131 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:49-54 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:65-70 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:81-86 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:97-102 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:168-173 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:184-189 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:209-214 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:246-251 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:262-267 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:278-283 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:294-299 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:331-336 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:347-352 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:363-368 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:379-384 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:416-421 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:432-437 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:448-453 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:464-469 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:500-505 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:516-521 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:532-537 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:548-553 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:584-589 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:600-605 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:616-621 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:632-637 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:668-673 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:684-689 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:700-705 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:716-721 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:749-754 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:767-772 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:785-790 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:803-808 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:839-844 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:853-858 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:867-872 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:881-886 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1294-1299 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1310-1315 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1326-1331 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1342-1347 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1550-1555 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1570-1575 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1590-1595 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1610-1615 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1678-1683 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1696-1701 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1714-1719 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1732-1737 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:48-53 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:64-69 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:80-85 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:118-123 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:134-139 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:150-155 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:188-193 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:204-209 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:220-225 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:258-263 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:274-279 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:290-295 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:326-331 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:342-347 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:356-361 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:396-401 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:412-417 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:430-435 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:468-473 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:484-489 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:498-503 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:532-537 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:546-551 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:560-565 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:935-940 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:986-991 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1013-1018 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1044-1049 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1060-1065 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1076-1081 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1114-1119 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1130-1135 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1146-1151 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:49-54 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:65-70 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:81-86 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:97-102 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:113-118 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:129-134 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:145-150 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:161-166 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:202-207 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:218-223 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:236-241 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:252-257 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:270-275 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:286-291 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:304-309 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:320-325 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:367-372 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:383-388 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:399-404 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:415-420 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:431-436 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:447-452 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:463-468 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:479-484 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:48-53 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:62-67 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:78-83 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:94-99 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:107-112 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:122-127 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:50-55 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:66-71 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:82-87 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:100-105 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:117-122 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:155-160 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:169-174 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:185-190 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:201-206 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:216-221 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:50-55 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:66-71 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:106-112 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:123-128 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:161-166 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:177-182 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:215-220 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:231-236 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:269-274 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:285-290 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:323-328 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:339-344 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:379-384 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:395-400 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:431-436 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:451-456 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:485-490 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:499-504 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:533-538 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:547-552 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:581-586 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:597-602 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:631-636 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:647-652 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:681-686 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:697-702 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:731-736 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:747-752 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:792-797 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:839-844 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:886-891 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:933-938 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:969-974 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:983-988 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1017-1022 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1031-1036 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1065-1070 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1079-1084 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1113-1118 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1127-1132 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1163-1168 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1179-1184 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1215-1220 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1231-1236 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1267-1272 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1283-1288 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1319-1324 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1335-1340 — there are 179 copies across 7 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 179 sites; resolving a subset leaves the remainder to drift apart. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:47` calls `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:41` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 5) · ×1
  • Duplicated block (6 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:481 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:481-486 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:782-787 | lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:843-848 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:706-712 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:365-370 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt` as WHOLE FILES: this scan already matched 37 separate duplicated blocks between them, totalling at least 349 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:481` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:480` calls `listOf` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:781` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:170 — lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:170-175 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:183-188 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:239-244 | lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:251-256 — 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 `lib/palette/src/main/java/com/t8rin/palette/coders/CPLPaletteCoder.kt:170` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (2–6 lines × 4) · ×1
  • Duplicated block (2–6 lines × 4) lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:91 — lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt:91-96 | lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:75-77 | lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt:101-106 | lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:93-94 — before extracting anything, compare `lib/palette/src/main/java/com/t8rin/palette/coders/HPLPaletteCoder.kt` and `lib/palette/src/main/java/com/t8rin/palette/coders/PaintShopProPaletteCoder.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 46 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/palette/src/main/java/com/t8rin/palette/coders/VGA24BitPaletteCoder.kt:93` calls `coerceIn`, `toInt` and `lib/palette/src/main/java/com/t8rin/palette/coders/KOfficePaletteCoder.kt:75` 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 × 177) · ×1
  • Duplicated block (5 lines × 177) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:41 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:41-46 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:57-62 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:73-78 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:89-94 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:160-165 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:176-181 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:201-206 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:217-221 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:238-243 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:254-259 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:270-275 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:286-291 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:302-306 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:323-328 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:339-344 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:355-360 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:371-376 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:387-391 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:408-413 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:424-429 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:440-445 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:456-461 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:471-475 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:492-497 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:508-513 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:524-529 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:540-545 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:555-559 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:576-581 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:592-597 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:608-613 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:624-629 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:639-643 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:660-665 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:676-681 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:692-697 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:708-713 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:740-745 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:758-763 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:776-781 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:794-799 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:811-816 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:889-894 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1286-1291 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1302-1307 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1318-1323 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1334-1339 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1350-1355 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1540-1545 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1560-1565 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1580-1585 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1600-1605 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1669-1674 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1687-1692 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1705-1710 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1723-1728 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:40-45 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:56-61 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:72-77 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:88-93 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:110-115 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:126-131 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:142-147 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:158-163 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:180-185 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:196-201 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:212-217 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:228-233 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:250-255 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:266-271 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:282-287 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:298-303 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:334-339 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:364-369 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:387-392 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:404-409 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:421-426 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:438-443 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:460-465 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:476-481 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:926-931 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:953-958 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:977-982 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1004-1009 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1036-1041 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1052-1057 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1068-1073 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1084-1089 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1106-1111 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1122-1127 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1138-1143 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1154-1159 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:41-46 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:57-62 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:73-78 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:89-94 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:105-110 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:121-126 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:137-142 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:153-158 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:169-174 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:193-198 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:210-215 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:227-232 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:244-249 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:261-266 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:278-283 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:295-300 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:312-317 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:332-337 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:359-364 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:375-380 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:391-396 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:407-412 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:423-428 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:439-444 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:455-460 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:471-476 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:40-45 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:70-75 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:86-91 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:115-119 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:132-136 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:41-46 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:58-63 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:74-79 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:91-96 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:109-113 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:126-130 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:177-182 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:193-198 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:209-213 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:224-228 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:42-47 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:58-63 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:75-80 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:98-103 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:115-120 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:131-136 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:153-158 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:169-174 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:185-190 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:207-212 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:223-228 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:239-244 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:261-266 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:277-282 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:293-298 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:315-320 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:331-336 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:348-353 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:371-376 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:387-392 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:403-408 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:441-446 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:589-594 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:639-644 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:689-694 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:739-744 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:784-789 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:800-805 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:831-836 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:847-852 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:878-883 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:894-899 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:925-930 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:941-946 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1155-1160 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1171-1176 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1207-1212 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1223-1228 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1259-1264 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1275-1280 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1311-1316 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1327-1332 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1557-1562 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1581-1586 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:739` calls `add`, `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:40` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 52) · ×1
  • Duplicated block (5 lines × 52) lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:139 — lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:139-143 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:224-228 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:309-313 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:394-398 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:478-482 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:562-566 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:646-650 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:819-823 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:897-901 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1358-1362 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:96-100 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:166-170 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:236-240 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:306-310 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:372-376 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:446-450 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:512-516 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:574-578 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:962-966 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1092-1096 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1162-1166 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:177-182 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:344-349 | lib/collages/src/main/java/com/t8rin/collages/frames/SevenFrameImage.kt:141-146 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:134-139 | lib/collages/src/main/java/com/t8rin/collages/frames/SixFrameImage.kt:231-236 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:84-88 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:139-143 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:193-197 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:247-251 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:301-305 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:357-361 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:411-415 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:465-469 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:513-517 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:561-565 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:611-615 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:661-665 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:711-715 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:761-765 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:808-812 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:855-859 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:902-906 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:949-953 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:997-1001 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1045-1049 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1093-1097 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1141-1145 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1193-1197 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1245-1249 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1297-1301 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1349-1353 — there are 52 copies across 7 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 52 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:139` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:222` calls `PointF` and `lib/collages/src/main/java/com/t8rin/collages/frames/EightFrameImage.kt:137` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 37) · ×1
  • Duplicated block (5 lines × 37) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:102 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:102-106 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:189-193 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:469-473 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:553-557 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:637-641 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:721-725 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1369-1373 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1382-1386 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1395-1399 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1408-1412 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1437-1441 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1449-1453 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1461-1465 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1473-1477 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1615-1619 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:913-917 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:940-944 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:991-995 | lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt:1018-1022 | lib/collages/src/main/java/com/t8rin/collages/frames/NineFrameImage.kt:484-488 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:772-776 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:819-823 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:866-870 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:913-917 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1467-1471 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1482-1486 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1598-1602 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1617-1621 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1630-1634 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1680-1684 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1741-1745 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1753-1757 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1806-1810 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1821-1825 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1834-1838 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:102-106 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:116-120 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/FourFrameImage.kt` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (5 lines × 10) · ×1
  • Duplicated block (5 lines × 10) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1371 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1371-1375 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1384-1388 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1397-1401 | lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1410-1414 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1619-1623 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1632-1636 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1667-1671 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1682-1686 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1823-1827 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1836-1840 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1744 — lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt:1744-1748 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1786-1790 | lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt:1799-1803 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:109-113 | lib/collages/src/main/java/com/t8rin/collages/frames/TwoFrameImage.kt:123-127 — before extracting anything, compare `lib/collages/src/main/java/com/t8rin/collages/frames/FiveFrameImage.kt` and `lib/collages/src/main/java/com/t8rin/collages/frames/ThreeFrameImage.kt` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 117 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:338 — feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:338-344 | feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt:288-294 | feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt:195-201 | feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:204-210 — before extracting anything, compare `feature/format-conversion/src/main/java/com/t8rin/imagetoolbox/feature/format_conversion/presentation/screenLogic/FormatConversionComponent.kt` and `feature/limits-resize/src/main/java/com/t8rin/imagetoolbox/feature/limits_resize/presentation/screenLogic/LimitsResizeComponent.kt` as WHOLE FILES: this scan already matched 4 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `feature/weight-resize/src/main/java/com/t8rin/imagetoolbox/feature/weight_resize/presentation/screenLogic/WeightResizeComponent.kt:212` calls `setSaveIfSmaller` and `feature/filters/src/main/java/com/t8rin/imagetoolbox/feature/filters/presentation/screenLogic/FiltersComponent.kt:346` 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 × 29) · ×1
  • Duplicated block (10 lines × 29) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compare/screenLogic/ComparePdfToolComponent.kt:101 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compare/screenLogic/ComparePdfToolComponent.kt:101-110 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:110-119 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/contact_sheet/screenLogic/PdfContactSheetToolComponent.kt:204-213 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/screenLogic/CropPdfToolComponent.kt:166-175 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/dark_mode/screenLogic/PdfDarkModeToolComponent.kt:122-131 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_images/screenLogic/ExtractImagesPdfToolComponent.kt:111-120 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_pages/screenLogic/ExtractPagesPdfToolComponent.kt:212-221 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/flatten/screenLogic/FlattenPdfToolComponent.kt:110-119 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/grayscale/screenLogic/GrayscalePdfToolComponent.kt:100-109 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/images_to_pdf/screenLogic/ImagesToPdfToolComponent.kt:137-146 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/merge/screenLogic/MergePdfToolComponent.kt:89-98 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/metadata/screenLogic/MetadataPdfToolComponent.kt:139-148 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/ocr/screenLogic/OCRPdfToolComponent.kt:128-137 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/screenLogic/PageNumbersPdfToolComponent.kt:110-119 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/preview/screenLogic/PreviewPdfToolComponent.kt:84-93 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/print/screenLogic/PrintPdfToolComponent.kt:111-120 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/protect/screenLogic/ProtectPdfToolComponent.kt:113-122 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.kt:110-119 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/screenLogic/RemoveAnnotationsPdfToolComponent.kt:122-131 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/screenLogic/RemovePagesPdfToolComponent.kt:109-118 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/repair/screenLogic/RepairPdfToolComponent.kt:100-109 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/resize_pages/screenLogic/ResizePdfPagesToolComponent.kt:92-101 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/screenLogic/RotatePdfToolComponent.kt:123-132 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/sanitize/screenLogic/SanitizePdfToolComponent.kt:92-101 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/screenLogic/SignaturePdfToolComponent.kt:143-152 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/screenLogic/SplitPdfToolComponent.kt:121-130 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/unlock/screenLogic/UnlockPdfToolComponent.kt:110-119 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/screenLogic/WatermarkPdfToolComponent.kt:125-134 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/zip_convert/screenLogic/ZipConvertPdfToolComponent.kt:117-126 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/screenLogic/CropPdfToolComponent.kt` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:110` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12 lines × 21) · ×1
  • Duplicated block (12 lines × 21) feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:73 — feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/screenLogic/CropPdfToolComponent.kt:109-120 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/dark_mode/screenLogic/PdfDarkModeToolComponent.kt:77-88 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_images/screenLogic/ExtractImagesPdfToolComponent.kt:76-87 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/extract_pages/screenLogic/ExtractPagesPdfToolComponent.kt:108-119 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/flatten/screenLogic/FlattenPdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/grayscale/screenLogic/GrayscalePdfToolComponent.kt:69-80 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/ocr/screenLogic/OCRPdfToolComponent.kt:76-87 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/page_numbers/screenLogic/PageNumbersPdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/print/screenLogic/PrintPdfToolComponent.kt:74-85 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/protect/screenLogic/ProtectPdfToolComponent.kt:74-85 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rearrange/screenLogic/RearrangePdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_annotations/screenLogic/RemoveAnnotationsPdfToolComponent.kt:86-97 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/remove_pages/screenLogic/RemovePagesPdfToolComponent.kt:72-83 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/repair/screenLogic/RepairPdfToolComponent.kt:69-80 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/rotate/screenLogic/RotatePdfToolComponent.kt:73-84 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/signature/screenLogic/SignaturePdfToolComponent.kt:88-99 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/split/screenLogic/SplitPdfToolComponent.kt:84-95 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/unlock/screenLogic/UnlockPdfToolComponent.kt:72-83 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/watermark/screenLogic/WatermarkPdfToolComponent.kt:88-99 | feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/zip_convert/screenLogic/ZipConvertPdfToolComponent.kt:77-88 — before extracting anything, compare `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/crop/screenLogic/CropPdfToolComponent.kt` as WHOLE FILES: 84% of the shorter file's lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/compress/screenLogic/CompressPdfToolComponent.kt:68` calls `mutableFloatStateOf` and `feature/pdf-tools/src/main/java/com/t8rin/imagetoolbox/feature/pdf_tools/presentation/dark_mode/screenLogic/PdfDarkModeToolComponent.kt:73` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Minor — 39 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt:346 — `!component.isLoading && component.canSave` appears character-identically in 3 files — feature/apng-tools/src/main/java/com/t8rin/imagetoolbox/feature/apng_tools/presentation/ApngToolsContent.kt, feature/gif-tools/src/main/java/com/t8rin/imagetoolbox/feature/gif_tools/presentation/GifToolsContent.kt, feature/webp-tools/src/main/java/com/t8rin/imagetoolbox/feature/webp_tools/presentation/WebpToolsContent.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt:242 — `!component.isLoading && component.type != null` appears character-identically in 2 files — feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/JxlToolsContent.kt, feature/jxl-tools/src/main/java/com/t8rin/imagetoolbox/feature/jxl_tools/presentation/components/JxlToolsTopAppBarActions.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 lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt:103 — `!directory.exists() || directory.deleteRecursively()` appears character-identically in 2 files — lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt, lib/neural-tools/src/main/java/com/t8rin/neural_tools/search/ClipImageSearch.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 lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt:47 — `!file.isFile || file.length() != model.size` appears character-identically in 2 files — lib/neural-tools/src/main/java/com/t8rin/neural_tools/ModelFiles.kt, lib/neural-tools/src/main/java/com/t8rin/neural_tools/search/ClipImageSearch.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 lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:265 — `!hasMoved && !isMultiTouch && !isCanceled && firstUp.uptimeMillis - firstDown.uptimeMillis <= viewConfiguration.longPressTimeoutMillis` appears character-identically in 2 files — lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt, lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt:182 — `!isPortrait && canShowScreenData && showActionsInTopAppBar` appears character-identically in 2 files — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveBottomScaffoldLayoutScreen.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/AdaptiveLayoutScreen.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt:315 — `!isSecondMultiTouch && !isSecondCanceled && secondUp.uptimeMillis - secondDown.uptimeMillis <= viewConfiguration.longPressTimeoutMillis` appears character-identically in 2 files — lib/cropper/src/main/java/com/t8rin/cropper/CropModifier.kt, lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropper.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 lib/neural-tools/src/main/java/com/t8rin/neural_tools/bgremover/GenericBackgroundRemover.kt:74 — `!modelFile.exists() || modelFile.length() <= 0` appears character-identically in 2 files — lib/neural-tools/src/main/java/com/t8rin/neural_tools/bgremover/GenericBackgroundRemover.kt, lib/neural-tools/src/main/java/com/t8rin/neural_tools/bgremover/U2NetPortableBackgroundRemover.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteEditor.kt:195 — `!reorderable.isAnyItemDragging || dragging` appears character-identically in 2 files — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/GradientPaletteEditor.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/palette_selection/RecentAndFavoriteGradientsCard.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/LauncherScreenSelector.kt:96 — `!settingsState.groupOptionsByTypes || settingsState.showFavoriteToolsInGroupedMode` appears character-identically in 2 files — feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/LauncherScreenSelector.kt, feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/ScreenPreferenceSelection.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt:375 — `!sheetOffset.isNaN() && !sheetHeight.isNaN() && sheetHeight != 0f` appears character-identically in 2 files — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedModalBottomSheet.kt, feature/main/src/main/java/com/t8rin/imagetoolbox/feature/main/presentation/components/MainDrawerContent.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt:136 — `!visible && predictiveBackProgress != 0f` appears character-identically in 4 files — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/ImagePager.kt, feature/media-picker/src/main/java/com/t8rin/imagetoolbox/feature/media_picker/presentation/components/MediaImagePager.kt, feature/settings/src/main/java/com/t8rin/imagetoolbox/feature/settings/presentation/components/additional/FullscreenDebugMenu.kt, feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/components/FullscreenEditOption.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 lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt:89 — `(character <= ',') || (character == '/') || (character == ':')` appears character-identically in 2 files — lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code39Encoder.kt, lib/qrose/src/main/java/io/github/alexzhirkevich/qrose/oned/Code93Encoder.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt:256 — `Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && enableUltraHDRSupport` appears character-identically in 2 files — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/Picture.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/image/SubcomposePicture.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:64 — `Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && options.bitmapConfig == Bitmap.Config.RGBA_F16` appears character-identically in 2 files — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt, core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:66 — `Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && options.bitmapConfig == Bitmap.Config.HARDWARE` appears character-identically in 2 files — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt, core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt:68 — `Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU && options.bitmapConfig == Bitmap.Config.RGBA_1010102` appears character-identically in 2 files — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/AnimatedJxlDecoder.kt, core/data/src/main/java/com/t8rin/imagetoolbox/core/data/coil/HeifDecoder.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/BitmapUtils.kt:78 — `SDK_INT >= 26 && this == Bitmap.Config.HARDWARE` appears character-identically in 2 files — core/data/src/main/java/com/t8rin/imagetoolbox/core/data/utils/BitmapUtils.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/ImageUtils.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:295 — `_presetSelected.value == Preset.Telegram && imageData.imageInfo.imageFormat != ImageFormat.Png.Lossless` appears character-identically in 2 files — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt, feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt:413 — `_presetSelected.value == Preset.Telegram && imageFormat != ImageFormat.Png.Lossless` appears character-identically in 2 files — feature/resize-convert/src/main/java/com/t8rin/imagetoolbox/feature/resize_convert/presentation/screenLogic/ResizeAndConvertComponent.kt, feature/single-edit/src/main/java/com/t8rin/imagetoolbox/feature/single_edit/presentation/screenLogic/SingleEditComponent.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt:117 — `address.isBlank() && body.isBlank() && subject.isBlank()` appears character-identically in 2 files — core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ContactPicker.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt:194 — `addresses.isEmpty() && emails.isEmpty() && name.isEmpty() && organization.isBlank() && phones.isEmpty() && title.isBlank() && urls.isEmpty()` appears character-identically in 2 files — core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/QrType.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/content_pickers/ContactPicker.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt:395 — `alwaysShowLabel || animationProgress != 0f` appears character-identically in 2 files — core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationBarItem.kt, core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/widget/enhanced/EnhancedNavigationRailItem.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt:209 — `applySpotHealManually && drawMode is DrawMode.SpotHeal` appears character-identically in 2 files — feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/components/BitmapDrawer.kt, feature/draw/src/main/java/com/t8rin/imagetoolbox/feature/draw/presentation/screenLogic/DrawComponent.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 lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt:117 — `attachmentKey != null && this.attachmentKey !== attachmentKey` appears character-identically in 2 files — lib/cropper/src/main/java/com/t8rin/cropper/ImageCropperState.kt, lib/opencv-tools/src/main/java/com/t8rin/opencv_tools/free_corners_crop/compose/FreeCornersCropperState.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.
X7 · Silent fallback defaults · Silent fallback default in catch · ×3
  • Silent fallback default in catch feature/scan-qr-code/src/main/java/com/t8rin/imagetoolbox/feature/scan_qr_code/presentation/components/editor/QrCalendarEditField.kt:155 — `QrCalendarEditField` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch feature/checksum-tools/src/main/java/com/t8rin/imagetoolbox/feature/checksum_tools/data/AndroidChecksumManager.kt:46 — `calculateChecksum` swallows every exception into `""` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch core/ui/src/main/kotlin/com/t8rin/imagetoolbox/core/ui/utils/helper/ImageUtils.kt:295 — `rememberPdfPages` swallows every exception into `0` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
DM8 · Value-object opportunities · Primitive data clump · ×2
  • Primitive data clump: [isregular, rotationdegrees, vertices] feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/domain/ShapeLayerModeExt.kt:108 — The parameters [isregular, rotationdegrees, vertices] travel together across 3 signatures and were confirmed as a coherent concept by the model — that's a missing value object. Extracting them into one type (e.g. `Address`, `Money`, `Coordinate`) removes repetition, prevents argument-order mistakes, and gives the concept a home for its rules.
  • Primitive data clump: [innerradiusratio, isregular, rotationdegrees, vertices] feature/markup-layers/src/main/java/com/t8rin/imagetoolbox/feature/markup_layers/domain/ShapeLayerModeExt.kt:125 — The parameters [innerradiusratio, isregular, rotationdegrees, vertices] travel together across 3 signatures and were confirmed as a coherent concept by the model — that's a missing value object. Extracting them into one type (e.g. `Address`, `Money`, `Coordinate`) removes repetition, prevents argument-order mistakes, and gives the concept a home for its rules.
D19 · Documentation Quality · Documentation · ×1
  • Documentation: no project overview README.md — The document begins with branding and a GitHub badge, then an empty line before any content describing what the Image Toolbox project does or its purpose. State what the project is (the image tool for composing Android apps) and why it matters in one sentence.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 14 of 99 project(s) overshoot their size bounds, lowering Project Cohesion to 7.3/10. The most over is `core/filters` (40272 LoC, 1478 module-visible types across 14 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P1 · CI/CD gates · CI test execution not evidenced · ×1
  • CI test execution not evidenced — A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add spotbugs with find-sec-bugs (or `semgrep --config=auto`, which runs on any language) as a CI step. What was searched, so you can tell an absence from a miss: the 10946 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.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

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/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-56d9a870806641bda91b1f4f19f36a3f/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-56d9a870806641bda91b1f4f19f36a3f/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off .43artifacts/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) and a Gradle version catalogue — 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 163 file(s) — `build-logic/convention/src/main/kotlin/com/t8rin/imagetoolbox/ProjectExtensions.kt`, `core/crash/src/main/java/com/t8rin/imagetoolbox/core/crash/presentation/screenLogic/CrashComponent.kt`, `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/image/Metadata.kt`, `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/image/model/BlendingMode.kt`, `core/domain/src/main/kotlin/com/t8rin/imagetoolbox/core/domain/model/ColorModel.kt`, … (+158 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.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) and a Gradle version catalogue — not scanned yet).0—

Run 01a16f7f-8638-7a7a-ac23-5818cd84a9b7 · 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