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

CeuiLiSA/Pixiv-Shaft

Measured 13 November 2026, 19:16 UTC, at code version 29969b2

CAI score 42out of 100 Weak
CriticalWeakAdequateStrongExemplary
Up 2 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: 225,538 lines of product code in 15 projects, tests not counted · Estimated rebuild effort: about 1.9 person-years · Weakest lens: Production Readiness, 28

Findings by how serious they are

70 critical 1258 serious 117 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
13 November 2026, 19:16 UTC

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

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

68of 68 dimensions measured by tools.
1421of 1445 findings point to an exact file and line, so you can open each one in the code. The other 24 concern the repository as a whole, such as missing documentation.
68dimensions across 8 lenses, read from 225,538 lines of product code in 15 projects.
Chapters

Executive summary

CeuiLiSA/Pixiv-Shaft falls short of our standard for production because we found no logging, tracing or health checks in the code and no automated security scanning of the code, its secrets or its dependencies. It scores 42 out of 100 and is rated Weak, and 35 of its 70 critical findings are security problems.

Production Readiness, at 28, is the weakest lens and counts most in the score. The best first steps are adding a diagnostic log and adding automated security scanning, each worth about 5 points. Raising Production Readiness to 70 would lift the score to about 53.

Twenty-two passwords or keys are open to anyone who can read the repository. Twelve pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and eighteen controls can't be used without a mouse. Replacing each exposed password or key, pinning each tool to an exact version and making the controls work with a keyboard would close these risks. Limiting each secret to its own step would fix the secret exposed to more of the pipeline than needed. The ten buttons or links with no name need a name, even when they only show an icon.

The product code is 225,538 lines, about €270,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 28 · counts for 45%Security and Compliance 45 · counts for 25%Accessibility 50 · counts for 14%Domain Modelling 63 · counts for 8%Maturity 67 · counts for 4%Code Health 72 · counts for 2%Architecture 73 · counts for 1%Performance 100 · counts for 1%

If Production Readiness rose from 28 to 70, the lowest score rated Strong, the score would rise from 42 to about 53.

Code composition: what the lines of code are
Product code 81%Tests 19%
New since the last survey: 602 findings

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

  • Cyclomatic Complexity · ResumableOkHttpFetcher.fetchWithProgress (cyclomatic 31) app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt
  • Cyclomatic Complexity · IllustAiHelper.observeUpscaleTask (cyclomatic 28) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Cyclomatic Complexity · ZoomSyncKt.setupZoomSync (cyclomatic 26) app/src/main/java/ceui/pixiv/ui/common/ZoomSync.kt
  • Cyclomatic Complexity · IllustAiHelper.observeRembgTask (cyclomatic 24) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Cyclomatic Complexity · ApkDownloadManager.runJob (cyclomatic 23) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cyclomatic Complexity · PageAdapter.bindAiOverlayAndPills (cyclomatic 23) app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt
  • Cyclomatic Complexity · ImageIntegrityValidator.validateAndRepairPng (cyclomatic 22) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt
  • Cyclomatic Complexity · ArtworkDetailIllustAdapter.bindExpandOverlay (cyclomatic 22) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt
  • Cyclomatic Complexity · ApkDownloadManager.downloadSegment (cyclomatic 21) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cyclomatic Complexity · Manager.runDirectTransfer (cyclomatic 21) app/src/main/java/ceui/lisa/core/Manager.java
  • Cyclomatic Complexity · ImageIntegrityValidator.verifyPngZlibStream (cyclomatic 20) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt
  • Cyclomatic Complexity · IllustAiHelper.restoreAiTasks (cyclomatic 19) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Cyclomatic Complexity · ImageDetailActivity.syncAiOverlayForPage (cyclomatic 18) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Cyclomatic Complexity · ReboundSpringChain.animate (cyclomatic 18) app/src/main/java/ceui/lisa/helper/ReboundSpringChain.kt
  • Cyclomatic Complexity · SnapshotBackfillFragment.renderStatus (cyclomatic 18) app/src/main/java/ceui/pixiv/snapshot/SnapshotBackfillFragment.kt
  • Cyclomatic Complexity · SnapshotGenerator.generateContent (cyclomatic 18) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt
  • Cyclomatic Complexity · IllustStaggerRendererKt.staggerIllustRenderer (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt
  • Cyclomatic Complexity · ArtworkV3Actions.showMoreMenu (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Actions.kt
  • Cyclomatic Complexity · ModelArchiveInstaller.install (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/common/ModelArchiveInstaller.kt
  • Cyclomatic Complexity · FragmentImageDetail.loadFromNetwork (cyclomatic 16) app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt
  • Cyclomatic Complexity · UpgradeRequiredPrompt.open (cyclomatic 16) app/src/main/java/ceui/lisa/update/UpgradeRequiredPrompt.kt
  • Cyclomatic Complexity · ArtlistEditorModel.save (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/artlist/ArtlistModels.kt
  • Cyclomatic Complexity · ArtlistRepository.call (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/artlist/ArtlistRepository.kt
  • Cyclomatic Complexity · QueueDownloadManager.runMainLoop (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt
  • Cyclomatic Complexity · ModelDownloadFragment.startDownload (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt
  • Cyclomatic Complexity · FragmentSettingsData.clearAiResults (cyclomatic 16) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java
  • Cognitive Complexity · ImageIntegrityValidator.verifyPngZlibStream (cognitive 49) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt
  • Cognitive Complexity · ResumableOkHttpFetcher.fetchWithProgress (cognitive 48) app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt
  • Cognitive Complexity · PageAdapter.bindAiOverlayAndPills (cognitive 48) app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt
  • Cognitive Complexity · IllustAiHelper.observeUpscaleTask (cognitive 48) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Cognitive Complexity · ArtworkDetailIllustAdapter.bindExpandOverlay (cognitive 42) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt
  • Cognitive Complexity · IllustAiHelper.observeRembgTask (cognitive 41) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Cognitive Complexity · Manager.runDirectTransfer (cognitive 37) app/src/main/java/ceui/lisa/core/Manager.java
  • Cognitive Complexity · ApkDownloadManager.runJob (cognitive 35) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cognitive Complexity · ImageIntegrityValidator.validateAndRepairPng (cognitive 35) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt
  • Cognitive Complexity · ZoomSyncKt.setupZoomSync (cognitive 31) app/src/main/java/ceui/pixiv/ui/common/ZoomSync.kt
  • Cognitive Complexity · ApkDownloadManager.downloadSegment (cognitive 30) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cognitive Complexity · ImageDetailActivity.syncAiOverlayForPage (cognitive 27) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Cognitive Complexity · ReboundSpringChain.animate (cognitive 27) app/src/main/java/ceui/lisa/helper/ReboundSpringChain.kt
  • Cognitive Complexity · ModelArchiveInstaller.install (cognitive 25) app/src/main/java/ceui/pixiv/ui/common/ModelArchiveInstaller.kt
  • Cognitive Complexity · ArtworkV3Actions.showMoreMenu (cognitive 25) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Actions.kt
  • Cognitive Complexity · IllustAiHelper.restoreAiTasks (cognitive 24) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Cognitive Complexity · BulkDownloadCacheCleaner.deepSlim (cognitive 23) app/src/main/java/ceui/pixiv/db/bulkclean/BulkDownloadCacheCleaner.kt
  • Cognitive Complexity · SnapshotGenerator.generateContent (cognitive 23) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt
  • Cognitive Complexity · FragmentImageDetail.loadFromNetwork (cognitive 20) app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt
  • Cognitive Complexity · UpgradeRequiredPrompt.open (cognitive 20) app/src/main/java/ceui/lisa/update/UpgradeRequiredPrompt.kt
  • Cognitive Complexity · SnapshotImportRecovery.recover (cognitive 20) app/src/main/java/ceui/pixiv/snapshot/SnapshotImportRecovery.kt
  • Cognitive Complexity · ApkDownloadManager.restore (cognitive 19) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cognitive Complexity · ImageIntegrityValidator.findByteRepair (cognitive 19) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt
  • Cognitive Complexity · ApkDownloadManager.launchJob (cognitive 18) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cognitive Complexity · ArtlistEditorModel.save (cognitive 18) app/src/main/java/ceui/pixiv/ui/artlist/ArtlistModels.kt
  • Cognitive Complexity · IllustFeedPoolSync.bind (cognitive 18) app/src/main/java/ceui/pixiv/ui/common/IllustFeedSync.kt
  • Cognitive Complexity · NovelFeedFragment.novelCardRenderer (cognitive 18) app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt
  • Cognitive Complexity · UgoiraPlayerView.applyPlayButtonPosition (cognitive 18) app/src/main/java/ceui/pixiv/ui/detail/UgoiraPlayerView.kt
  • Cognitive Complexity · FragmentImageDetail.loadImage (cognitive 17) app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt
  • Cognitive Complexity · ApkDownloadManager.validateZip (cognitive 17) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cognitive Complexity · ImagePageSaver.save (cognitive 17) app/src/main/java/ceui/pixiv/download/ImagePageSaver.kt
  • Cognitive Complexity · FollowingExportSheet.show (cognitive 17) app/src/main/java/ceui/pixiv/ui/library/FollowingExportSheet.kt
  • Cognitive Complexity · NovelSeriesFeedKt.bindNovelSeriesHero (cognitive 17) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt
  • Cognitive Complexity · FragmentSettingsData.clearAiResults (cognitive 17) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java
  • Cognitive Complexity · ImageDetailActivity.observeAiTask (cognitive 16) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Cognitive Complexity · HistoryFeedKt.historyIllustRenderer (cognitive 16) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt
  • Cognitive Complexity · ApkDownloadManager.downloadSegmentWithRetry (cognitive 16) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • Cognitive Complexity · ObjectPool.updateObjects (cognitive 16) app/src/main/java/ceui/pixiv/cache/ObjectPool.kt
  • Cognitive Complexity · ModelDownloadFragment.showCopyOrImportDialog (cognitive 16) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt
  • Cognitive Complexity · SearchItemVisibilityKt.shouldHideSearchNovel (cognitive 16) app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt
  • God Classes · TooManyMethods: DownloadDao app/src/main/java/ceui/lisa/database/DownloadDao.java
  • God Classes · ClassTooLong: ApkDownloadManager app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • God Classes · ClassTooLong: FragmentSettingsData app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java
  • God Classes · TooManyMethods: ApkDownloadManager app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • God Classes · FileTooLong: update/ApkDownloadManager.kt app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt
  • God Classes · FileTooLong: fragments/FragmentSettingsData.java app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java
  • God Classes · MethodTooLong: FollowingExportSheet.show app/src/main/java/ceui/pixiv/ui/library/FollowingExportSheet.kt
  • God Classes · ClassTooLong: ArtworkTabletStage app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt
  • God Classes · TooManyMethods: Analytics app/src/main/java/ceui/pixiv/analytics/Analytics.kt
  • God Classes · MethodTooLong: IllustAiHelper.observeUpscaleTask app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • God Classes · FileTooLong: download/ActiveListV3Fragment.kt app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt
  • God Classes · MethodTooLong: ArtworkDetailIllustAdapter.bindExpandOverlay app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt
  • God Classes · MethodTooLong: FragmentSettingsData.initData app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java
  • God Classes · TooManyMethods: NovelFeedFragment app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt
  • God Classes · MethodTooLong: IllustAiHelper.observeRembgTask app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • God Classes · ClassTooLong: AppDatabase app/src/main/java/ceui/lisa/database/AppDatabase.java
  • God Classes · FileTooLong: bulk/QueueDownloadManager.kt app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt
  • God Classes · FileTooLong: detail/ArtworkTabletStage.kt app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt
  • God Classes · ClassTooLong: UgoiraProgress app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt
  • God Classes · TooManyMethods: FragmentSettingsData app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java
  • God Classes · TooManyMethods: PixivActions app/src/main/java/ceui/pixiv/actions/PixivActions.kt
  • God Classes · TooManyMethods: NovelTextFragment app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt
  • God Classes · ClassTooLong: IllustAiHelper app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • God Classes · FileTooLong: REDACTED REDACTED
  • God Classes · FileTooLong: activities/Shaft.java app/src/main/java/ceui/lisa/activities/Shaft.java
  • God Classes · MethodTooLong: ActiveListV3Fragment.onViewCreated app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt
  • God Classes · ClassTooLong: SearchActivity app/src/main/java/ceui/lisa/activities/SearchActivity.java
  • God Classes · FileTooLong: snapshot/SnapshotListFragment.kt app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt
  • God Classes · FileTooLong: fragments/FragmentSearch.java app/src/main/java/ceui/lisa/fragments/FragmentSearch.java
  • God Classes · ClassTooLong: OtherFilterSheet app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt
  • Code Duplication · Near-duplicate member pair (92 shared lines) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Near-duplicate member pair (64 shared lines) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Near-duplicate member pair (50 shared lines) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt
  • Code Duplication · Near-duplicate member pair (35 shared lines) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt

We compare 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: 285 findings

These 285 critical or serious findings were in the previous survey, on 24 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · publish_sticker_assets.prepare (cyclomatic 17) scripts/publish_sticker_assets.py
  • Cyclomatic Complexity · find_missing_used_strings.main (cyclomatic 16) scripts/find_missing_used_strings.py
  • Cognitive Complexity · find_missing_used_strings.main (cognitive 35) scripts/find_missing_used_strings.py
  • Cognitive Complexity · sort_locale_strings.main (cognitive 26) scripts/sort_locale_strings.py
  • Cognitive Complexity · publish_sticker_assets.prepare (cognitive 23) scripts/publish_sticker_assets.py
  • Cognitive Complexity · DoneAdapterV3.onBindViewHolder (cognitive 21) app/src/main/java/ceui/pixiv/ui/download/DoneListV3Fragment.kt
  • Cognitive Complexity · publish_sticker_assets.publish (cognitive 19) scripts/publish_sticker_assets.py
  • God Classes · FileTooLong: utils/ViewUtils.kt app/src/main/java/ceui/pixiv/utils/ViewUtils.kt
  • Code Duplication · Near-duplicate member pair (51 shared lines) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Near-duplicate member pair (35 shared lines) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt
  • Code Duplication · Near-duplicate member pair (27 shared lines) app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.kt
  • Code Duplication · Near-duplicate member pair (24 shared lines) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt
  • Code Duplication · Near-duplicate member pair (20 shared lines) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt
  • Code Duplication · Duplicated block (24–29 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt
  • Code Duplication · Duplicated block (25 lines × 2) REDACTED
  • Code Duplication · Duplicated block (21–23 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt
  • Code Duplication · Duplicated block (22 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (19–22 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt
  • Code Duplication · Duplicated block (20 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt
  • Code Duplication · Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt
  • Code Duplication · Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/ui/notification/NotificationListFragment.kt
  • Code Duplication · Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt
  • Code Duplication · Duplicated block (19 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt
  • Code Duplication · Duplicated block (19 lines × 2) app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt
  • Code Duplication · Duplicated block (13–18 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (15–18 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt
  • Code Duplication · Duplicated block (17 lines × 3) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt
  • Code Duplication · Duplicated block (17 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Duplicated block (16–17 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt
  • Code Duplication · Duplicated block (13–16 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (11–16 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (14–16 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Duplicated block (16 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt
  • Code Duplication · Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt
  • Code Duplication · Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt
  • Code Duplication · Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt
  • Code Duplication · Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchNovelSeriesWebSource.kt
  • Code Duplication · Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt
  • Code Duplication · Duplicated block (8–14 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (13–14 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt
  • Code Duplication · Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt
  • Code Duplication · Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt
  • Code Duplication · Duplicated block (11–14 lines × 2) app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt
  • Code Duplication · Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt
  • Code Duplication · Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt
  • Code Duplication · Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/utils/LikeHaptic.kt
  • Code Duplication · Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt
  • Code Duplication · Duplicated block (12–13 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt
  • Code Duplication · Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt
  • Code Duplication · Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/pinned/PinnedTabsFragment.kt
  • Code Duplication · Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt
  • Code Duplication · Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt
  • Code Duplication · Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt
  • Code Duplication · Duplicated block (12 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt
  • Code Duplication · Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt
  • Code Duplication · Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.kt
  • Code Duplication · Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt
  • Code Duplication · Duplicated block (11–12 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt
  • Code Duplication · Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt
  • Code Duplication · Duplicated block (11 lines × 3) app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt
  • Code Duplication · Duplicated block (11 lines × 3) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt
  • Code Duplication · Duplicated block (10–11 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt
  • Code Duplication · Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt
  • Code Duplication · Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt
  • Code Duplication · Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/comments/ChildCommentAdapter.kt
  • Code Duplication · Duplicated block (8–11 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt
  • Code Duplication · Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/notification/InfoCategoryListFragment.kt
  • Code Duplication · Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt
  • Code Duplication · Duplicated block (8–10 lines × 3) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (9–10 lines × 3) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt
  • Code Duplication · Duplicated block (9–10 lines × 2) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt
  • Code Duplication · Duplicated block (9–10 lines × 2) app/src/main/java/ceui/pixiv/ui/comments/ChildCommentAdapter.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt
  • Code Duplication · Duplicated block (10 lines × 2) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt
  • Code Duplication · Duplicated block (8–9 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt
  • Code Duplication · Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt
  • Code Duplication · Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt
  • Code Duplication · Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt
  • Code Duplication · Duplicated block (8–9 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt
  • Code Duplication · Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt
  • Code Duplication · Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt
  • Code Duplication · Duplicated block (8 lines × 4) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt
  • Code Duplication · Duplicated block (3–8 lines × 5) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt
  • Code Duplication · Duplicated block (8 lines × 3) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt
  • Code Duplication · Duplicated block (8 lines × 3) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt
  • Code Duplication · Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt
Rebuild cost: about €270,000 · Estimate
Cost to rebuild€91,000 to €460,000, for 1,513 to 4,801 hours of work, about 1.9 person-years for 1 to 4 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 42. 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: 225,538 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag.
Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.
Raises the score by about 5 points · Medium effort · Observability
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 19 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED (2).
Raises the score by about 3 points · Medium effort · Secrets (history)

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 €270,000 to build again, about 1.9 person-years of work. Its weakest lens is Production Readiness, at 28 (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
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Of all the actions in this report, it raises the score most for the work it takes: about 5 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

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

arch :actionqueue :actionqueue :app :app :app->:actionqueue :applock :applock :app->:applock :banner :banner :app->:banner :communication :communication :app->:communication :feeds :feeds :app->:feeds :models :models :app->:models :panel :panel :app->:panel :progressmanager :progressmanager :app->:progressmanager :safe :safe :app->:safe :websocket :websocket :app->:websocket :witstudio :witstudio :app->:witstudio :applock->:witstudio codehealth-iso-9c48df5cbda8481fb1a3c382cdfaed5f codehealth-iso-9c48df5cbda8481fb1a3c382cdfaed5f shaft_filter shaft_filter shaft_secrets shaft_secrets

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.

993 modules, with 1423 dependencies between them. 28 loops run through 113 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 953 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 pixiv.communication2 pixiv.feeds3 pixiv.ui.novel.reader.model4 pixiv.witstudio.theme5 loxia6 pixiv.chat.ui7 pixiv.ui.search.v38 lisa.models9 pixiv.widgets10 pixiv.api.model11 pixiv.db.mirror12 pixiv.download.model13 pixiv.shaftapi14 pixiv.ui.comic.reader15 pixiv.db16 pixiv.plaza.ui17 pixiv.ui.novel.reader.export18 lisa.database19 pixiv.actions20 lisa.core21 pixiv.ui.novel.reader22 lisa.helper23 pixiv.ui.novel.reader.ui24 pixiv.ui.bulk25 pixiv.ui.common26 pixiv.ui.download27 pixiv.ui.library28 pixiv.ui.recommend29 pixiv.ui.upscale30 pixiv.ui.user31 pixiv.api32 pixiv.ui.novel33 pixiv.ui.translate34 pixiv.services35 pixiv.ui.comments36 pixiv.ui.detail37 pixiv.snapshot38 lisa.fragments39 lisa.activities40 pixiv.ui.settings
1 pixiv.communication
2 pixiv.feeds
3 pixiv.ui.novel.reader.model
4 pixiv.witstudio.theme
5 loxia5
6 pixiv.chat.ui4
7 pixiv.ui.search.v31
8 lisa.models92
9 pixiv.widgets1212
10 pixiv.api.model226
11 pixiv.db.mirror43
12 pixiv.download.model21
13 pixiv.shaftapi17
14 pixiv.ui.comic.reader25
15 pixiv.db212
16 pixiv.plaza.ui20244
17 pixiv.ui.novel.reader.export86712
18 lisa.database2121
19 pixiv.actions4421531
20 lisa.core21
21 pixiv.ui.novel.reader9443411
22 lisa.helper32111
23 pixiv.ui.novel.reader.ui12124
24 pixiv.ui.bulk141411
25 pixiv.ui.common312641011111
26 pixiv.ui.download1617
27 pixiv.ui.library12113293
28 pixiv.ui.recommend521513
29 pixiv.ui.upscale2162
30 pixiv.ui.user44291711111
31 pixiv.api14321
32 pixiv.ui.novel3427245211021
33 pixiv.ui.translate111184
34 pixiv.services313322
35 pixiv.ui.comments1123121111
36 pixiv.ui.detail4362434234314
37 pixiv.snapshot511011511
38 lisa.fragments2182413171241221111
39 lisa.activities4251281313122671221
40 pixiv.ui.settings641111121
Uses a module listed above itPart of a loopThe module itself
1 pixiv.communication2 pixiv.feeds3 pixiv.ui.novel.reader.model4 pixiv.witstudio.theme5 loxia6 pixiv.chat.ui7 pixiv.ui.search.v38 lisa.models9 pixiv.widgets10 pixiv.api.model11 pixiv.db.mirror12 pixiv.download.model13 pixiv.shaftapi14 pixiv.ui.comic.reader15 pixiv.db16 pixiv.plaza.ui17 pixiv.ui.novel.reader.export18 lisa.database19 pixiv.actions20 lisa.core21 pixiv.ui.novel.reader22 lisa.helper23 pixiv.ui.novel.reader.ui24 pixiv.ui.bulk25 pixiv.ui.common26 pixiv.ui.download27 pixiv.ui.library28 pixiv.ui.recommend29 pixiv.ui.upscale30 pixiv.ui.user31 pixiv.api32 pixiv.ui.novel33 pixiv.ui.translate34 pixiv.services35 pixiv.ui.comments36 pixiv.ui.detail37 pixiv.snapshot38 lisa.fragments39 lisa.activities40 pixiv.ui.settingspixiv.communication1pixiv.feeds2pixiv.ui.novel.reader.model3pixiv.witstudio.theme4loxia5pixiv.chat.ui6pixiv.ui.search.v37lisa.models8pixiv.widgets9pixiv.api.model10pixiv.db.mirror11pixiv.download.model12pixiv.shaftapi13pixiv.ui.comic.reader14pixiv.db15pixiv.plaza.ui16pixiv.ui.novel.reader.export17lisa.database18pixiv.actions19lisa.core20pixiv.ui.novel.reader21lisa.helper22pixiv.ui.novel.reader.ui23pixiv.ui.bulk24pixiv.ui.common25pixiv.ui.download26pixiv.ui.library27pixiv.ui.recommend28pixiv.ui.upscale29pixiv.ui.user30pixiv.api31pixiv.ui.novel32pixiv.ui.translate33pixiv.services34pixiv.ui.comments35pixiv.ui.detail36pixiv.snapshot37lisa.fragments38lisa.activities39pixiv.ui.settings405419212122264321172521220244867122121442153121944341132111121241414113126410111111617121132935215132162442917111111432134272452110211111843133221123121111436243423431451101151121824131712412211114251281313122671221641111121+953 more modules (most-connected shown)

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

At a glance — Architecture · 73% · Strong ·

At a glance — Maturity · 67% · Adequate · gated by M2 ·

At a glance — Readiness · 28% · Weak · gated by P2, P3, P7 ·

At a glance — Security · 45% · Weak · gated by D28, D36 ·

At a glance — Domain Modelling · 63% · Adequate · gated by DM4 ·

At a glance — Accessibility · 50% · Adequate · gated by AC4 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A07:2025 — Authentication Failures23High / Critical
A05:2025 — Injection22High / Critical
A03:2025 — Software Supply Chain Failures5Medium

Roadmap

Top priorities: Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce; 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; Resolve the 19 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED (2).

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

Do thisHelpsEffortDimension
Write a diagnostic trail the user can hand back with a bug report: a log file under the platform's per-user data directory, switchable with a `--verbose`/`--debug` flag. Start with the error paths that emit nothing — a discarded error is the failure the user cannot describe and you cannot reproduce.+5.4 ptsMediumObservability
Add a SAST step to CI running what this repository's stack ships: spotbugs with find-sec-bugs — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.+5.4 ptsMediumSecurity & performance tooling
Resolve the 19 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED (2).+3.2 ptsMediumSecrets (history)
Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).+2.6 ptsMediumOutbound HTTP resilience
Resolve the 3 High secret finding(s) in Secrets (history) — start with REDACTED (3).+1.2 ptsLowSecrets (history)
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED.+1.2 ptsLowStatic Analysis (SAST)
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED.+1.1 ptsLowStatic Analysis (SAST)
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+2.1 ptsMediumKeyboard semantics

File quality

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

FileScoreBandWorst signal
REDACTED2.1SlopSecrets (history): REDACTED: REDACTED
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedSecrets (history): High secret: REDACTED
REDACTED5.3MixedStatic Analysis (SAST): Medium: REDACTED
app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt5.5MixedCyclomatic Complexity: ImageDetailActivity.initView (cyclomatic 30)
app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt5.5MixedCyclomatic Complexity: SearchFilterV3BottomSheet.registerPickerListeners (cyclomatic 18)
app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt5.5MixedCyclomatic Complexity: NovelReaderView.onTouchEvent (cyclomatic 17)
app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt5.7MixedGod Classes: TooManyMethods: OtherFilterSheet
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
REDACTED5.8MixedSecrets (history): REDACTED: REDACTED
app/src/main/java/ceui/lisa/utils/Settings.java5.9MixedGod Classes: TooManyMethods: Settings
app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt5.9MixedGod Classes: ClassTooLong: NovelScrollReaderView
app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt6.0MixedExplicit Debt: TodoComment
REDACTED6.3MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED6.4MixedStatic Analysis (SAST): Medium: REDACTED
app/src/main/java/ceui/lisa/core/Manager.java7.0MixedCyclomatic Complexity: Manager.startDownloadChain (cyclomatic 42)
app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt7.0MixedCyclomatic Complexity: EpubExporter.export (cyclomatic 39)
app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt7.0MixedCyclomatic Complexity: NovelReaderV3Fragment.observeReaderState (cyclomatic 28)
app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt7.0MixedCyclomatic Complexity: IllustAiHelper.observeUpscaleTask (cyclomatic 28)
app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt7.0MixedCyclomatic Complexity: PostView.bindReactions (cyclomatic 27)

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

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

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

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

Could not be resolved — 12

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

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 68 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.

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

What we checked — 68 dimensions across the health lenses
D1D2D3D4D5D6D13D14D15D16D17D19D20D21D26D28D29D34D35D36D44AC1AC2AC3AC4AC5AC6AX10AX2AX3AX4DM10DM11DM4DM5DM9M1M2M3M4P1P10P2P3P4P5P6P7PF3X1X12X13X14X16X18X19X2X20X21X23X25X26X27X28X29X3X30X5

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, 1421 of 1445 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1d657-3cff-71f4-ac76-72b9442f9506.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.kt) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability not included — the Java/Kotlin suite (repository root, Gradle) did not finish re-running within its budget: the JVM suite did not finish re-running within its tier budget.
  • D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Not scored — a Gradle build resolved 394 artifact(s) across its subprojects (170 behind a shipped release, reported), but the currency signal was not established over the whole graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `actionqueue/src/main/java/ceui/pixiv/actionqueue/ActionHandler.kt`, `actionqueue/src/main/java/ceui/pixiv/actionqueue/Clock.kt`, `app/src/main/java/ceui/lisa/core/JavaAsync.kt`, `app/src/main/java/ceui/lisa/helper/UserIllustJumpHelper.kt`, `app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt`, … (+44 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 — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Boot via AndroidApp (app). the Android app did not build — `./gradlew :app:assembleDebug` exited 1: com.github.getActivity:Toaster:15.0. > Could not get resource 'https://maven.aliyun.com/repository/public/com/github/getActivity/Toaster/15.0/Toaster-15.0.pom'. > Could not GET 'h…; runtime evidence skipped (launch chosen because app/build.gradle applies the Android application plugin and gradlew builds it).
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • DM8 Value-object opportunities — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check finds primitive parameters that travel together through several signatures of the domain (a missing value object). Its deterministic rule has not yet shown 95 % precision on adjudicated rows, so the clumps it finds are counted here and not published as findings, and the card carries no score. That is a limit of the analyzer, not a finding about your code.
  • DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The frontend declares that it computes whether a construction is produced or passed, yet 3304 of 4178 constructions arrived without the answer. Arm two skipped them; it did not clear them.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Java, Kotlin, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Kotlin, cpp is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X1 Async correctness — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 5 further occurrence(s) are not listed individually; the score already reflects all 45.
  • X12 Unreachable branch — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X13 Undrained process stream — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This check's reader does not cover every language in this repository. The score describes the part it read, which is most of the product; the rest is a gap in this analyzer's language reach.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 42 further occurrence(s) are not listed individually; the score already reflects all 82.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • 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.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

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

123 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was TemplateRouteFactory.create at 157. A further 6 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 PlazaRepositoryKt.plazaError at 21 — they are counted neither in the figure above nor in this dimension's score. 5 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: app/src/main/java/ceui/pixiv/plaza/ui/PlazaRepository.kt (PlazaRepositoryKt.plazaError at 21), app/src/main/java/ceui/pixiv/ui/referral/ReferralRepository.kt (ReferralRepository.messageFor at 21), app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorQuery.kt (BookmarkMirrorQuery.buildWhere at 18), app/src/main/java/ceui/pixiv/chat/api/HttpChatHistorySource.kt (HttpChatHistorySourceKt.toAppError at 16), app/src/main/java/ceui/pixiv/download/template/TemplateContext.kt (TemplateContext.resolveVariable at 16). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

TemplateRouteFactory.create (cyclomatic 157)app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt:153
NetworkTestViewModel.runTests (cyclomatic 59)app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:348
NetworkTestViewModel.testTarget (cyclomatic 59)app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:635
ProfileManager.buildProfile (cyclomatic 51)app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt:111
UgoiraEngineKt.downloadZipTo (cyclomatic 47)app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:853

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

What to do

  1. Bring the 1 body over 60 down to 60 or less in Cyclomatic Complexity — start with TemplateRouteFactory.create (cyclomatic 157). — Refactoring it lifts Cyclomatic Complexity from 5.5 to about 6.5/10.

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

D2 · Cognitive Complexity5.7 / 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.7 / 10 · rule-coverage 100% · ceiling Prevented

218 method(s) exceeded the cognitive complexity threshold of 15; the worst was EpubExporter.export at 130.

EpubExporter.export (cognitive 130)app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:30
ErrorCtrl.parseAndToast (cognitive 104)app/src/main/java/ceui/lisa/http/ErrorCtrl.java:89
ProfileManager.buildProfile (cognitive 80)app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt:111
NetworkTestViewModel.testTarget (cognitive 78)app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:635
QueueDownloadManager.settleCompleted (cognitive 73)app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:588

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

What to do

  1. Bring the 7 bodies over 60 down to 60 or less in Cognitive Complexity — start with EpubExporter.export (cognitive 130), ErrorCtrl.parseAndToast (cognitive 104), ProfileManager.buildProfile (cognitive 80). — 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 7 together lifts Cognitive Complexity from 5.7 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

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

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

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

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

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

169 god class(es) detected.

ClassTooLong: NetworkTestViewModel · ×44app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:232
FileTooLong: debug/NetworkTestViewModel.kt · ×44app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt
MethodTooLong: PlazaComposeFragment.onViewCreated · ×42app/src/main/java/ceui/pixiv/plaza/ui/PlazaComposeFragment.kt:84
TooManyMethods: Settings · ×39app/src/main/java/ceui/lisa/utils/Settings.java:24

What to do

  1. Resolve the 44 ClassTooLong finding(s) in God Classes — start with NetworkTestViewModel.kt, ArtworkV3Fragment.kt, Settings.java. — One of this dimension's main actionable groups (44 warning-level).
  2. Resolve the 44 FileTooLong finding(s) in God Classes — start with NetworkTestViewModel.kt, NovelReaderV3Fragment.kt, ArtworkV3Fragment.kt. — One of this dimension's main actionable groups (44 warning-level).
  3. Resolve the 42 MethodTooLong finding(s) in God Classes — start with NetworkTestViewModel.kt (3), Manager.java (2), MainActivity.java (2). — One of this dimension's main actionable groups (42 warning-level).

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

D4 · Code Duplication9.4 / 10Stronggated by 523 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.4 / 10 · rule-coverage 100% · ceiling Verified

279 duplicated block group(s) detected. A further 244 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 2 of the 523 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (5 lines × 2) · ×30app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:370
Duplicated block (10 lines × 2) · ×23app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:91
Duplicated block (7 lines × 2) · ×22app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:432
Duplicated block (6 lines × 2) · ×22app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:277
Duplicated block (8 lines × 2) · ×21app/src/main/java/ceui/lisa/activities/UActivity.kt:167

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

What to do

  1. Resolve the 30 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with PlazaFragment.kt (2), Manager.java (2), ApkDownloadManager.kt. — One of this dimension's main actionable groups (30 warning-level).
  2. Resolve the 23 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with PivisionFeedFragment.kt (2), UserV3WorkTabFragment.kt, FragmentIllust.kt. — One of this dimension's main actionable groups (23 warning-level).
  3. Resolve the 22 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with IllustAiHelper.kt (2), ComicSeriesListSheet.kt (2), NovelSeriesFragment.kt (2). — One of this dimension's main actionable groups (22 warning-level).

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

D5 · Coupling5.2 / 10Adequate✓ Tool-verified

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

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

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

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

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

What to do

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

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

D6 · Cohesion (LCOM4)10.0 / 10Stronggated by 1 serious finding✓ 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 10.0 / 10 · rule-coverage 100% · ceiling Verified

1 of 418 classes have LCOM4 above 3.

Low cohesion: NovelScrollReaderView (LCOM4 7)app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:53

What to do

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

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

D13 · REDACTED 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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

0 of 31 declared JVM dependency artifact(s) use a banned license. Licences were resolved from the POMs Maven Central publishes, over the coordinates this repository's 14 Maven/Gradle manifest(s) declare with a version resolvable from the manifest itself — the same declaration-site closure this analysis reads for dependency currency. The JVM has no lockfile a checkout is guaranteed to carry, so this is deliberately NOT the transitive closure. 1 of them resolve to no licence at all on Central, even through their parent POMs; that is missing data, not a violation, and none of them is charged. A further 42 coordinate(s) are not published to Maven Central — another repository (Google's Maven hosts androidx), a SNAPSHOT, or a private artifact — so their licences are not readable from here and they are outside this verdict.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.7 / 10Stronggated by 111 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: app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt (28×157=4396); app/src/main/java/ceui/lisa/activities/MainActivity.java (56×39=2184); app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt (59×30=1770) Repeated repair below the complexity floor: app/src/main/java/ceui/lisa/adapters/IllustAdapter.java (18 of 27 changes were fixes); app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt (14 of 25 changes were fixes); app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderSettings.kt (10 of 12 changes were fixes)

Hotspot: app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt · ×61app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt:153
Repeated repair: app/src/main/java/ceui/lisa/adapters/IllustAdapter.java · ×50app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:781

What to do

  1. Resolve the 61 Hotspot finding(s) in Churn × Complexity Hotspots — start with TemplateRouteFactory.kt, MainActivity.java, ImageDetailActivity.kt. — One of this dimension's main actionable groups (61 warning-level).
  2. Resolve the 50 Repeated repair finding(s) in Churn × Complexity Hotspots — start with IllustAdapter.java, SnapshotListFragment.kt, ReaderSettings.kt. — One of this dimension's main actionable groups (50 warning-level).

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

D16 · Bus Factor5.9 / 10Adequate✓ Tool-verified

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

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

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

376 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is app/src/main/java/ceui/lisa/model/ListNovel.java. Counted over 914 of the 1402 production source files in this repository: 481 are under the ~2,400-byte size floor this dimension measures over, and the remaining 7 have no attributable history left to measure.

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

What to do

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

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

D17 · Explicit Debt10.0 / 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 225538 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 · ×2app/src/main/java/ceui/pixiv/ui/novel/reader/render/PageRenderer.kt:108
XxxCommentapp/src/main/java/ceui/pixiv/ui/recommend/EventHistoryFeed.kt:149

What to do

  1. Resolve the 2 TodoComment finding(s) in Explicit Debt — start with PageRenderer.kt, NetworkTestViewModel.kt. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 XxxComment finding(s) in Explicit Debt — start with EventHistoryFeed.kt. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

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

1 of 1 documentation facets pass in full. 24 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

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

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

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

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

No architecture decision records were found.

No ADRs foundapp/build.gradle:3

What to do

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

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

D21 · Naming Consistency8.8 / 10Strong✓ Tool-verified

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

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

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

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

`serialVersionUID` spells `UID` where 93 names in the project spell it `Uid`app/src/main/java/ceui/pixiv/api/model/Models.kt:34
`isCreatedByAI` spells `AI` where 72 names in the project spell it `Ai`app/src/main/java/ceui/pixiv/api/model/Models.kt:171

What to do

  1. Resolve the 1 `serialVersionUID` spells `UID` where 93 names in the project spell it… finding(s) in Naming Consistency — start with Models.kt. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `isCreatedByAI` spells `AI` where 72 names in the project spell it `Ai` finding(s) in Naming Consistency — start with Models.kt. — One of this dimension's main actionable groups (1 recommendation-level).

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

D26 · Project Cohesion8.5 / 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.

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

1 of 13 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)0.0 / 10Critical✓ Tool-verified

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

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

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

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

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 19 REDACTED finding(s) in Secrets (history) — start with REDACTED (4), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (19 issue-level).
  2. Resolve the 3 High secret finding(s) in Secrets (history) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Documented

22 finding(s): 0 critical, 13 high, 7 medium, 2 low. 12 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) — `.agents/skills/genupdate/agents/openai.yaml`, `app/src/main/java/ceui/lisa/helper/UserIllustJumpHelper.kt` (lines 37–38, line 283), `app/src/main/java/ceui/lisa/utils/Emoji.java` (lines 204–205, line 205, line 209, …), `app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt` (lines 40–41, line 415), `gradlew` (line 74, line 180) — 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.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  3. No action in Static Analysis (SAST) — all 12 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 (12 issue-level, 0 of them charged here).

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

D34 · Knowledge Freshness9.6 / 10Adequategated by 1 critical finding✓ 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 9.6 / 10 · rule-coverage 100% · ceiling Documented

36 of 921 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is app/src/main/java/ceui/lisa/model/ListIllust.java. Counted over 921 of the 1402 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgeapp/src/main/java/ceui/lisa/model/ListIllust.java:1
Orphaned file · ×35app/src/main/java/ceui/lisa/utils/Emoji.java:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with ListIllust.java. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 35 Orphaned file finding(s) in Knowledge Freshness — start with Emoji.java, Preset.java, find_missing_used_strings.py. — One of this dimension's main actionable groups (35 recommendation-level).
  3. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.8 / 10Stronggated by 13 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: SearchFilterV3BottomSheet.kt↔SearchFilterV3LegacyBridge.kt 94%; Android10DownloadFactory22.kt↔SAFactory.java 86%; ImageDetailActivity.kt↔IllustAiHelper.kt 75%

Change coupling: SearchFilterV3BottomSheet.kt ↔ SearchFilterV3LegacyBridge.kt · ×11app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:1
Change-coupling hub: SearchConfig.kt → SearchIllustRepo.kt, SearchModel.java, API.kt, SearchFilterV3BottomSheet.kt, SearchFilterV3LegacyBridge.kt · ×2app/src/main/java/ceui/pixiv/ui/search/SearchConfig.kt

What to do

  1. Resolve the 11 Change coupling finding(s) in Change Coupling — start with SearchFilterV3BottomSheet.kt, Android10DownloadFactory22.kt, ImageDetailActivity.kt. — One of this dimension's main actionable groups (11 warning-level).
  2. Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with SearchConfig.kt, Settings.java. — One of this dimension's main actionable groups (2 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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-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 12 platform declaration(s) and 75 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.

AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.

AC2 · Forms & labels4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. (×3) — mockup.html:1717, mockup.html:1853, mockup.html:1857
  • This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id. (×2) — mockup.html:1852, mockup.html:1856
  • This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label. (×10) — mockup.html:2255, mockup.html:2256, mockup.html:2257, …

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure6.4 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta. — mockup.html:5

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.3 / 10Critical✓ Tool-verified

Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no element the repo's own CSS styles `cursor: pointer` without giving it any of the three, no unfocusable element whose only binding is a mouse enter/leave pair or a double-click, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.

Coverage: Population: elements that pose a keyboard-semantics question, in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) — a non-natively-interactive element carrying a click handler, a double-click or hover enter/leave binding, a pointer-only gesture on a tabindex="0" element, or `cursor: pointer` from the repo's own CSS; an href-less or placeholder-href (#, javascript:) anchor; and any element with a positive tabindex. Natively interactive elements used correctly (<button>, <a href>, form controls) are NOT in the population — there is nothing to judge — so a page of nothing but correct controls gives AC4 nothing to measure. Keyboard reachability is judged from the markup, never from a rendered page. ★ An interactive element declared in a tagged-template (html`…`) or hyperscript frontend is NOT in this population — no producer reads either — so an empty population is reported as an analyzer gap, never as "this repository has no interactive elements".

  • A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler. (×18) — mockup.html:1726, mockup.html:1733, mockup.html:1741, …

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

AC6 · Visual & motion safety7.0 / 10Adequate✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.sb-gallery .sb-count` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — mockup.html:166
  • `#hamburger` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — mockup.html:261
  • `.wf-img .r18-badge` sets color: white on background-color: #FF5252 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — mockup.html:429
  • `.btn-primary` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — mockup.html:553
  • `.btn-sm` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — mockup.html:572
  • `.search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — docs/tablet-design/common.css:34

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.5 / 10Exemplary✓ Tool-verified

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

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

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

AX2 · Stateful singletons4.0 / 10Weak✓ 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.

  • `ApkDownloadManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (runToken, cachedReleaseJson, cachedRelease; e.g. `runToken` in `restore` at line 405). — app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:73
  • `Analytics` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (seenLoadErrors; e.g. `seenLoadErrors` in `loadError` at line 479). — app/src/main/java/ceui/pixiv/analytics/Analytics.kt:62
  • `ShaftChatGateway` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (persistDao; e.g. `persistDao` in `bootstrap` at line 179). — app/src/main/java/ceui/pixiv/chat/api/ShaftChatGateway.kt:72
  • `DiscoveryPool` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (initialized, pooledIds, seenIds; e.g. `initialized` in `initialize` at line 54). — app/src/main/java/ceui/pixiv/db/discovery/DiscoveryPool.kt:28
  • `BookmarkMirrorService` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (emptyShelfStreak, activeRun; e.g. `emptyShelfStreak` in `rebuildShelf` at line 310). — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:90
  • `QueueDownloadManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (idleRecoveryPending, lastDiedNoticeAt, retryStates, inFlight, ugoiraInFlightRowIds; e.g. `idleRecoveryPending` in `runColdStart` at line 380). — app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:92
  • `FanboxWebBridge` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (pageLoaded, webView; e.g. `pageLoaded` in `release` at line 97). — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxWebBridge.kt:57
  • `MangaBatchTranslateCenter` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (resultCleanupInProgress; e.g. `resultCleanupInProgress` in `beginResultCleanup` at line 116). — app/src/main/java/ceui/pixiv/ui/translate/MangaBatchTranslateCenter.kt:42

What to do

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

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

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

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

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

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

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.

DM11 · Constructible invalid state5.9 / 10Adequate✓ Tool-verified

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

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

  • `ActionEntity`'s public constructor takes `type`, `dedupeKey`, `payload`, `lastError`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ActionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:28
  • `QueueMetaEntity`'s public constructor takes `key` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `QueueMetaEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:55
  • `NovelAnnotationEntity`'s public constructor takes `excerpt`, `note` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelAnnotationEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/lisa/database/NovelAnnotationEntity.kt:20
  • `NovelBookmarkEntity`'s public constructor takes `preview`, `note` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelBookmarkEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/lisa/database/NovelBookmarkEntity.kt:14
  • `NovelCustomFontEntity`'s public constructor takes `displayName`, `relativePath`, `originalUri` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelCustomFontEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/lisa/database/NovelCustomFontEntity.kt:7
  • `NovelCustomThemeEntity`'s public constructor takes `name`, `backgroundImagePath` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelCustomThemeEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/lisa/database/NovelCustomThemeEntity.kt:7
  • `ChatMessageEntity`'s public constructor takes `localKey`, `clientMsgId`, `room`, `displayName`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChatMessageEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/chat/data/ChatMessageEntity.kt:46
  • `DiscoveryEntity`'s public constructor takes `illustJson`, `source` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DiscoveryEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/DiscoveryEntity.kt:7
  • `GeneralEntity`'s public constructor takes `json` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GeneralEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/GeneralEntity.kt:28
  • `RemoteKey`'s public constructor takes `nextPageUrl` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RemoteKey` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/RemoteKey.kt:7
  • `BookmarkMirrorEntity`'s public constructor takes `shelfKey`, `payloadJson`, `title`, `authorName`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookmarkMirrorEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorEntity.kt:71
  • `BookmarkMirrorStateEntity`'s public constructor takes `shelfKey`, `nextUrl`, `lastError` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookmarkMirrorStateEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorStateEntity.kt:26
  • `BookmarkMirrorTagEntity`'s public constructor takes `shelfKey`, `tagName`, `displayName`, `translatedName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookmarkMirrorTagEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorTagEntity.kt:35
  • `DownloadQueueEntity`'s public constructor takes `type`, `sourceTag`, `status`, `errorMsg`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DownloadQueueEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/queue/DownloadQueueEntity.kt:15
  • `SynonymTagEntity`'s public constructor takes `name`, `remark` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SynonymTagEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/synonym/SynonymTagEntity.kt:23
  • `SynonymTargetEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SynonymTargetEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/pixiv/db/synonym/SynonymTargetEntity.kt:18
  • `ComicBookmarkEntity`'s public constructor takes `illustId`, `pageIndex`, `totalPages`, `previewUrl`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ComicBookmarkEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse. — app/src/main/java/ceui/lisa/database/ComicBookmarkEntity.java:33

What to do

  • Give each aggregate one way in that can refuse — a guarded constructor, value-object parameters that validate themselves, or a private constructor behind a factory that returns a failure.
DM4 · Rich vs anemic model3.0 / 10Weak✓ Tool-verified

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

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

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

  • `RemoteKey` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — app/src/main/java/ceui/pixiv/db/RemoteKey.kt:7

What to do

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

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

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

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

DM9 · Scattered domain decisions10.0 / 10Exemplary✓ Tool-verified

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

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

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

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

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

M2 · Architecture documentation3.0 / 10Weak✓ 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 repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

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

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

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

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

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

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

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

P10 · Library API & versioning9.5 / 10Exemplary✓ Tool-verified

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

  • 3 public types in `ceui.pixiv.actionqueue.internal.db.ActionStatus` are marked as implementation by their own namespace, folder or name: `PENDING` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:8, `internal`), `RUNNING` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:9, `internal`), `FAILED` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:10, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:8
  • 1 public type in `ceui.pixiv.actionqueue.internal.db.ActionQueueDatabase` is marked as implementation by its own namespace, folder or name: `Companion` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionQueueDatabase.kt:30, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionQueueDatabase.kt:30
  • 3 public types in `ceui.pixiv.witstudio.dialog.internal.WitMenuItemView.Style` are marked as implementation by their own namespace, folder or name: `TEXT` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36, `internal`), `MARK` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36, `internal`), `CHECK` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers. — witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36
  • 1 public type in `ceui.pixiv.witstudio.dialog.internal` is marked as implementation by its own namespace, folder or name: `WitMenuItemViewKt` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:1, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers. — witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:1

What to do

  • Hide `ceui.pixiv.actionqueue.internal.db.ActionStatus` (`PENDING`, `RUNNING`, `FAILED`) (Kotlin: `internal`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `ceui.pixiv.actionqueue.internal.db.ActionQueueDatabase` (`Companion`) (Kotlin: `internal`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `ceui.pixiv.witstudio.dialog.internal.WitMenuItemView.Style` (`TEXT`, `MARK`, `CHECK`) (Kotlin: `internal`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
  • Hide `ceui.pixiv.witstudio.dialog.internal` (`WitMenuItemViewKt`) (Kotlin: `internal`): its own namespace, folder or name already says it is implementation, and hidden it can change without breaking a consumer.
P2 · Observability0.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

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

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

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

What to do

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

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:582
  • `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — app/src/main/java/ceui/lisa/update/AppUpdateChecker.kt:73

What to do

  • Set connect and read timeouts on every client (`RestTemplateBuilder.connectTimeout/readTimeout`, WebClient `responseTimeout`, `HttpRequest.Builder.timeout`, `HttpURLConnection.setReadTimeout`, Feign `connectTimeout`/`readTimeout` in configuration), and wrap calls to dependencies in resilience4j `@Retry`/`@CircuitBreaker`/`@TimeLimiter` (or Spring Retry).
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

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

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

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.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

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

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

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 propagation5.2 / 10Adequate✓ Tool-verified

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

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

  • Only 1/5 suspend functions that make a cancellable request (Ktor, OkHttp newCall, URL streams) accept the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. In a suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `fetchModels` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:341
  • `probe` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — app/src/main/java/ceui/pixiv/ui/settings/GithubProxyDialog.kt:290
  • `fetch` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderFontRepository.kt:113
  • `downloadZipTo` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`. — app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:853

What to do

  • Thread the coroutine's cancellation through suspend functions that make requests, so the work stops when its caller gives up.
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 (or a repository exception type deriving from it) controlled by an `if` — directly or through the `using`, `lock` or `try` that wraps the throw — 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)`); in the `else` branch, for a conjunct of the admitting condition that is FALSE of a non-null `p`. Range guards are read for bounds that leave nothing and for a `p > C.Count` bound whose index then reaches `C[p]`, `C.RemoveAt(p)` or a method of the same type that indexes with it. Deterministic, provable per finding. Advisory.

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

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic 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 an enhanced `for` leaves the collection it is walking alone — a body that adds to or removes from the very collection the loop is iterating invalidates the fail-fast iterator it is holding, so the next `next()` throws `ConcurrentModificationException` and the remaining elements are never seen. Whether a `for (x in c)` or `c.forEach { … }` leaves the collection it is walking alone — a `mutableListOf`/`ArrayList`, `mutableMapOf`/`HashMap` or `mutableSetOf`/`HashSet` is a `java.util` collection on the JVM and is walked by its own fail-fast iterator, so a body that adds to or removes from the very collection the loop is walking makes the next step throw `ConcurrentModificationException` and the remaining elements are never seen.

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

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling6.1 / 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 (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×14) — app/src/main/java/ceui/pixiv/widgets/RateAppDialog.kt:179, app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:565, app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:736, …
  • 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. (×8) — app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:416, app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:425, app/src/main/java/ceui/pixiv/widget/telegram/TelegramCompat.java:144, …
  • `catch (ignored: 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. — app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:697
  • `catch (e: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×3) — app/src/main/java/ceui/pixiv/ui/user/UserTagSearchSheet.kt:147, app/src/main/java/ceui/pixiv/ui/recommend/ArtistRankFeedFragment.kt:119, app/src/main/java/ceui/pixiv/ui/discovery/DiscoverViewModel.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. — app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:209
  • `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. (×12) — app/src/main/java/ceui/pixiv/ui/referral/ReferralRepository.kt:89, app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3ViewModel.kt:297, app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:194, …
  • `catch (t: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — app/src/main/java/ceui/pixiv/i18n/AppLocales.kt:197

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.9 / 10Exemplary✓ Tool-verified

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

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

WCAG coverage — what static analysis assessed

Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 40 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

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 Health72%StrongSolid.
Architecture73%StrongSolid.
Maturity67%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness28%Weak — gated by P2, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security45%Weak — gated by D28, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Domain Modelling63%Adequate — gated by DM4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility50%Adequate — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 3 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 6 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 13 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 57 check(s) not relevant to this codebase

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

  • AX1 Captive dependencies — Not applicable: Dagger rejects, at compile time, a component that holds a binding with a narrower scope than its own.
  • 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 — AX6 reached only 16% of this repository's production lines — kotlin (189,659 lines), python (1,554 lines), cpp (624 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the Android app did not build — `./gradlew :app:assembleDebug` exited 1: com.github.getActivity:Toaster:15.0. > Could not get resource 'https://maven.aliyun.com/repository/public/com/github/getActivity/Toaster/15.0/Toaster-15.0.pom'. > Could not GET 'h…; runtime evidence skipped (launch chosen because app/build.gradle applies the Android application plugin and gradlew builds it) This is a statement about this run, not a statement about your application: nothing here says the app is inaccessible, only that it was never run.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no data at rest for these controls to protect.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named column (email, first_name, date_of_birth, phone_number, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a Room, JPA or MongoDB entity, an Exposed or Ktorm table, or in a SQL CREATE TABLE or ALTER TABLE — and no database or data-store client (Room, Exposed, SQLDelight, Realm, JPA, JDBC, MongoDB, Firebase, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — ~52676 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
  • D12 Dependency Hygiene — Not scored — a Gradle build resolved 394 artifact(s) across its subprojects (170 behind a shipped release, reported), but the currency signal was not established over the whole graph, so this dimension's own question is only partly answered. NOT a finding that these dependencies are current or healthy.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Kotlin surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .java, .kt, .py source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • 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) — 49 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.
  • 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
  • DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
  • DM12 Ambient inputs in the domain — no domain-layer types detected — ambient-input check not applicable
  • 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
  • DM6 Domain ↔ infrastructure boundary — no domain-layer types detected — domain↔infrastructure boundary check not applicable
  • DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
  • DM8 Value-object opportunities — not scored — the deterministic rule found 0 candidate clump(s); its rows are withheld until it has a measured precision of 95 % (a sample of fewer than 10 rows cannot show one)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `@Benchmark` in a Java, Kotlin or Scala file importing JMH or kotlinx-benchmark, Jetpack Benchmark's `measureRepeated` in a file importing androidx.benchmark, or JMH/kotlinx-benchmark/androidx.benchmark in a pom.xml, Gradle or sbt build, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • 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.
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Kotlin was read, and it logs through none that an assembled message defeats: Android's `Log` and Timber, java.util.logging and log4j-api-kotlin take one finished message (as log4net does in C#), or it makes no call through a named logger at all. Calls made through SLF4J, log4j 2 or kotlin-logging (`LoggerFactory.getLogger`, `KotlinLogging.logger {}`) would be judged.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 70 finding(s)
D28 · Secrets (history) · REDACTED · ×19
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC4 · Keyboard semantics · Click handler on a non-interactive <div> · ×18
  • Click handler on a non-interactive <div> mockup.html:1726 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:1733 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:1741 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:1749 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:1757 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:1765 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:1775 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2255 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2256 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2257 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2258 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2259 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2260 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2261 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2262 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2263 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2264 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
  • Click handler on a non-interactive <div> mockup.html:2267 — A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabindex="0" + a key handler.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · Custom control with no accessible name on <div> · ×10
  • Custom control with no accessible name on <div> mockup.html:2255 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2256 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2257 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2258 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2259 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2260 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2261 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2262 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2263 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
  • Custom control with no accessible name on <div> mockup.html:2264 — This <div> carries a click handler, which makes it a control, but it has no text, aria-label or labelled child (the icon-only case), so assistive tech has no name to announce for it. Note that switching it to <button type="button"> — the right fix for its keyboard operability — does not give it a name either: an icon-only button still needs one. Add visible text or an aria-label.
AC2 · Forms & labels · <input> without a programmatic label · ×3
  • <input> without a programmatic label mockup.html:1717 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label mockup.html:1853 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
  • <input> without a programmatic label mockup.html:1857 — This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label.
D28 · Secrets (history) · High secret · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AC2 · Forms & labels · <label> that labels no control · ×2
  • <label> that labels no control mockup.html:1852 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
  • <label> that labels no control mockup.html:1856 — This <label> has no for and wraps no form control, so it names nothing: assistive tech never announces it, and clicking the caption focuses no field. Note that an id on the label is not an association — it is the TARGET of one, so a control still has to point at it. Give the label for="<the control's id>", move the control inside the label, or point the control's aria-labelledby at this label's id.
AC3 · Page structure · Viewport restricts zoom · ×1
  • Viewport restricts zoom mockup.html:5 — user-scalable=no/0 or a maximum-scale below 2 stops low-vision users zooming to 200%. Remove the zoom restriction from the viewport meta.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge app/src/main/java/ceui/lisa/model/ListIllust.java:1 — No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Serious — 1258 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×61
  • Hotspot: app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt:153 — app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 157 in TemplateRouteFactory.create at line 153. 3 of those changes were fix/bug commits, and the other 25 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/activities/MainActivity.java app/src/main/java/ceui/lisa/activities/MainActivity.java:1054 — app/src/main/java/ceui/lisa/activities/MainActivity.java changed 56 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in MainActivity.handleDrawerAction at line 1054. 18 of those changes were fix/bug commits, and the other 38 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/activities/MainActivity.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:168 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt changed 59 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in ImageDetailActivity.initView at line 168. 22 of those changes were fix/bug commits, and the other 37 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/core/Manager.java app/src/main/java/ceui/lisa/core/Manager.java:1160 — app/src/main/java/ceui/lisa/core/Manager.java changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in Manager.startDownloadChain at line 1160. 27 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/core/Manager.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:348 — app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in NetworkTestViewModel.runTests at line 348. 16 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:394 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt changed 92 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in ArtworkV3Fragment.onViewCreated at line 394. 46 of those changes were fix/bug commits, and the other 46 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:565 — app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in NovelReaderV3Fragment.observeReaderState at line 565. 19 of those changes were fix/bug commits, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/activities/Shaft.java app/src/main/java/ceui/lisa/activities/Shaft.java:340 — app/src/main/java/ceui/lisa/activities/Shaft.java changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in Shaft.onCreate at line 340. 8 of those changes were fix/bug commits, and the other 37 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/activities/Shaft.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1085 — app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt changed 61 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in FragmentIllust.refreshPageProgressPill at line 1085. 28 of those changes were fix/bug commits, and the other 33 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:853 — app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 47 in UgoiraEngineKt.downloadZipTo at line 853. 5 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:90 — app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in SearchNovelRepo.initApi at line 90. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:588 — app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in QueueDownloadManager.settleCompleted at line 588. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:94 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in SearchIllustRepo.initApi at line 94. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt:551 — app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in BookmarkLibraryUi.refreshIfStale at line 551. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt:854 — app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in FragmentImageDetail.loadFromNetwork at line 854. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:212 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in FragmentSettingsAppearance.initData at line 212. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt:111 — app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in ProfileManager.buildProfile at line 111. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.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: feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt:718 — feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in FeedFragment.render at line 718. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/lisa/activities/UserActivityV3.kt app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:495 — app/src/main/java/ceui/lisa/activities/UserActivityV3.kt changed 24 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in UserActivityV3.displayUser at line 495. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/activities/UserActivityV3.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt:100 — app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in IllustStaggerRendererKt.staggerIllustRenderer at line 100. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:523 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in PostView.bindReactions at line 523. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3.kt app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3.kt:169 — app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in SearchFilterV3.activeCount at line 169. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:156 — app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in SnapshotGenerator.generateContent at line 156. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:388 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in IllustAiHelper.observeUpscaleTask at line 388. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: app/src/main/java/ceui/pixiv/ui/navigation/DrawerIconCatalog.java app/src/main/java/ceui/pixiv/ui/navigation/DrawerIconCatalog.java:18 — app/src/main/java/ceui/pixiv/ui/navigation/DrawerIconCatalog.java changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in DrawerIconCatalog.iconFor at line 18. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/navigation/DrawerIconCatalog.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 36 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Repeated repair · ×50
  • Repeated repair: app/src/main/java/ceui/lisa/adapters/IllustAdapter.java app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:781 — app/src/main/java/ceui/lisa/adapters/IllustAdapter.java changed 27 times in last 90 days and 18 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 15 (its worst body is IllustAdapter.loadFromNetwork at line 781), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(detail): 加载原图换 adapter 时不清空屏上同页底图”; “fix(image): 修复完整性自愈的并发与失败恢复边界”; “fix(detail): 等待本地扫描时清除复用页旧图状态”; “fix(detail): 等待下载库扫描并预热本地大图”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/adapters/IllustAdapter.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:205 — app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt changed 25 times in last 90 days and 14 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 14 (its worst body is SnapshotListFragment.installListLayout at line 205), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(snapshot): 封面 Glide 请求显式按列宽 × 比例定尺寸,复用卡不再按上一张的比例裁”; “fix(snapshot): 封面比例只在管理页列表里算,进复用池的卡放掉封面”; “fix(snapshot): 快照列表对齐四种布局并预建卡片”; “fix(staggered): 通用防——pending scroll 撞上已移除的首个 child 时把滚动推迟到布局之后”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderSettings.kt app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderSettings.kt:268 — app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderSettings.kt changed 12 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is ReaderSettings.onThemePicked at line 268), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(novel): 小说阅读器「护眼提醒」设了不提醒 (#1241)”; “fix(novel): 换机还原后下载回选中的字体,翻页模式不按新字体重排”; “fix(novel): 补齐字色即时刷新并修正恢复入口对比度 (#1142)”; “fix(novel): 支持按阅读配色自定义文字颜色 (#1142)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderSettings.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:221 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt changed 17 times in last 90 days and 9 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is IllustFeedFragment.changeIllustListLayout at line 221), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home): 切换插画布局时保留排行榜头避免闪烁”; “fix(feeds): 快照标记显隐不再触发瀑布流列重排”; “fix(feeds): 首屏追载累加被隐藏的页,R-18 广播只在动态页注册”; “fix(home): 「过滤已收藏」补齐绕过 mapper 的入列路径与位置换算”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotEngine.kt app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotEngine.kt:248 — app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotEngine.kt changed 13 times in last 90 days and 8 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 AutoSnapshotEngine.launchAutoSnapshot at line 248), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(snapshot): 修复自动快照转正与发布清理竞态”; “fix(snapshot): 超额自动快照取消生成并保留旧库”; “fix(snapshot): 横滑与滚出作品区只挂起计时表,不再结算”; “fix(snapshot): 退出评估时排除过期进入记录”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotEngine.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3ViewModel.kt app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3ViewModel.kt:446 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3ViewModel.kt changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ArtworkV3ViewModelKt.resolveDownloadFabState at line 446), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(download): 详情页 FAB 判定排除失败页,「全部暂停」恢复不碰 FAILED”; “fix(download): 详情页 FAB 等待态按队列真实派发状态推导,改订阅队列变更而非停摆 (#1216 #1217)”; “fix(download): 详情页 FAB 重复点击与过早继续按队列真实状态推导 (#1216)”; “fix(download): 详情页下载FAB模式1蜂窝等待态显示为继续按钮,支持就地恢复传输”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3ViewModel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt:670 — app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is NovelReaderV3ViewModel.buildBodyPlainText at line 670), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(novel): 修复搜索与导航落在页边界时退回前页”; “fix(novel): 全文翻译分批上屏时,读到跨页段落续页的人不再被拽回前一页 (#864)”; “fix(novel): 直达正文 / 正文内换章也记浏览历史”; “fix(novel): 补齐朗读高亮与阅读进度联动 (#1139)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/detail/ArtworkPageRenderer.kt app/src/main/java/ceui/pixiv/ui/detail/ArtworkPageRenderer.kt:115 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkPageRenderer.kt changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is ArtworkPageRendererKt.pageRenderer at line 115), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(artwork): 大图页完成遮罩可关闭,overlay 局部刷新恢复 adapter 校验”; “fix(artwork): 优化详情页与大图页 AI 功能工作流与动效”; “fix(detail): 修正首图常驻后的加载刷新与折叠状态”; “fix(detail): 收起不再重载 p0 与作者头像”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/detail/ArtworkPageRenderer.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt:168 — app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt changed 12 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is Nana7miAccountSession.requestWithRefresh at line 168), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(search): improve borrowed search reliability”; “fix(search): 缓存首屏超过 30 分钟后翻页未命中不再静默断页 —— 服务端 409 拒掉已付费 request id 时换新 id 重借”; “fix(search): 缓存计费幂等并兼容旧服务端”; “fix(search): 「首屏来自缓存」记在借号会话上而不是仓库上 —— 迟到的命中不能把下一轮搜索标成会员游标”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/lisa/helper/StaggeredManager.java app/src/main/java/ceui/lisa/helper/StaggeredManager.java:200 — app/src/main/java/ceui/lisa/helper/StaggeredManager.java changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is StaggeredManager.deferAnchorBreakingScroll at line 200), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home): 首页从齐行切到瀑布流时不再闪退”; “fix(home): 切换插画布局时保留排行榜头避免闪烁”; “fix(staggered): 推迟的滚动补回时带上原偏移,删掉布局回调里不生效的 requestLayout”; “fix(staggered): 通用防——pending scroll 撞上已移除的首个 child 时把滚动推迟到布局之后”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/helper/StaggeredManager.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:445 — app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt changed 10 times in last 90 days and 7 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is ContentAdapter.getItemViewType at line 445), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(novel): 阅读器「防误触」点正文仍会翻页、呼出菜单;开启后改为长按呼出菜单,横向/纵向两种模式都生效 (#1159)”; “fix(novel): 取消过期的朗读跟随与延迟翻页 (#1139)”; “fix(novel): 修正朗读跟随与触摸冲突及章节高亮 (#1139)”; “fix(novel): 补齐朗读高亮与阅读进度联动 (#1139)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt:125 — app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt changed 11 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 4 (its worst body is UserFeedFragment.userRenderer at line 125), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(user): 推荐预览图淡入尊重系统动画设置”; “fix(following): 图片就绪时检查动画设置并兼容 Android 7”; “fix(following): 预览图淡入遵循系统动画开关”; “fix(user): 推荐用户整页预览图缓存未命中时淡入”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt:382 — app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is ReaderSettingsPanel.bindFloatSlider at line 382), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(novel): 下载字体 review 回补——字重吸附、重下竞态、面板单测”; “fix(novel): 补齐字色即时刷新并修正恢复入口对比度 (#1142)”; “fix(novel): 支持按阅读配色自定义文字颜色 (#1142)”; “fix(novel): 退出跟随后回刷「跟随系统暗色」开关 (#1132)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt:89 — app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt changed 8 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is UserNovelFeedFragment.onViewCreated at line 89), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(feed): 作者作品页刷新后空态不再列出已关掉的过滤项”; “fix(feed): 作者作品页空态点明是本 App 的过滤,并按实际命中的过滤项逐行列出”; “fix(user): 补齐 Long ID 的跨版本恢复兼容 (#1067)”; “fix(user): 用户 ID 消费链路统一为 Long,修复查看他人用户页 user_id=0 导致请求错误”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/snapshot/SnapshotArtworkFeedSource.kt app/src/main/java/ceui/pixiv/snapshot/SnapshotArtworkFeedSource.kt:56 — app/src/main/java/ceui/pixiv/snapshot/SnapshotArtworkFeedSource.kt changed 9 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is SnapshotArtworkFeedSource.buildLocalHeaderItems at line 56), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(detail): 快照「未包含评论」改由条目携带,不再渲染时回查 LRU 缓存”; “fix(user): 用户 ID 消费链路统一为 Long,修复查看他人用户页 user_id=0 导致请求错误”; “fix(snapshot): 修默认配置下单图快照大图页回源/空白,URL 口径收敛到 IllustDownload”; “fix(snapshot): 上线前 review 收敛:fd 泄漏、打开崩溃、下载文件顶掉快照页”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/snapshot/SnapshotArtworkFeedSource.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorDao.kt app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorDao.kt:84 — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorDao.kt changed 8 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is BookmarkMirrorDao.reconcileHeadWindow at line 84), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(ai): 后台刷新关注豁免快照避免滚动查库”; “fix(bookmark-mirror): 恢复联网即续同步、重建不再打断别的书架、关着开关取消收藏也清镜像行、年份分布按本地时区;「我的关注」重建后跳页恢复”; “fix(search): 借号搜索结果按本地收藏镜像回填收藏态,冷启动也显示红心 (#1063)”; “fix(bookmark-library): 按收藏序号续页并识别表头更新 (#1109)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorDao.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt:21 — app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is AutoSnapshotRepository.listAuto at line 21), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(snapshot): 封面比例只在管理页列表里算,进复用池的卡放掉封面”; “fix(snapshot): 快照列表对齐四种布局并预建卡片”; “fix(snapshot): 修复自动快照转正与发布清理竞态”; “fix(snapshot): 超额自动快照取消生成并保留旧库”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:64 — app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is ModelDownloadManager.downloadModel at line 64), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(model): 取消下载时掐断连接,网络卡住不再等满读超时”; “fix(model): 完整校验安装并串行清理模型残留”; “fix(model): 清理中断安装的暂存目录和缓存包 (#1350)”; “fix(model): 校验暂存模型后提交并保留失败前的安装”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.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: witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:436 — witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt changed 7 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is V3Palette.enhanceLegibility at line 436), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(theme): 主题色解出带 alpha 时推介计划页打开即崩,V3Palette 统一抹成不透明”; “fix(tags): 修正标签对比度并保留同义词展开状态 (#1146)”; “fix(theme): 详情页悬浮胶囊图标改哑光主题色,二级大图页同套调色板”; “fix(v3): 实底主题色胶囊的前景色 —— 新增 V3Palette.onPrimary,四处误用 floatingPillContent 改掉”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/upscale/IllustAiStore.kt app/src/main/java/ceui/pixiv/ui/upscale/IllustAiStore.kt:82 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiStore.kt changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 9 (its worst body is PageAiState.pruneMissingResults at line 82), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(settings): 补齐 AI 结果清理的状态同步与任务互斥”; “fix(settings): 修复 AI 结果清理后的提示状态与取消任务互斥”; “fix(artwork): 大图页完成遮罩可关闭,overlay 局部刷新恢复 adapter 校验”; “fix(artwork): 修复跨页面 AI 任务订阅与遮罩竞争”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/upscale/IllustAiStore.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3ViewModel.kt app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3ViewModel.kt:290 — app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3ViewModel.kt changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is EmailBackupV3ViewModel.errorText at line 290), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(account): 切换邮箱流程时取消并隔离旧验证码请求”; “fix(account): 缓存页面暂停期间的邮箱恢复完成事件”; “fix(login): refresh token 登录别再走带 TokenInterceptor 的客户端;入口挪进右上角菜单”; “fix(login): refresh token 登录错误分流、IO 线程化、落库收敛与输入框样式统一”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3ViewModel.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/lisa/utils/Params.java app/src/main/java/ceui/lisa/utils/Params.java:34 — app/src/main/java/ceui/lisa/utils/Params.java changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 2 (its worst body is Params.coerceLong at line 34), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(widget): widget 点击改传 Illust JSON,升级后点旧 widget 不再崩溃”; “fix(download): 详情页下载FAB模式2暂停与就地恢复状态对齐,优化容器会话UUID解耦”; “fix(settings): 高级会员设置页点进去变成主页 —— premium.php 已被 pixiv 301 到 /premium,WebView 把重定向当站内深链丢给 OutWakeActivity 兜底回了首页 (#1072)”; “fix(user): 补齐 Long ID 的跨版本恢复兼容 (#1067)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/lisa/utils/Params.java`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/detail/V3FabBarController.kt app/src/main/java/ceui/pixiv/ui/detail/V3FabBarController.kt:71 — app/src/main/java/ceui/pixiv/ui/detail/V3FabBarController.kt changed 7 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is V3FabBarController.renderDownload at line 71), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(download): 详情页下载FAB模式1蜂窝等待态显示为继续按钮,支持就地恢复传输”; “fix(download): 详情页下载FAB模式2暂停与就地恢复状态对齐,优化容器会话UUID解耦”; “fix(detail): 靠边的悬浮胶囊让开横屏侧边导航栏与挖孔,外侧收藏心不再被压住 (#1090)”; “fix(theme): 详情页悬浮胶囊图标改哑光主题色,二级大图页同套调色板”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/detail/V3FabBarController.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: feeds/src/main/java/ceui/pixiv/feeds/FeedAdapter.kt feeds/src/main/java/ceui/pixiv/feeds/FeedAdapter.kt:113 — feeds/src/main/java/ceui/pixiv/feeds/FeedAdapter.kt changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 5 (its worst body is FeedAdapter.bindInternal at line 113), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(home): 首页从齐行切到瀑布流时不再闪退”; “fix(home): 切换插画布局时保留排行榜头避免闪烁”; “fix(feeds): 首屏预建改为按条目类型 opt-in,不再盲建 0 号 renderer”; “fix(feeds): 刷新把长列表截成短前缀后补一次触底预取,分页不再被静默吃掉 (#1059)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- feeds/src/main/java/ceui/pixiv/feeds/FeedAdapter.kt`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Repeated repair: app/src/main/java/ceui/pixiv/ui/referral/ReferralUi.kt app/src/main/java/ceui/pixiv/ui/referral/ReferralUi.kt:140 — app/src/main/java/ceui/pixiv/ui/referral/ReferralUi.kt changed 6 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is ReferralUi.button at line 140), AT OR UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(referral): 对比度计算统一先把背景叠成不透明,推荐计划页不再因半透明主题色崩溃”; “fix(referral): 自定义主题色带透明度时推荐计划页不再崩溃”; “fix(referral): 调整七天体验卡插图尺寸与自适应布局”; “fix(referral): 补齐推介闭环、跨期结算与账号隔离”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 13:21:36 +08:00' --until='2026-11-12 13:21:36 +08:00' --full-history --no-merges -- app/src/main/java/ceui/pixiv/ui/referral/ReferralUi.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.
  • + 25 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×44
  • ClassTooLong: NetworkTestViewModel app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:232 — ClassTooLong — 1293 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 893 over it, 3.23× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ArtworkV3Fragment app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:94 — ClassTooLong — 1089 significant lines (blank, comment-only and punctuation-only lines excluded), 77 methods. The bar is 400 significant lines; this is 689 over it, 2.72× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Settings app/src/main/java/ceui/lisa/utils/Settings.java:24 — ClassTooLong — 1073 significant lines (blank, comment-only and punctuation-only lines excluded), 351 methods. The bar is 400 significant lines; this is 673 over it, 2.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: NovelReaderV3Fragment app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:120 — ClassTooLong — 1068 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 668 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: Manager app/src/main/java/ceui/lisa/core/Manager.java:70 — ClassTooLong — 1015 significant lines (blank, comment-only and punctuation-only lines excluded), 60 methods. The bar is 400 significant lines; this is 615 over it, 2.54× 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: ImageDetailActivity app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:102 — ClassTooLong — 999 significant lines (blank, comment-only and punctuation-only lines excluded), 45 methods. The bar is 400 significant lines; this is 599 over it, 2.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: MainActivity app/src/main/java/ceui/lisa/activities/MainActivity.java:84 — ClassTooLong — 851 significant lines (blank, comment-only and punctuation-only lines excluded), 43 methods. The bar is 400 significant lines; this is 451 over it, 2.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.
  • ClassTooLong: FragmentIllust app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:112 — ClassTooLong — 843 significant lines (blank, comment-only and punctuation-only lines excluded), 50 methods. The bar is 400 significant lines; this is 443 over it, 2.11× 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: ApkDownloadManager app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:73 — ClassTooLong — 681 significant lines (blank, comment-only and punctuation-only lines excluded), 46 methods. The bar is 400 significant lines; this is 281 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FragmentSettingsData app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:75 — ClassTooLong — 643 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. The bar is 400 significant lines; this is 243 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: UgoiraFramesFragment app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:80 — ClassTooLong — 637 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. The bar is 400 significant lines; this is 237 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: BookmarkMirrorService app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:90 — ClassTooLong — 635 significant lines (blank, comment-only and punctuation-only lines excluded), 44 methods. The bar is 400 significant lines; this is 235 over it, 1.59× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: SearchFilterV3BottomSheet app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:45 — ClassTooLong — 621 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 221 over it, 1.55× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: IllustAdapter app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:72 — ClassTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 211 over it, 1.53× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: API app/src/main/java/ceui/pixiv/api/API.kt:60 — ClassTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded), 116 methods. The bar is 400 significant lines; this is 208 over it, 1.52× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: PostView app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:239 — ClassTooLong — 574 significant lines (blank, comment-only and punctuation-only lines excluded), 12 methods. The bar is 400 significant lines; this is 174 over it, 1.44× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FragmentSettingsAppearance app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:69 — ClassTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 159 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UgoiraPlayerView app/src/main/java/ceui/pixiv/ui/detail/UgoiraPlayerView.kt:85 — ClassTooLong — 552 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 152 over it, 1.38× 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: FragmentImageDetail app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt:66 — ClassTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 140 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: NovelScrollReaderView app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:53 — ClassTooLong — 520 significant lines (blank, comment-only and punctuation-only lines excluded), 38 methods. The bar is 400 significant lines; this is 120 over it, 1.30× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DownloadPathSettingsFragment app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:42 — ClassTooLong — 495 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 95 over it, 1.24× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: UserActivityV3 app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:80 — ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 29 methods. The bar is 400 significant lines; this is 77 over it, 1.19× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: QueueDownloadManager app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:92 — ClassTooLong — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 25 methods. The bar is 400 significant lines; this is 72 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: FragmentSettingsViewing app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:34 — ClassTooLong — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 72 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ArtworkTabletStage app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt:66 — ClassTooLong — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 19 methods. The bar is 400 significant lines; this is 72 over it, 1.18× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • + 19 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×44
  • FileTooLong: debug/NetworkTestViewModel.kt app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt — FileTooLong — 1412 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: NetworkTestViewModel (232-2162). The bar is 500 significant lines; this is 912 over it, 2.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: reader/NovelReaderV3Fragment.kt app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt — FileTooLong — 1185 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: NovelReaderV3Fragment (120-1781). The bar is 500 significant lines; this is 685 over it, 2.37× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: detail/ArtworkV3Fragment.kt app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt — FileTooLong — 1173 significant lines (blank, comment-only and punctuation-only lines excluded), about 93% of them inside a single declaration: ArtworkV3Fragment (94-2054). The bar is 500 significant lines; this is 673 over it, 2.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: activities/ImageDetailActivity.kt app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt — FileTooLong — 1097 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: ImageDetailActivity (102-1633). The bar is 500 significant lines; this is 597 over it, 2.19× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: utils/Settings.java app/src/main/java/ceui/lisa/utils/Settings.java — FileTooLong — 1088 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: Settings (24-2328). The bar is 500 significant lines; this is 588 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: core/Manager.java app/src/main/java/ceui/lisa/core/Manager.java — FileTooLong — 1077 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: Manager (70-2038). The bar is 500 significant lines; this is 577 over it, 2.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: fragments/FragmentIllust.kt app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt — FileTooLong — 951 significant lines (blank, comment-only and punctuation-only lines excluded), about 89% of them inside a single declaration: FragmentIllust (112-1555). The bar is 500 significant lines; this is 451 over it, 1.90× 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: activities/MainActivity.java app/src/main/java/ceui/lisa/activities/MainActivity.java — FileTooLong — 927 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: MainActivity (84-1458). The bar is 500 significant lines; this is 427 over it, 1.85× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: ui/PlazaViews.kt app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt — FileTooLong — 778 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: PostView (239-966). The bar is 500 significant lines; this is 278 over it, 1.56× 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: shaftapi/PixshaftApi.kt app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt — FileTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 245 over it, 1.49× 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: novel/NovelTextFeed.kt app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt — FileTooLong — 744 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 244 over it, 1.49× 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: update/ApkDownloadManager.kt app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt — FileTooLong — 727 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: ApkDownloadManager (73-1204). The bar is 500 significant lines; this is 227 over it, 1.45× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: bulk/UgoiraEngine.kt app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt — FileTooLong — 718 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 218 over it, 1.44× 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/Models.kt app/src/main/java/ceui/pixiv/api/model/Models.kt — FileTooLong — 717 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 217 over it, 1.43× 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: fragments/FragmentSettingsData.java app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java — FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: FragmentSettingsData (75-1014). The bar is 500 significant lines; this is 209 over it, 1.42× 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/UgoiraFramesFragment.kt app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt — FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: UgoiraFramesFragment (80-954). The bar is 500 significant lines; this is 205 over it, 1.41× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: detail/ArtworkSectionRenderers.kt app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt — FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 201 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: utils/AnimatedGifEncoder.java app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java — FileTooLong — 699 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 199 over it, 1.40× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: adapters/IllustAdapter.java app/src/main/java/ceui/lisa/adapters/IllustAdapter.java — FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: IllustAdapter (72-1227). The bar is 500 significant lines; this is 175 over it, 1.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: mirror/BookmarkMirrorService.kt app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt — FileTooLong — 675 significant lines (blank, comment-only and punctuation-only lines excluded), about 94% of them inside a single declaration: BookmarkMirrorService (90-1266). The bar is 500 significant lines; this is 175 over it, 1.35× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: api/API.kt app/src/main/java/ceui/pixiv/api/API.kt — FileTooLong — 665 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: API (60-878). The bar is 500 significant lines; this is 165 over it, 1.33× 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: detail/UgoiraPlayerView.kt app/src/main/java/ceui/pixiv/ui/detail/UgoiraPlayerView.kt — FileTooLong — 660 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: UgoiraPlayerView (85-944). The bar is 500 significant lines; this is 160 over it, 1.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: v3/SearchFilterV3BottomSheet.kt app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt — FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded), about 96% of them inside a single declaration: SearchFilterV3BottomSheet (45-976). The bar is 500 significant lines; this is 145 over it, 1.29× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: fragments/FragmentSettingsAppearance.java app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java — FileTooLong — 619 significant lines (blank, comment-only and punctuation-only lines excluded), about 90% of them inside a single declaration: FragmentSettingsAppearance (69-906). The bar is 500 significant lines; this is 119 over it, 1.24× 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: translate/AiTranslator.kt app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt — FileTooLong — 611 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 111 over it, 1.22× 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.
  • + 19 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×42
  • MethodTooLong: PlazaComposeFragment.onViewCreated app/src/main/java/ceui/pixiv/plaza/ui/PlazaComposeFragment.kt:84 — MethodTooLong — onViewCreated runs 318 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 218 over it, 3.18× 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: FragmentSettingsDownload.initData app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:46 — MethodTooLong — initData runs 294 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 194 over it, 2.94× 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: PlazaReportFragment.onViewCreated app/src/main/java/ceui/pixiv/plaza/ui/PlazaReportFragment.kt:54 — MethodTooLong — onViewCreated runs 275 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 175 over it, 2.75× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FragmentSettingsAppearance.initData app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:212 — MethodTooLong — initData runs 274 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 174 over it, 2.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: FragmentSettingsViewing.initData app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:56 — MethodTooLong — initData runs 271 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 171 over it, 2.71× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: ReferralPlanSheet.render app/src/main/java/ceui/pixiv/ui/referral/ReferralPlanSheet.kt:104 — MethodTooLong — render runs 248 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 148 over it, 2.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: SearchNovelRepo.initApi app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:90 — MethodTooLong — initApi runs 236 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 136 over it, 2.36× 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: ImageDetailActivity.initView app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:168 — MethodTooLong — initView runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SearchIllustRepo.initApi app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:94 — MethodTooLong — initApi runs 217 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 117 over it, 2.17× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: FragmentSettingsBrowsing.initData app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:73 — MethodTooLong — initData runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.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: NetworkTestViewModel.runTests app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:348 — MethodTooLong — runTests runs 196 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 96 over it, 1.96× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: NetworkTestViewModel.testTarget app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:635 — MethodTooLong — testTarget runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.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: ProfileManager.buildProfile app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt:111 — MethodTooLong — buildProfile runs 190 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 90 over it, 1.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: Manager.startDownloadChain app/src/main/java/ceui/lisa/core/Manager.java:1160 — MethodTooLong — startDownloadChain runs 184 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: SearchActivity.initData app/src/main/java/ceui/lisa/activities/SearchActivity.java:256 — MethodTooLong — initData runs 166 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 66 over it, 1.66× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: UgoiraEngine.runPipeline app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:572 — MethodTooLong — runPipeline runs 153 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 53 over it, 1.53× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CronetInterceptor.intercept app/src/main/java/ceui/lisa/http/CronetInterceptor.java:138 — MethodTooLong — intercept runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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: EpubExporter.export app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:30 — MethodTooLong — export runs 149 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 49 over it, 1.49× 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: Shaft.onCreate app/src/main/java/ceui/lisa/activities/Shaft.java:340 — MethodTooLong — onCreate runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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: FollowingExportSheet.show app/src/main/java/ceui/pixiv/ui/library/FollowingExportSheet.kt:50 — MethodTooLong — show runs 139 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 39 over it, 1.39× 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: PostView.bindReactions app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:523 — MethodTooLong — bindReactions runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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: FragmentEditAccount.submit app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:64 — MethodTooLong — submit runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainActivity.handleDrawerAction app/src/main/java/ceui/lisa/activities/MainActivity.java:1054 — MethodTooLong — handleDrawerAction runs 128 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 28 over it, 1.28× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MainActivity.initView app/src/main/java/ceui/lisa/activities/MainActivity.java:252 — MethodTooLong — initView runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Manager.runStagedTransfer app/src/main/java/ceui/lisa/core/Manager.java:1481 — MethodTooLong — runStagedTransfer runs 119 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 17 more in this group — see findings.md.
D3 · God Classes · TooManyMethods · ×39
  • TooManyMethods: Settings app/src/main/java/ceui/lisa/utils/Settings.java:24 — TooManyMethods — 351 methods. The bar is 30 methods; this is 321 over it, 11.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: NovelReaderV3Fragment app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:120 — TooManyMethods — 83 methods. The bar is 30 methods; this is 53 over it, 2.77× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ArtworkV3Fragment app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:94 — TooManyMethods — 77 methods. The bar is 30 methods; this is 47 over it, 2.57× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Manager app/src/main/java/ceui/lisa/core/Manager.java:70 — TooManyMethods — 60 methods. The bar is 30 methods; this is 30 over it, 2.00× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DownloadDao app/src/main/java/ceui/lisa/database/DownloadDao.java:20 — TooManyMethods — 59 methods. The bar is 30 methods; this is 29 over it, 1.97× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ProfileBean models/src/main/java/ceui/lisa/models/ProfileBean.java:10 — TooManyMethods — 51 methods. The bar is 30 methods; this is 21 over it, 1.70× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FragmentIllust app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:112 — TooManyMethods — 50 methods. The bar is 30 methods; this is 20 over it, 1.67× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SearchFilterV3BottomSheet app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:45 — TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Shaft app/src/main/java/ceui/lisa/activities/Shaft.java:63 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ApkDownloadManager app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:73 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 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.
  • TooManyMethods: NovelSeriesFragment app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:104 — TooManyMethods — 46 methods. The bar is 30 methods; this is 16 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.
  • TooManyMethods: ImageDetailActivity app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:102 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BookmarkMirrorService app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:90 — TooManyMethods — 44 methods. The bar is 30 methods; this is 14 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.
  • TooManyMethods: MainActivity app/src/main/java/ceui/lisa/activities/MainActivity.java:84 — 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: IllustNovelFilter app/src/main/java/ceui/lisa/helper/IllustNovelFilter.java:24 — 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: OtherFilterSheet app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:44 — 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: IllustAdapter app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:72 — 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: NetworkTestViewModel app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:232 — 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: NovelReaderView app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:39 — 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: DemoChatListFragment app/src/main/java/ceui/pixiv/chat/ui/DemoChatListFragment.kt:77 — 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: NovelReaderV3ViewModel app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt:56 — 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: NovelScrollReaderView app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:53 — 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: Common app/src/main/java/ceui/lisa/utils/Common.java:71 — 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: PixivOperate app/src/main/java/ceui/lisa/utils/PixivOperate.java:81 — 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: UgoiraFramesFragment app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:80 — 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.
  • + 14 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×32
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/widgets/RateAppDialog.kt:179 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:697 — `catch (ignored: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/user/UserTagSearchSheet.kt:147 — `catch (e: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:565 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:736 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:895 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:926 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:209 — `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) app/src/main/java/ceui/pixiv/ui/referral/ReferralRepository.kt:89 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/recommend/ArtistRankFeedFragment.kt:119 — `catch (e: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/discovery/DiscoverViewModel.kt:109 — `catch (e: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:296 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:2145 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/common/UIAction.kt:73 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3ViewModel.kt:297 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:194 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:233 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotBehaviorStore.kt:281 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/shaftapi/MediaUploader.kt:250 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt:593 — `catch (_: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt:1117 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt:1270 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/session/SessionManager.kt:525 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:215 — `catch (e: Exception)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) app/src/main/java/ceui/pixiv/i18n/AppLocales.kt:197 — `catch (t: Throwable)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • + 7 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×30
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:370 — app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:370-374 | app/src/main/java/ceui/pixiv/db/DbTiming.kt:97-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:227 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:227-232 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:272-276 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.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 (5 lines × 2) app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:491 — app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:491-495 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:342-349 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:491` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.kt:246 — app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.kt:246-250 | app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:118-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 `app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.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.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:372 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:372-376 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:557-561 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MarkdownExporter.kt:91 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/MarkdownExporter.kt:91-95 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/TxtExporter.kt:80-84 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/export/MarkdownExporter.kt:91` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:72 — app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:72-78 | app/src/main/java/ceui/pixiv/ui/pivision/PivisionRailFeedFragment.kt:102-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 `app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.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 (5 lines × 2) app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:130 — app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:130-134 | app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:276-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:130` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:202 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:202-206 | app/src/main/java/ceui/pixiv/ui/common/DetailFeedSupport.kt:65-69 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:481 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:481-485 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineFragment.kt:322-326 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:329 — app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:329-333 | app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.kt:257-261 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/task/CrossSeriesDownloadTask.kt:353 — app/src/main/java/ceui/pixiv/ui/task/CrossSeriesDownloadTask.kt:353-357 | app/src/main/java/ceui/pixiv/ui/task/MergeDownloadNovelSeriesTask.kt:219-223 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:126 — app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:126-131 | app/src/main/java/ceui/pixiv/ui/user/UserNovelByTagFeedFragment.kt:91-95 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/watchlater/NovelWatchLaterFeed.kt:56 — app/src/main/java/ceui/pixiv/ui/watchlater/NovelWatchLaterFeed.kt:56-60 | app/src/main/java/ceui/pixiv/ui/watchlater/WatchLaterFeedFragment.kt:87-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:146 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:146-150 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:167-171 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (5 lines × 2) app/src/main/java/ceui/pixiv/ui/upscale/ModelPickerDialog.kt:67 — app/src/main/java/ceui/pixiv/ui/upscale/ModelPickerDialog.kt:67-71 | app/src/main/java/ceui/pixiv/ui/upscale/RembgModelPickerDialog.kt:130-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:860 — app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:860-865 | app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:1110-1114 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:860` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:134 — app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:134-138 | app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:300-305 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:471 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:471-475 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineFragment.kt:312-316 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:471` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:255 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:255-259 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:264-268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:255` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:167 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:167-171 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:168-172 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.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 (5 lines × 2) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1237 — app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1237-1241 | app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1680-1684 — both copies are in the same file, so extract the 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) app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:172 — app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:172-176 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:203-207 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/pixiv/ui/translate/TextEraser.kt:93 — app/src/main/java/ceui/pixiv/ui/translate/TextEraser.kt:93-97 | app/src/main/java/ceui/pixiv/ui/translate/TextEraser.kt:131-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) app/src/main/java/ceui/lisa/core/Manager.java:442 — app/src/main/java/ceui/lisa/core/Manager.java:442-446 | app/src/main/java/ceui/lisa/core/Manager.java:831-835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×23
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:91 — app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:91-100 | app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:109-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:91` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 (10 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:880 — app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:880-889 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:503-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 `app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:880` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:265 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:265-274 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:271-280 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `reason` to `String): ListIllust = if (wantsPremiumOnlySort) fallbackPreview(reason) else fallbackPlain(reason) if (usePopularPreview` in one and `String): ListNovel = if (wantsPremiumOnlySort) fallbackPreview(reason) else fallbackPlain(reason) if (usePopularPreview` 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) app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:298 — app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:298-307 | app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:332-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:298` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:864 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:864-873 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:895-904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:864` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:112 — app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:112-122 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:78-87 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt` and `app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.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 (10 lines × 2) app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:374 — app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:374-383 | app/src/main/java/ceui/pixiv/ui/home/RecmdNovelFeedFragment.kt:71-80 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:374` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:395 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:395-404 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/PdfExporter.kt:118-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:395` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:83 — app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:83-92 | app/src/main/java/ceui/pixiv/ui/pivision/PivisionRailFeedFragment.kt:109-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 `app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:83` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:100 — app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:100-109 | app/src/main/java/ceui/pixiv/ui/pivision/PivisionRailFeedFragment.kt:125-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:264 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:264-273 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:377-386 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:264` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:491 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:491-500 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:678-687 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:491` it does not close everything it opens, so those exact lines 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) REDACTED:22 — REDACTED:22-31 | REDACTED:23-32 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:182 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:182-191 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:454-463 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:182` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt:124 — app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt:124-133 | app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.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 `app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt:124` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) app/src/main/java/ceui/lisa/activities/UActivity.kt:361 — app/src/main/java/ceui/lisa/activities/UActivity.kt:361-370 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:854-863 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/widgets/PixivBottomSheet.kt:43 — app/src/main/java/ceui/pixiv/widgets/PixivBottomSheet.kt:43-52 | app/src/main/java/ceui/pixiv/widgets/PixivDialog.kt:52-61 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:375 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:375-384 | app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:553-562 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:362 — app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:362-371 | app/src/main/java/ceui/pixiv/ui/user/UserMangaFeedFragment.kt:47-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 `app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:362` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/core/JavaAsync.kt:54 — app/src/main/java/ceui/lisa/core/JavaAsync.kt:54-63 | app/src/main/java/ceui/lisa/utils/PixivOps.kt:45-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/core/JavaAsync.kt:54` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/core/Manager.java:1068 — app/src/main/java/ceui/lisa/core/Manager.java:1068-1077 | app/src/main/java/ceui/lisa/core/Manager.java:1080-1089 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/core/Manager.java:1068` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:72 — app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:72-81 | app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:121-130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentLeft.java:222 — app/src/main/java/ceui/lisa/fragments/FragmentLeft.java:222-231 | app/src/main/java/ceui/lisa/fragments/FragmentViewPager.java:198-207 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (7 lines × 2) · ×22
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:432 — app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:432-438 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:321-327 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:574 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:574-580 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:727-733 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:574` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact 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 `b` to `CellNovelSeriesHeroBinding` in one and `CellNovelHeaderBinding` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1456 — app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1456-1462 | app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1523-1529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1523` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/task/CrossSeriesDownloadTask.kt:340 — app/src/main/java/ceui/pixiv/ui/task/CrossSeriesDownloadTask.kt:340-346 | app/src/main/java/ceui/pixiv/ui/task/MergeDownloadNovelSeriesTask.kt:202-208 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:98 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:98-104 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:300-306 — both copies are in the same file, so extract the 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) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:223 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:223-229 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:494-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:221` calls `remove` and `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:492` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt:352 — app/src/main/java/ceui/lisa/activities/UActivity.kt:352-358 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:865-871 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `app/src/main/java/ceui/lisa/activities/UActivity.kt:348` calls `setOnClickListener` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:862` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:150 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:150-156 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:150-156 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:277 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:277-283 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:378-384 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:666 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:666-672 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:509-515 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:519` calls `onClickBookmarkNovel`, `toggleNovelBookmark` and `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:674` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:745 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:745-751 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:631-637 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:250 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:250-256 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:246-252 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:250` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:402 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:402-408 | app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:573-579 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) REDACTED:76 — REDACTED:76-83 | REDACTED:106-112 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:103` calls `addAll`, `ProcessBuilder`, `environment` and `REDACTED:76` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:554 — app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:554-560 | app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:727-733 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:554` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:430 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:430-436 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:375-381 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:430` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:125 — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:125-131 | app/src/main/java/ceui/pixiv/ui/fanbox/FanboxPostDetailFeed.kt:143-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.kt:152 — app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.kt:152-158 | safe/src/main/java/ceui/pixiv/safe/auth/TokenStore.kt:59-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:145 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:145-151 | app/src/main/java/ceui/lisa/fragments/FragmentViewPager.java:273-279 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:804 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:804-810 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:859-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:157 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:157-163 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:167-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:963 — app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:963-969 | app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:972-978 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:963` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×22
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:277 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:277-282 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:334-339 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1136 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1136-1142 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1926-1931 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1136` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelDetailDecoration.kt:60 — app/src/main/java/ceui/pixiv/ui/novel/NovelDetailDecoration.kt:60-65 | app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesDecoration.kt:54-59 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/NovelDetailDecoration.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.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/usage/Nana7miUsageFragment.kt:788 — app/src/main/java/ceui/pixiv/ui/usage/Nana7miUsageFragment.kt:788-793 | app/src/main/java/ceui/pixiv/ui/usage/Nana7miUsageFragment.kt:820-825 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/usage/Nana7miUsageFragment.kt:788` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:154 — app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:154-159 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:177-182 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:154` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:153` calls `applyRefreshButton` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:176` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:407 — witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:407-412 | witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:448-453 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:407` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:284 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:284-289 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:327-332 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:326` calls `findItem` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:283` 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) app/src/main/java/ceui/pixiv/ui/translate/BubbleAreaFinder.kt:80 — app/src/main/java/ceui/pixiv/ui/translate/BubbleAreaFinder.kt:80-85 | app/src/main/java/ceui/pixiv/ui/translate/BubbleAreaFinder.kt:87-92 — both copies are in the same file, so extract the 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 (6 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:414 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:414-419 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:424-429 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) app/src/main/java/ceui/lisa/update/FragmentVersionHistory.kt:65 — app/src/main/java/ceui/lisa/update/FragmentVersionHistory.kt:65-70 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaBlockedUsersFragment.kt:40-45 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/lisa/update/FragmentVersionHistory.kt:62` calls `onCreateSkeletonView`, `VersionHistorySkeletonView`, `requireContext` and `app/src/main/java/ceui/pixiv/plaza/ui/PlazaBlockedUsersFragment.kt:38` 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) app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:677 — app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:677-682 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:332-337 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:843 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:843-848 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:550-555 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:389 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:389-394 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:742-747 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:738 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:738-743 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:624-629 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:76 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:76-81 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:76-81 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/notification/InfoCategoryListFragment.kt:49 — app/src/main/java/ceui/pixiv/ui/notification/InfoCategoryListFragment.kt:49-54 | app/src/main/java/ceui/pixiv/ui/notification/NotificationViewMoreFragment.kt:55-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:526 — app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:526-534 | app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:755-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 `app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:526` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:93 — app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:93-98 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:105-110 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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) app/src/main/java/ceui/lisa/helper/AppLevelStateHelper.java:36 — app/src/main/java/ceui/lisa/helper/AppLevelStateHelper.java:36-41 | app/src/main/java/ceui/lisa/helper/AppLevelStateHelper.java:44-49 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/helper/AppLevelStateHelper.java:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) app/src/main/java/ceui/lisa/utils/GlideUtil.java:64 — app/src/main/java/ceui/lisa/utils/GlideUtil.java:64-69 | app/src/main/java/ceui/lisa/utils/GlideUtil.java:83-88 — both copies are in the same file, so extract the 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) app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:609 — app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:609-614 | app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:618-623 — both copies are in the same file, so extract the 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) app/src/main/java/ceui/lisa/activities/SearchActivity.java:445 — app/src/main/java/ceui/lisa/activities/SearchActivity.java:445-450 | app/src/main/java/ceui/lisa/fragments/FragmentSearch.java: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 `app/src/main/java/ceui/lisa/activities/SearchActivity.java:445` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×21
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt:167 — app/src/main/java/ceui/lisa/activities/UActivity.kt:167-174 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:297-306 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/UActivity.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 (8 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkObjectFetcher.kt:107 — app/src/main/java/ceui/pixiv/ui/bulk/BulkObjectFetcher.kt:107-114 | app/src/main/java/ceui/pixiv/ui/bulk/BulkObjectFetcher.kt:126-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:58 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:58-65 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:60-67 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:58` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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 × 2) app/src/main/java/ceui/pixiv/ui/muted/MutedTagsFeedFragment.kt:167 — app/src/main/java/ceui/pixiv/ui/muted/MutedTagsFeedFragment.kt:167-174 | app/src/main/java/ceui/pixiv/ui/muted/MutedTagsFeedFragment.kt:176-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 `app/src/main/java/ceui/pixiv/ui/muted/MutedTagsFeedFragment.kt:167` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:140 — app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:140-147 | app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.kt:150-157 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.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.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:185 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:185-192 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:206-213 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:185` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:280 — app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:280-287 | app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:337-344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.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.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:243 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:243-250 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:514-521 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:473 — app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:473-480 | app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:570-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:473` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:103 — app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:103-110 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:69-76 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt` and `app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:100` calls `setTextColor`, `getColor` and `app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:66` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:346 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:346-353 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:519-526 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:515` calls `setImageDrawable`, `chevron`, `setAccessibilityHeading` and `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:343` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:316 — app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:316-323 | app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt:218-225 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/pinned/PinnedTagsFragment.kt:73 — app/src/main/java/ceui/pixiv/ui/pinned/PinnedTagsFragment.kt:73-81 | app/src/main/java/ceui/pixiv/ui/pinned/PinnedUsersFragment.kt:63-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/ui/pinned/PinnedTagsFragment.kt:84` calls `hasItems`, `isNotEmpty` and `app/src/main/java/ceui/pixiv/ui/pinned/PinnedUsersFragment.kt:72` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:283 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:283-290 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:136-143 — before extracting anything, compare `app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:291 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:291-298 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:144-151 — before extracting anything, compare `app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:95 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:95-102 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:116-123 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt` and `app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:570 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:570-577 | app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:346-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 `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:570` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1229 — app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1229-1236 | app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1733-1740 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1229` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/utils/PixivOperate.java:481 — app/src/main/java/ceui/lisa/utils/PixivOperate.java:481-488 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:515-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.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/utils/PixivOperate.java:543 — app/src/main/java/ceui/lisa/utils/PixivOperate.java:543-550 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:561-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/utils/PixivOperate.java:543` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) app/src/main/java/ceui/lisa/utils/Emoji.java:245 — app/src/main/java/ceui/lisa/utils/Emoji.java:245-252 | app/src/main/java/ceui/lisa/utils/Emoji.java:349-356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/utils/Emoji.java:245` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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.
DM11 · Constructible invalid state · Constructible in an invalid state · ×17
  • Constructible in an invalid state: ActionEntity actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:28 — `ActionEntity`'s public constructor takes `type`, `dedupeKey`, `payload`, `lastError`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ActionEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: QueueMetaEntity actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:55 — `QueueMetaEntity`'s public constructor takes `key` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `QueueMetaEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NovelAnnotationEntity app/src/main/java/ceui/lisa/database/NovelAnnotationEntity.kt:20 — `NovelAnnotationEntity`'s public constructor takes `excerpt`, `note` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelAnnotationEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NovelBookmarkEntity app/src/main/java/ceui/lisa/database/NovelBookmarkEntity.kt:14 — `NovelBookmarkEntity`'s public constructor takes `preview`, `note` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelBookmarkEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NovelCustomFontEntity app/src/main/java/ceui/lisa/database/NovelCustomFontEntity.kt:7 — `NovelCustomFontEntity`'s public constructor takes `displayName`, `relativePath`, `originalUri` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelCustomFontEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: NovelCustomThemeEntity app/src/main/java/ceui/lisa/database/NovelCustomThemeEntity.kt:7 — `NovelCustomThemeEntity`'s public constructor takes `name`, `backgroundImagePath` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `NovelCustomThemeEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: ChatMessageEntity app/src/main/java/ceui/pixiv/chat/data/ChatMessageEntity.kt:46 — `ChatMessageEntity`'s public constructor takes `localKey`, `clientMsgId`, `room`, `displayName`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ChatMessageEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: DiscoveryEntity app/src/main/java/ceui/pixiv/db/DiscoveryEntity.kt:7 — `DiscoveryEntity`'s public constructor takes `illustJson`, `source` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DiscoveryEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: GeneralEntity app/src/main/java/ceui/pixiv/db/GeneralEntity.kt:28 — `GeneralEntity`'s public constructor takes `json` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `GeneralEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: RemoteKey app/src/main/java/ceui/pixiv/db/RemoteKey.kt:7 — `RemoteKey`'s public constructor takes `nextPageUrl` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `RemoteKey` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: BookmarkMirrorEntity app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorEntity.kt:71 — `BookmarkMirrorEntity`'s public constructor takes `shelfKey`, `payloadJson`, `title`, `authorName`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookmarkMirrorEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: BookmarkMirrorStateEntity app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorStateEntity.kt:26 — `BookmarkMirrorStateEntity`'s public constructor takes `shelfKey`, `nextUrl`, `lastError` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookmarkMirrorStateEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: BookmarkMirrorTagEntity app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorTagEntity.kt:35 — `BookmarkMirrorTagEntity`'s public constructor takes `shelfKey`, `tagName`, `displayName`, `translatedName` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `BookmarkMirrorTagEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: DownloadQueueEntity app/src/main/java/ceui/pixiv/db/queue/DownloadQueueEntity.kt:15 — `DownloadQueueEntity`'s public constructor takes `type`, `sourceTag`, `status`, `errorMsg`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `DownloadQueueEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: SynonymTagEntity app/src/main/java/ceui/pixiv/db/synonym/SynonymTagEntity.kt:23 — `SynonymTagEntity`'s public constructor takes `name`, `remark` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SynonymTagEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: SynonymTargetEntity app/src/main/java/ceui/pixiv/db/synonym/SynonymTargetEntity.kt:18 — `SynonymTargetEntity`'s public constructor takes `name` as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `SynonymTargetEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
  • Constructible in an invalid state: ComicBookmarkEntity app/src/main/java/ceui/lisa/database/ComicBookmarkEntity.java:33 — `ComicBookmarkEntity`'s public constructor takes `illustId`, `pageIndex`, `totalPages`, `previewUrl`, … as raw primitives, and neither of the two things that would make that safe was found. What was searched, so you can tell an absence from a miss: for VALIDATION, the constructor body was scanned for `throw`, `Guard.`, `Ensure.`, `ArgumentNullException`, `ArgumentException`, `CheckRule`, `Requires.` or an `…Exception.ThrowIf…(` helper, and so was any method of this type it calls — a guard reached further than that is not seen. A static factory beside it was NOT counted: while this constructor is public a caller can skip the factory. If the constructor validates in a way this search misses, this row is wrong. If it does not, a caller can build a `ComicBookmarkEntity` that breaks the rules it exists to enforce, and every rule downstream then has to cope with a state the model said was impossible. Guard in the constructor, take value objects that validate themselves, or make the constructor private behind a `Create` that can refuse.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×14
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:248 — app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:248-263 | app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:277-290 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/NovelDetailDecoration.kt:59 — app/src/main/java/ceui/pixiv/ui/novel/NovelDetailDecoration.kt:59-72 | app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesDecoration.kt:53-66 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:83 — app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:83-107 | app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:110-123 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:404 — witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:404-417 | witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Palette.kt:441-458 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/actions/PixivActionHandlers.kt:217 — app/src/main/java/ceui/pixiv/actions/PixivActionHandlers.kt:217-230 | app/src/main/java/ceui/pixiv/actions/PixivActionHandlers.kt:234-249 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/lisa/activities/BaseActivity.java:140 — app/src/main/java/ceui/lisa/activities/BaseActivity.java:140-153 | app/src/main/java/ceui/lisa/fragments/BaseFragment.java:125-141 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/ui/muted/MutedUserFeedFragment.kt:90 — app/src/main/java/ceui/pixiv/ui/muted/MutedUserFeedFragment.kt:90-107 | app/src/main/java/ceui/pixiv/ui/user/LikeUsersFeedFragment.kt:131-144 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/lisa/repo/ViewerBookmarkState.kt:31 — app/src/main/java/ceui/lisa/repo/ViewerBookmarkState.kt:31-48 | app/src/main/java/ceui/lisa/repo/ViewerBookmarkState.kt:50-63 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/chat/api/ShaftChatHttpClient.kt:19 — app/src/main/java/ceui/pixiv/chat/api/ShaftChatHttpClient.kt:19-32 | app/src/main/java/ceui/pixiv/events/ShaftEventsApi.kt:62-77 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/lisa/file/LegacyFile.java:77 — app/src/main/java/ceui/lisa/file/LegacyFile.java:77-90 | app/src/main/java/ceui/lisa/file/LegacyFile.java:102-115 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) banner/src/main/java/ceui/pixiv/banner/RealBannerManager.kt:94 — banner/src/main/java/ceui/pixiv/banner/RealBannerManager.kt:94-107 | banner/src/main/java/ceui/pixiv/banner/RealBannerManager.kt:109-122 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/ColorPickerViews.kt:115 — app/src/main/java/ceui/pixiv/ui/settings/ColorPickerViews.kt:115-130 | app/src/main/java/ceui/pixiv/ui/settings/ColorPickerViews.kt:186-199 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/lisa/download/FileSizeUtil.java:30 — app/src/main/java/ceui/lisa/download/FileSizeUtil.java:30-43 | app/src/main/java/ceui/lisa/download/FileSizeUtil.java:65-78 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (14 corresponding lines) app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:76 — app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:76-89 | app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:91-104 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×14
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:94 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:94-104 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:696-710 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:129 — app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:129-140 | app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:275-285 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/lisa/transformer/ViewPagerTransformers.kt:23 — app/src/main/java/ceui/lisa/transformer/ViewPagerTransformers.kt:23-33 | app/src/main/java/ceui/lisa/transformer/ViewPagerTransformers.kt:37-47 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:238 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:238-253 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:106-116 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/v3/V3BottomSheetBase.kt:48 — app/src/main/java/ceui/pixiv/ui/search/v3/V3BottomSheetBase.kt:48-66 | app/src/main/java/ceui/pixiv/widgets/PixivBottomSheet.kt:27-37 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:240 — app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:240-250 | app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:378-388 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/lisa/activities/SearchActivity.java:398 — app/src/main/java/ceui/lisa/activities/SearchActivity.java:398-408 | app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:237-247 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:376 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:376-387 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:730-740 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1980 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1980-1992 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1994-2004 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/lisa/helper/LanguageHelper.java:15 — app/src/main/java/ceui/lisa/helper/LanguageHelper.java:15-26 | app/src/main/java/ceui/lisa/helper/LanguageHelper.java:33-43 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/lisa/utils/Common.java:198 — app/src/main/java/ceui/lisa/utils/Common.java:198-209 | app/src/main/java/ceui/lisa/utils/Common.java:216-226 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:211 — app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:211-221 | app/src/main/java/ceui/pixiv/ui/collection/LikeNovelFeedFragment.kt:159-177 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:79 — app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:79-92 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:71-81 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:287 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:287-297 | app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:346-356 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×14
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:751 — app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:751-757 | app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:768-780 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1046 — app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1046-1052 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1103-1111 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/chat/ui/ChatMessageAdapter.kt:641 — app/src/main/java/ceui/pixiv/chat/ui/ChatMessageAdapter.kt:641-647 | app/src/main/java/ceui/pixiv/chat/ui/ChatRoomListAdapter.kt:45-51 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/HotWorksFeed.kt:76 — app/src/main/java/ceui/pixiv/ui/recommend/HotWorksFeed.kt:76-83 | app/src/main/java/ceui/pixiv/ui/recommend/HotWorksFeed.kt:92-98 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:239 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:239-245 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:277-284 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:266 — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:266-273 | REDACTED:705-711 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/ui/notification/InfoLatestFragment.kt:75 — app/src/main/java/ceui/pixiv/ui/notification/InfoLatestFragment.kt:75-82 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:412-418 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ChapterListSheet.kt:159 — app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ChapterListSheet.kt:159-165 | app/src/main/java/ceui/pixiv/utils/BottomSheetInsets.kt:75-81 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentViewPager.java:61 — app/src/main/java/ceui/lisa/fragments/FragmentViewPager.java:61-67 | app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:132-139 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) witstudio/src/main/java/ceui/pixiv/witstudio/dialog/WitDialogMetrics.kt:110 — witstudio/src/main/java/ceui/pixiv/witstudio/dialog/WitDialogMetrics.kt:110-117 | witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:175-181 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentIllustViewModel.kt:80 — app/src/main/java/ceui/lisa/fragments/FragmentIllustViewModel.kt:80-86 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3ViewModel.kt:97-103 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:89 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:89-96 | app/src/main/java/ceui/pixiv/ui/common/NovelFeedItem.kt:83-89 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/utils/KUtils.kt:30 — app/src/main/java/ceui/pixiv/utils/KUtils.kt:30-36 | app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:452-458 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) app/src/main/java/ceui/pixiv/utils/KUtils.kt:38 — app/src/main/java/ceui/pixiv/utils/KUtils.kt:38-44 | app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:460-466 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×14
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:352 — app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:352-363 | app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:465-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:349` calls `renderHistorySnapshotButton` and `app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:463` 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 (12 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:442 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:442-453 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:451-462 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:442` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:42 — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:42-53 | app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:98-109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:42` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt:33 — app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotRepository.kt:33-44 | app/src/main/java/ceui/pixiv/snapshot/SnapshotRepository.kt:105-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:106 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:106-117 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:106-117 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:106` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:329 — app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:329-340 | app/src/main/java/ceui/pixiv/ui/download/QueueListV3Fragment.kt:285-296 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:55 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:55-66 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:126-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:55` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:191 — app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:191-202 | app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.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 `app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:191` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:305 — app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:305-316 | app/src/main/java/ceui/pixiv/ui/user/RequestPlanFeedFragment.kt:133-144 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:305` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/common/IllustCardMenu.kt:55 — app/src/main/java/ceui/pixiv/ui/common/IllustCardMenu.kt:55-66 | app/src/main/java/ceui/pixiv/ui/common/NovelCardMenu.kt:45-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 `app/src/main/java/ceui/pixiv/ui/common/IllustCardMenu.kt:55` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:156 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:156-167 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:177-188 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:455 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:455-466 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:464-475 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.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 (12 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:502 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:502-513 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:511-522 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:502` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:100 — app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:100-111 | app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:156-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 `app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.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 (9 lines × 2) · ×14
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:392 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:392-400 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:310-318 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:322` calls `Deprecated` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:404` 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) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:328 — app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:328-336 | app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:451-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:328` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:572 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:572-580 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:569-577 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:98 — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:98-106 | app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:161-169 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:98` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:104 — app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:104-112 | app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:123-131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:272 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:272-280 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:467-475 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:272` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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, `app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:465` calls `clear` and `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:270` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:172 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:172-180 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:176-184 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.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.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:110 — app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:110-118 | app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:148-156 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:728 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:728-736 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:598-606 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) app/src/main/java/ceui/pixiv/ui/upscale/RembgPreviewFragment.kt:25 — app/src/main/java/ceui/pixiv/ui/upscale/RembgPreviewFragment.kt:25-33 | app/src/main/java/ceui/pixiv/ui/upscale/UpscaleCompareFragment.kt:26-35 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/ui/upscale/UpscaleCompareFragment.kt:38` calls `getString` and `app/src/main/java/ceui/pixiv/ui/upscale/RembgPreviewFragment.kt:37` 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) app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:173 — app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:173-181 | app/src/main/java/ceui/pixiv/ui/user/UserNovelByTagFeedFragment.kt:128-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:173` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/pixiv/actions/PixivActions.kt:201 — app/src/main/java/ceui/pixiv/actions/PixivActions.kt:201-209 | app/src/main/java/ceui/pixiv/actions/PixivActions.kt:247-255 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/actions/PixivActions.kt:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:459 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:459-467 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:629-637 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:112 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:112-120 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:177-185 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java: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 · Edited copy of a member (15 corresponding lines) · ×13
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/lisa/utils/GlideUtil.java:58 — app/src/main/java/ceui/lisa/utils/GlideUtil.java:58-72 | app/src/main/java/ceui/lisa/utils/GlideUtil.java:74-91 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/lisa/utils/PixivOperate.java:536 — app/src/main/java/ceui/lisa/utils/PixivOperate.java:536-550 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:554-568 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/ui/prime/CorpusTagsFragment.kt:75 — app/src/main/java/ceui/pixiv/ui/prime/CorpusTagsFragment.kt:75-89 | app/src/main/java/ceui/pixiv/ui/prime/PrimeTagsFragment.kt:77-91 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/db/mirror/BookmarkShelfFetcher.kt:49 — app/src/main/java/ceui/pixiv/db/mirror/BookmarkShelfFetcher.kt:49-63 | app/src/main/java/ceui/pixiv/db/mirror/BookmarkShelfFetcher.kt:69-83 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/ThemeColorFeedFragment.kt:210 — app/src/main/java/ceui/pixiv/ui/settings/ThemeColorFeedFragment.kt:210-226 | app/src/main/java/ceui/pixiv/ui/settings/ThemeColorFeedFragment.kt:235-249 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:152 — app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:152-166 | app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:168-185 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) REDACTED:108 — REDACTED:108-126 | REDACTED:143-157 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/download/Downloads.kt:205 — app/src/main/java/ceui/pixiv/download/Downloads.kt:205-220 | app/src/main/java/ceui/pixiv/download/sanitize/FsSanitizer.kt:51-65 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/lisa/core/JavaAsync.kt:49 — app/src/main/java/ceui/lisa/core/JavaAsync.kt:49-63 | app/src/main/java/ceui/lisa/utils/PixivOps.kt:40-54 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:293 — app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:293-307 | app/src/main/java/ceui/pixiv/chat/api/ChatFrame.kt:325-341 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:130 — app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:130-144 | app/src/main/java/ceui/pixiv/ui/settings/WebDavSettingsFragment.kt:206-220 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/download/model/DownloadRecordSlim.kt:207 — app/src/main/java/ceui/pixiv/download/model/DownloadRecordSlim.kt:207-221 | app/src/main/java/ceui/pixiv/download/model/DownloadRecordSlim.kt:227-243 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) app/src/main/java/ceui/pixiv/muzei/MuzeiPrefs.kt:60 — app/src/main/java/ceui/pixiv/muzei/MuzeiPrefs.kt:60-74 | app/src/main/java/ceui/pixiv/widget/WidgetBookmarkReceiver.kt:22-40 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×13
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:468 — app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:468-480 | app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:566-577 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:470 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:470-482 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:340-351 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:259 — app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:259-277 | app/src/main/java/ceui/pixiv/download/backend/SilentDownload.kt:139-150 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/ViewRankFragment.kt:87 — app/src/main/java/ceui/pixiv/ui/recommend/ViewRankFragment.kt:87-102 | app/src/main/java/ceui/pixiv/ui/recommend/WallpaperIllustFeedFragment.kt:68-79 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/RankFeeds.kt:50 — app/src/main/java/ceui/pixiv/ui/recommend/RankFeeds.kt:50-63 | app/src/main/java/ceui/pixiv/ui/recommend/WallpaperIllustFeedFragment.kt:83-94 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/ThemeColorFeedFragment.kt:118 — app/src/main/java/ceui/pixiv/ui/settings/ThemeColorFeedFragment.kt:118-132 | app/src/main/java/ceui/pixiv/ui/settings/ThemeColorFeedFragment.kt:152-163 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/lisa/view/ContextMenuTitleView.java:37 — app/src/main/java/ceui/lisa/view/ContextMenuTitleView.java:37-48 | app/src/main/java/ceui/lisa/view/ContextMenuTitleView.java:50-61 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/lisa/core/Manager.java:516 — app/src/main/java/ceui/lisa/core/Manager.java:516-531 | app/src/main/java/ceui/lisa/core/Manager.java:739-750 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:391 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:391-402 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:309-320 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:197 — app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:197-208 | app/src/main/java/ceui/pixiv/ui/collection/LikeNovelFeedFragment.kt:145-156 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:505 — app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:505-516 | app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:518-532 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/actions/PixivActions.kt:271 — app/src/main/java/ceui/pixiv/actions/PixivActions.kt:271-286 | app/src/main/java/ceui/pixiv/actions/PixivActions.kt:405-416 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:622 — app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:622-633 | app/src/main/java/ceui/pixiv/utils/ViewUtils.kt:635-646 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D35 · Change Coupling · Change coupling · ×11
  • Change coupling: SearchFilterV3BottomSheet.kt ↔ SearchFilterV3LegacyBridge.kt app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:1 — `app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt` and `app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.kt` change together 94% of the time (16 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `b64a65c2` fix(search): 「可能妨碍搜索的作品」页记、双 tab 与系列归纳三处失效; `10f8a989` feat(search): 补上「可能妨碍搜索的作品」维度; `a2bdd9b2` feat(search): 其他条件的 AI 作品 / 过滤已收藏 / R-18 改为三层持久化 — run `git show` on any of them.
  • Change coupling: Android10DownloadFactory22.kt ↔ SAFactory.java app/src/main/java/ceui/lisa/helper/Android10DownloadFactory22.kt:1 — `app/src/main/java/ceui/lisa/helper/Android10DownloadFactory22.kt` and `app/src/main/java/ceui/lisa/helper/SAFactory.java` change together 86% of the time (12 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 12 shared commits counted here, the most recent 3 are `2e048fa7` fix(download): 修复 MediaStore 发布失败仍记录下载成功; `e46fa0a6` fix(download): 保存非原图时同步文件后缀与 MIME; `e57501ae` feat(download): 断点续传(url-key stage + manifest 校验 + 进度看门狗) — run `git show` on any of them.
  • Change coupling: ImageDetailActivity.kt ↔ IllustAiHelper.kt app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1 — `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt` and `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `8b3c1566` fix(artwork): 补齐 AI 完成反馈,已看过的结果不再重复提示; `b89b8264` fix(artwork): 修复跨页面 AI 任务订阅与遮罩竞争; `dd920304` fix(artwork): 修复 AI 工作流状态恢复与页面回归 — run `git show` on any of them.
  • Change coupling: PlazaComposeViewModel.kt ↔ PlazaFragment.kt app/src/main/java/ceui/pixiv/plaza/ui/PlazaComposeViewModel.kt:1 — `app/src/main/java/ceui/pixiv/plaza/ui/PlazaComposeViewModel.kt` and `app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt` change together 70% of the time (7 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `22df0198` feat(plaza): 发帖成功回到列表时把新帖置顶、滚到顶并高亮; `2cff4a2e` fix(plaza): 图片上传断点续传并自动刷新过期的媒体签名; `d1bd0964` fix(plaza): 统一应用顶栏并恢复页面预测性返回 — run `git show` on any of them.
  • Change coupling: OtherFilterSheet.kt ↔ SearchFilterV3LegacyBridge.kt app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:1 — `app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt` and `app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.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 — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `10f8a989` feat(search): 补上「可能妨碍搜索的作品」维度; `a2bdd9b2` feat(search): 其他条件的 AI 作品 / 过滤已收藏 / R-18 改为三层持久化; `3b7c825b` feat(search): 其他条件的 AI 作品 / 过滤已收藏 改为「单击临时、长按持久化」 — run `git show` on any of them.
  • Change coupling: HttpDns.java ↔ RubySSLSocketFactory.java app/src/main/java/ceui/lisa/http/HttpDns.java:1 — `app/src/main/java/ceui/lisa/http/HttpDns.java` and `app/src/main/java/ceui/lisa/http/RubySSLSocketFactory.java` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 6 shared commits counted here, the most recent 3 are `f5bee29b` fix: direct-connect code cleanup — dead code, thread safety, resource…; `d15b60fc` feat: add detailed timing logs for direct-connect API requests; `6d834cf3` feat: QUIC direct-connect bypass for GFW TCP RST on pixiv SNI — run `git show` on any of them.
  • Change coupling: Retro.java ↔ PixivLogin.kt app/src/main/java/ceui/lisa/http/Retro.java:1 — `app/src/main/java/ceui/lisa/http/Retro.java` and `app/src/main/java/ceui/pixiv/login/PixivLogin.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 — 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 `bf364dd2` fix(network): libcronet 加载失败时退回普通 OkHttp,不再每次建 client 都崩; `6af23d2f` refactor(network): 收敛 app-api/www 超时并加 IPv4-only DNS,comic 接入; `32966ff9` refactor(network): 收敛 app-api/OAuth/PxveAPI 代理超时到 AppApiTimeouts,值不变 — run `git show` on any of them.
  • Change coupling: REDACTED ↔ PixivLogin.kt app/src/main/java/ceui/pixiv/api/Client.kt:1 — `app/src/main/java/ceui/pixiv/api/Client.kt` and `app/src/main/java/ceui/pixiv/login/PixivLogin.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 — 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 `bf364dd2` fix(network): libcronet 加载失败时退回普通 OkHttp,不再每次建 client 都崩; `6af23d2f` refactor(network): 收敛 app-api/www 超时并加 IPv4-only DNS,comic 接入 (at that commit the file was still `REDACTED`); `32966ff9` refactor(network): 收敛 app-api/OAuth/PxveAPI 代理超时到 AppApiTimeouts,值不变 (at that commit the file was still `REDACTED`) — run `git show` on any of them.
  • Change coupling: EntityWrapper.kt ↔ GeneralDao.kt app/src/main/java/ceui/pixiv/db/EntityWrapper.kt:1 — `app/src/main/java/ceui/pixiv/db/EntityWrapper.kt` and `app/src/main/java/ceui/pixiv/db/GeneralDao.kt` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 6 shared commits counted here, the most recent 3 are `166277c1` fix(novel): #991 review 回补——稍后再看拆独立 recordType,粒子 attach / 占位条 / 底部 i…; `4b8c51b9` feat(novel): 小说卡长按菜单二期——屏蔽此作品 + 稍后再看(tab); `fe3adf07` fix(watch-later): 去掉无用的 onResume 全表 reload + 清死代码 + 屏蔽集合并发安全 — run `git show` on any of them.
  • Change coupling: TemplateActivity.java ↔ ShaftApiV2.kt app/src/main/java/ceui/lisa/activities/TemplateActivity.java:1 — `app/src/main/java/ceui/lisa/activities/TemplateActivity.java` and `app/src/main/java/ceui/lisa/network/ShaftApiV2.kt` change together 53% of the time (10 of the 19 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `8fd8e4c5` feat(center): 发现页接入 全年龄榜/动图榜/人气画师/系列榜/新作榜/长篇小说 6 个入口; `6ed288eb` feat(discover): 标签专区 + 壁纸榜,年代榜换 bottom sheet 选择; `bba35393` feat(discover): 发现页新增收藏榜 / AI 榜 / 年代榜 — run `git show` on any of them.
  • Change coupling: NovelReaderView.kt ↔ NovelScrollReaderView.kt app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:1 — `app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `aceee6bc` fix(novel): 阅读器「防误触」点正文仍会翻页、呼出菜单;开启后改为长按呼出菜单,横向/纵向两种模式都生效 (#1159); `efb64e50` fix(novel): 取消过期的朗读跟随与延迟翻页 (#1139); `6a92fd6d` fix(novel): 修正朗读跟随与触摸冲突及章节高亮 (#1139) — run `git show` on any of them.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×11
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:732 — app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:732-739 | app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:741-749 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:267 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:267-274 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:315-322 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/lisa/transformer/ViewPagerTransformers.kt:227 — app/src/main/java/ceui/lisa/transformer/ViewPagerTransformers.kt:227-234 | app/src/main/java/ceui/lisa/transformer/ViewPagerTransformers.kt:267-275 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:547 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:547-554 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:556-563 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:908 — app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:908-916 | app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1455-1462 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:957 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:957-964 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:703-710 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:356 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:356-363 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/PdfExporter.kt:196-203 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:393 — app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:393-400 | app/src/main/java/ceui/pixiv/ui/detail/UgoiraPlayerView.kt:975-983 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:140 — app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:140-148 | app/src/main/java/ceui/pixiv/ui/user/UserNovelByTagFeedFragment.kt:99-106 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/user/UserMangaSeriesFeedFragment.kt:191 — app/src/main/java/ceui/pixiv/ui/user/UserMangaSeriesFeedFragment.kt:191-198 | app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt:134-141 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/HotWorksIllustFeedFragment.kt:61 — app/src/main/java/ceui/pixiv/ui/recommend/HotWorksIllustFeedFragment.kt:61-69 | app/src/main/java/ceui/pixiv/ui/recommend/HotWorksNovelFeedFragment.kt:33-40 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×11
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:423 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:423-435 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:433-445 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:423` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:73 — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:73-85 | app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:123-135 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:73` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:134 — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:134-146 | app/src/main/java/ceui/pixiv/ui/fanbox/FanboxPostDetailFeed.kt:152-164 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:134` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/pinned/PinnedTabsFragment.kt:35 — app/src/main/java/ceui/pixiv/ui/pinned/PinnedTabsFragment.kt:35-47 | app/src/main/java/ceui/pixiv/ui/watchlater/WatchLaterTabsFragment.kt:43-55 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/pinned/PinnedTabsFragment.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 (13 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:116 — app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:116-128 | app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:283-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:116` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:115` calls `run` and `app/src/main/java/ceui/pixiv/ui/settings/MoonSync.kt:282` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:213 — app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:213-225 | app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt:111-123 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:121 — app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:121-133 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:125-137 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.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 (13 lines × 2) app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:140 — app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:140-152 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:164-176 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:153` calls `applyRefreshButton` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:177` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:208 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:208-220 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:167-179 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:208` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:135 — app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:135-147 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:462-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.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.
  • Duplicated block (13 lines × 2) app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:68 — app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:68-80 | app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:87-99 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×11
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt:38 — app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt:38-48 | app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt:71-81 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:313 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:313-323 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:321-331 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:313` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt:126 — app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt:126-136 | app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt:194-204 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt:126` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:335 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:335-345 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:375-385 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt` and `app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `picked` to `List<Illust>` in one and `List<Novel>` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/notification/InfoCategoryListFragment.kt:65 — app/src/main/java/ceui/pixiv/ui/notification/InfoCategoryListFragment.kt:65-75 | app/src/main/java/ceui/pixiv/ui/notification/InfoLatestFragment.kt:63-73 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:103 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:103-115 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:133-143 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:103` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:234 — app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:234-244 | app/src/main/java/ceui/pixiv/ui/settings/WebDavSettingsFragment.kt:189-199 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.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.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:553 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:553-563 | app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.kt:234-244 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:553` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/file/LegacyFile.java:80 — app/src/main/java/ceui/lisa/file/LegacyFile.java:80-90 | app/src/main/java/ceui/lisa/file/LegacyFile.java:105-115 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/file/LegacyFile.java:80` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentCenter.java:81 — app/src/main/java/ceui/lisa/fragments/FragmentCenter.java:81-91 | app/src/main/java/ceui/lisa/fragments/FragmentRight.java:90-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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/lisa/fragments/FragmentRight.java:86` calls `initView`, `ViewModelProvider`, `get` and `app/src/main/java/ceui/lisa/fragments/FragmentCenter.java:80` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:153 — app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:153-163 | app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:169-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.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×10
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/lisa/view/DynamicHeightImageView.java:162 — app/src/main/java/ceui/lisa/view/DynamicHeightImageView.java:162-177 | app/src/main/java/ceui/lisa/view/DynamicHeightImageView.java:180-199 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:90 — app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:90-105 | app/src/main/java/ceui/lisa/activities/UserV3WorkTabFragment.kt:108-127 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:932 — app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:932-947 | app/src/main/java/ceui/pixiv/ui/translate/GoogleWebTranslator.kt:137-152 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.kt:181 — app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.kt:181-196 | safe/src/main/java/ceui/pixiv/safe/auth/TokenStore.kt:174-191 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:436 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedFragment.kt:436-451 | app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:582-597 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt:228 — app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt:228-250 | app/src/main/java/ceui/pixiv/ui/recommend/TrendingArtistsFragment.kt:177-192 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/lisa/helper/WebLinkHelper.kt:134 — app/src/main/java/ceui/lisa/helper/WebLinkHelper.kt:134-149 | app/src/main/java/ceui/lisa/helper/WebLinkHelper.kt:151-167 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:29 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:29-44 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt:75-92 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:217 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:217-235 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:244-259 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:345 — app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:345-360 | app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:150-166 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×10
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1055 — app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1055-1064 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1114-1127 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestFragment.kt:206 — app/src/main/java/ceui/pixiv/ui/debug/NetworkTestFragment.kt:206-215 | app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1771-1780 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/download/config/DownloadItems.kt:351 — app/src/main/java/ceui/pixiv/download/config/DownloadItems.kt:351-361 | app/src/main/java/ceui/pixiv/download/config/DownloadItems.kt:372-381 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/session/SessionManager.kt:133 — app/src/main/java/ceui/pixiv/session/SessionManager.kt:133-142 | app/src/main/java/ceui/pixiv/ui/discovery/WebDiscoveryFragment.kt:74-86 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:378 — app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:378-391 | app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt:148-157 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:382 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:382-394 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:242-251 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt:91 — app/src/main/java/ceui/pixiv/ui/common/UserFeedFragment.kt:91-106 | app/src/main/java/ceui/pixiv/ui/recommend/TrendingArtistsFragment.kt:109-118 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:361 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:361-370 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:407-419 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/lisa/core/FilterMapper.java:20 — app/src/main/java/ceui/lisa/core/FilterMapper.java:20-29 | app/src/main/java/ceui/lisa/core/NovelFilterMapper.java:30-40 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) app/src/main/java/ceui/lisa/file/SAFile.java:22 — app/src/main/java/ceui/lisa/file/SAFile.java:22-33 | app/src/main/java/ceui/lisa/download/FileCreator.java:48-57 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×9
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:279 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:279-291 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:321-333 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/lisa/activities/SearchActivity.java:581 — app/src/main/java/ceui/lisa/activities/SearchActivity.java:581-595 | app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:549-561 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/lisa/activities/SearchActivity.java:697 — app/src/main/java/ceui/lisa/activities/SearchActivity.java:697-709 | app/src/main/java/ceui/lisa/fragments/FragmentLeft.java:118-139 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/pixiv/ui/download/DoneListV3Fragment.kt:347 — app/src/main/java/ceui/pixiv/ui/download/DoneListV3Fragment.kt:347-359 | app/src/main/java/ceui/pixiv/ui/novel/local/LocalLibraryFragment.kt:178-190 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/pixiv/ui/watchlater/NovelWatchLaterFeed.kt:75 — app/src/main/java/ceui/pixiv/ui/watchlater/NovelWatchLaterFeed.kt:75-87 | app/src/main/java/ceui/pixiv/ui/watchlater/WatchLaterFeedFragment.kt:123-135 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:156 — app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:156-169 | app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:340-352 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/pixiv/plaza/ui/PlazaImageViewer.kt:19 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaImageViewer.kt:19-38 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt:397-409 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) REDACTED:560 — REDACTED:560-572 | REDACTED:575-591 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (13 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:379 — app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:379-391 | witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Views.kt:100-112 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×9
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:268 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:268-276 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:310-319 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/DetailFeedSupport.kt:112 — app/src/main/java/ceui/pixiv/ui/common/DetailFeedSupport.kt:112-120 | app/src/main/java/ceui/pixiv/ui/common/DetailFeedSupport.kt:122-130 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/PixivFragmentUtils.kt:106 — app/src/main/java/ceui/pixiv/ui/common/PixivFragmentUtils.kt:106-123 | app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:611-619 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/pixiv/ui/notification/NotificationListFragment.kt:70 — app/src/main/java/ceui/pixiv/ui/notification/NotificationListFragment.kt:70-78 | app/src/main/java/ceui/pixiv/ui/notification/NotificationViewMoreFragment.kt:95-104 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/pixiv/ui/muted/MutedUserFeedFragment.kt:109 — app/src/main/java/ceui/pixiv/ui/muted/MutedUserFeedFragment.kt:109-117 | app/src/main/java/ceui/pixiv/ui/user/LikeUsersFeedFragment.kt:146-157 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:141 — app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:141-149 | app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:155-163 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/lisa/file/LegacyFile.java:61 — app/src/main/java/ceui/lisa/file/LegacyFile.java:61-75 | app/src/main/java/ceui/lisa/file/LegacyFile.java:92-100 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/lisa/view/LinearItemDecoration.java:17 — app/src/main/java/ceui/lisa/view/LinearItemDecoration.java:17-25 | app/src/main/java/ceui/lisa/view/LinearItemHorizontalDecoration.java:17-25 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/RelatedIllustFeedFragment.kt:132 — app/src/main/java/ceui/pixiv/ui/detail/RelatedIllustFeedFragment.kt:132-143 | app/src/main/java/ceui/pixiv/ui/newworks/LatestIllustFeedFragment.kt:70-78 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×9
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:427 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:427-434 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:450-455 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/referral/ReferralPlanFragment.kt:117 — app/src/main/java/ceui/pixiv/ui/referral/ReferralPlanFragment.kt:117-124 | app/src/main/java/ceui/pixiv/ui/referral/ReferralPlanSheet.kt:432-437 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/NovelMarkersFeedFragment.kt:156 — app/src/main/java/ceui/pixiv/ui/novel/NovelMarkersFeedFragment.kt:156-162 | app/src/main/java/ceui/pixiv/ui/user/UserNovelSeriesFeedFragment.kt:167-172 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:82 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:82-88 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:235-240 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/v3/DurationPickerSheet.kt:114 — app/src/main/java/ceui/pixiv/ui/search/v3/DurationPickerSheet.kt:114-119 | app/src/main/java/ceui/pixiv/ui/search/v3/SimplePickerSheet.kt:105-110 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/prime/CorpusTagsFragment.kt:91 — app/src/main/java/ceui/pixiv/ui/prime/CorpusTagsFragment.kt:91-96 | app/src/main/java/ceui/pixiv/ui/user/UserMangaSeriesFeedFragment.kt:155-160 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/widget/DailyRankStripWorker.kt:17 — app/src/main/java/ceui/pixiv/widget/DailyRankStripWorker.kt:17-22 | app/src/main/java/ceui/pixiv/widget/RecommendStripWorker.kt:17-23 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/DetailFeedSupport.kt:88 — app/src/main/java/ceui/pixiv/ui/common/DetailFeedSupport.kt:88-95 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFragment.kt:388-393 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (6 corresponding lines) app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:239 — app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:239-245 | app/src/main/java/ceui/pixiv/ui/account/AccountSwitchV3Fragment.kt:419-424 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D5 · Coupling · Off the main sequence · ×9
  • Off the main sequence: :models — :models: 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: :panel — :panel: 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: :witstudio — :witstudio: abstractness 0.15, instability 0.00, distance 0.85 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: :safe — :safe: 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: :feeds — :feeds: abstractness 0.18, instability 0.00, distance 0.82 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: :banner — :banner: abstractness 0.19, instability 0.00, distance 0.81 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: :actionqueue — :actionqueue: abstractness 0.22, instability 0.00, distance 0.78 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: :progressmanager — :progressmanager: abstractness 0.22, instability 0.00, distance 0.78 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: :websocket — :websocket: abstractness 0.26, instability 0.00, distance 0.74 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
AX2 · Stateful singletons · Stateful singleton · ×8
  • Stateful singleton: ApkDownloadManager app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:73 — `ApkDownloadManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (runToken, cachedReleaseJson, cachedRelease; e.g. `runToken` in `restore` at line 405).
  • Stateful singleton: Analytics app/src/main/java/ceui/pixiv/analytics/Analytics.kt:62 — `Analytics` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (seenLoadErrors; e.g. `seenLoadErrors` in `loadError` at line 479).
  • Stateful singleton: ShaftChatGateway app/src/main/java/ceui/pixiv/chat/api/ShaftChatGateway.kt:72 — `ShaftChatGateway` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (persistDao; e.g. `persistDao` in `bootstrap` at line 179).
  • Stateful singleton: DiscoveryPool app/src/main/java/ceui/pixiv/db/discovery/DiscoveryPool.kt:28 — `DiscoveryPool` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (initialized, pooledIds, seenIds; e.g. `initialized` in `initialize` at line 54).
  • Stateful singleton: BookmarkMirrorService app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:90 — `BookmarkMirrorService` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (emptyShelfStreak, activeRun; e.g. `emptyShelfStreak` in `rebuildShelf` at line 310).
  • Stateful singleton: QueueDownloadManager app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:92 — `QueueDownloadManager` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (idleRecoveryPending, lastDiedNoticeAt, retryStates, inFlight, ugoiraInFlightRowIds; e.g. `idleRecoveryPending` in `runColdStart` at line 380).
  • Stateful singleton: FanboxWebBridge app/src/main/java/ceui/pixiv/ui/fanbox/FanboxWebBridge.kt:57 — `FanboxWebBridge` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (pageLoaded, webView; e.g. `pageLoaded` in `release` at line 97).
  • Stateful singleton: MangaBatchTranslateCenter app/src/main/java/ceui/pixiv/ui/translate/MangaBatchTranslateCenter.kt:42 — `MangaBatchTranslateCenter` is a singleton (@Singleton: the container shares one instance across every request thread) but mutates instance state outside any lock (resultCleanupInProgress; e.g. `resultCleanupInProgress` in `beginResultCleanup` at line 116).
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×8
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:165 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:165-190 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:206-227 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/lisa/utils/PixivOperate.java:425 — app/src/main/java/ceui/lisa/utils/PixivOperate.java:425-450 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:452-473 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:164 — app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:164-186 | app/src/main/java/ceui/pixiv/ui/user/UserNovelByTagFeedFragment.kt:120-141 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:487 — app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:487-508 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:335-365 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt:987 — app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt:987-1008 | app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt:1125-1146 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:157 — app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:157-178 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:110-131 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:50 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:50-71 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:52-73 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:51 — app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:51-72 | app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:88-115 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×8
  • Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:219 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:219-232 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt:367-380 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:105 — app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:105-118 | app/src/main/java/ceui/pixiv/ui/recommend/MonthRankFragment.kt:133-146 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:713 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:713-726 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:609-622 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:139 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:139-152 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:412-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:139` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) app/src/main/java/ceui/pixiv/utils/LikeHaptic.kt:52 — app/src/main/java/ceui/pixiv/utils/LikeHaptic.kt:52-65 | app/src/main/java/ceui/pixiv/utils/LikeHaptic.kt:81-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/utils/LikeHaptic.kt:52` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:326 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:326-339 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:334-347 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:326` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) app/src/main/java/ceui/lisa/activities/RankActivity.java:97 — app/src/main/java/ceui/lisa/activities/RankActivity.java:97-110 | app/src/main/java/ceui/lisa/fragments/FragmentNew.java:53-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/RankActivity.java:97` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/lisa/activities/RankActivity.java:112` calls `getIntent`, `getIntExtra`, `setCurrentItem` and `app/src/main/java/ceui/lisa/fragments/FragmentNew.java: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.
  • Duplicated block (14 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:179 — app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:179-192 | app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:196-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
X3 · Exception handling · Swallowed exception (empty catch) · ×8
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:416 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:425 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/widget/telegram/TelegramCompat.java:144 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/widget/telegram/TelegramCompat.java:155 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:941 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/download/StageStore.kt:137 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/db/discovery/DiscoveryPool.kt:71 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) app/src/main/java/ceui/pixiv/db/discovery/DiscoveryPool.kt:367 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Edited copy of a member (18 corresponding lines) · ×6
  • Edited copy of a member (18 corresponding lines) app/src/main/java/ceui/lisa/helper/UserIllustJumpHelper.kt:119 — app/src/main/java/ceui/lisa/helper/UserIllustJumpHelper.kt:119-136 | app/src/main/java/ceui/pixiv/ui/user/FollowUserFeedFragment.kt:182-199 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:677 — app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:677-694 | app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:706-728 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:362 — app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:362-387 | app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:168-185 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) app/src/main/java/ceui/lisa/adapters/LazyFragmentPagerAdapter.java:102 — app/src/main/java/ceui/lisa/adapters/LazyFragmentPagerAdapter.java:102-122 | app/src/main/java/ceui/lisa/adapters/LazyFragmentStatePagerAdapter.java:131-148 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:268 — app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:268-287 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:289-306 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (18 corresponding lines) app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:123 — app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:123-141 | app/src/main/java/ceui/pixiv/ui/user/FollowUserFeedFragment.kt:94-111 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×6
  • Duplicated block (20 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:387 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:387-406 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:397-416 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:387` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:284 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:284-303 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:341-360 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:284` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:180 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:180-199 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt:432-451 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/ui/notification/NotificationListFragment.kt:49 — app/src/main/java/ceui/pixiv/ui/notification/NotificationListFragment.kt:49-68 | app/src/main/java/ceui/pixiv/ui/notification/NotificationViewMoreFragment.kt:74-93 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (20 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:52 — app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:52-71 | app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.kt:55-74 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.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 `app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.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.
  • Duplicated block (20 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:247 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:247-266 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:228-247 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:226` calls `glassPill`, `getString` and `app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:246` 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 × 2) · ×6
  • Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:350 — app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:350-364 | app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:372-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 `app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:350` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:109 — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:109-123 | app/src/main/java/ceui/pixiv/ui/fanbox/FanboxPostDetailFeed.kt:125-139 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:109` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:221 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:221-235 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:245-259 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (15 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:435 — app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:435-449 | app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt:316-330 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:435` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:477 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:477-491 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:486-500 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:477` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (15 lines × 2) app/src/main/java/ceui/lisa/utils/Emoji.java:284 — app/src/main/java/ceui/lisa/utils/Emoji.java:284-298 | app/src/main/java/ceui/lisa/utils/Emoji.java:306-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit. Note first that the copies are not typed on the same thing: the declarations holding them bind `list` to `List<String>` in one and `String[]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×5
  • Edited copy of a member (28 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:103 — app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:103-130 | app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:138-170 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:276 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:276-303 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:333-360 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:85 — app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:85-118 | app/src/main/java/ceui/pixiv/ui/recommend/MonthRankFragment.kt:119-146 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) app/src/main/java/ceui/pixiv/ui/pinned/PinnedTabsFragment.kt:29 — app/src/main/java/ceui/pixiv/ui/pinned/PinnedTabsFragment.kt:29-56 | app/src/main/java/ceui/pixiv/ui/watchlater/WatchLaterTabsFragment.kt:37-64 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (28 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/MediaStoreUtils.kt:68 — app/src/main/java/ceui/pixiv/ui/common/MediaStoreUtils.kt:68-95 | app/src/main/java/ceui/pixiv/ui/common/MediaStoreUtils.kt:153-183 — 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 (20 corresponding lines) · ×5
  • Edited copy of a member (20 corresponding lines) app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt:118 — app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt:118-137 | app/src/main/java/ceui/pixiv/ui/watchlist/WatchlistFeed.kt:147-172 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/ceui/lisa/update/FragmentVersionHistory.kt:72 — app/src/main/java/ceui/lisa/update/FragmentVersionHistory.kt:72-91 | app/src/main/java/ceui/pixiv/snapshot/SnapshotBackfillFragment.kt:96-118 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:188 — app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:188-207 | app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:222-241 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/ceui/lisa/utils/Common.java:389 — app/src/main/java/ceui/lisa/utils/Common.java:389-411 | app/src/main/java/ceui/lisa/utils/Common.java:416-435 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:42 — app/src/main/java/ceui/pixiv/ui/recommend/FragmentRecentRecommend.kt:42-61 | app/src/main/java/ceui/pixiv/ui/recommend/MonthRankFragment.kt:43-69 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×5
  • Duplicated block (9–10 lines × 2) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:264 — app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:264-272 | app/src/main/java/ceui/pixiv/download/backend/SilentDownload.kt:140-149 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code 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) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:334 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:334-342 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:571-580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:334` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:472 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:472-481 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:341-349 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9–10 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:213 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:213-221 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:552-561 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:213` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9–10 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:197 — app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:197-205 | app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:211-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 `app/src/main/java/ceui/lisa/fragments/FragmentSearch.java: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.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (4.4 · ×4
  • Low contrast colour pair in CSS (4.4:1) mockup.html:166 — `.sb-gallery .sb-count` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) mockup.html:261 — `#hamburger` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) mockup.html:553 — `.btn-primary` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
  • Low contrast colour pair in CSS (4.4:1) mockup.html:572 — `.btn-sm` sets color: white on background-color: #686bdd — 4.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (23 corresponding lines) · ×4
  • Edited copy of a member (23 corresponding lines) app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:70 — app/src/main/java/ceui/pixiv/ui/pivision/PivisionFeedFragment.kt:70-97 | app/src/main/java/ceui/pixiv/ui/pivision/PivisionRailFeedFragment.kt:100-122 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) app/src/main/java/ceui/lisa/activities/UActivity.kt:102 — app/src/main/java/ceui/lisa/activities/UActivity.kt:102-124 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:132-159 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) app/src/main/java/ceui/pixiv/actions/PixivActions.kt:191 — app/src/main/java/ceui/pixiv/actions/PixivActions.kt:191-213 | app/src/main/java/ceui/pixiv/actions/PixivActions.kt:237-259 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (23 corresponding lines) app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt:24 — app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt:24-53 | app/src/main/java/ceui/lisa/repo/Nana7miNetworkRetry.kt:62-84 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×4
  • Edited copy of a member (17 corresponding lines) app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.kt:150 — app/src/main/java/ceui/pixiv/webdav/WebDavPrefs.kt:150-166 | safe/src/main/java/ceui/pixiv/safe/auth/TokenStore.kt:57-80 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:80 — app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:80-96 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:80-97 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) app/src/main/java/ceui/lisa/http/CfBlockGuide.kt:194 — app/src/main/java/ceui/lisa/http/CfBlockGuide.kt:194-219 | app/src/main/java/ceui/pixiv/api/CsrfTokenProvider.kt:39-55 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (17 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/FragmentViewBindingDelegate.kt:27 — app/src/main/java/ceui/pixiv/ui/common/FragmentViewBindingDelegate.kt:27-45 | app/src/main/java/ceui/pixiv/ui/common/FragmentViewBindingDelegate.kt:64-80 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×4
  • Edited copy of a member (21 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFragment.kt:119 — app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFragment.kt:119-147 | app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFragment.kt:632-652 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) app/src/main/java/ceui/pixiv/ui/pinned/PinnedTagsFragment.kt:155 — app/src/main/java/ceui/pixiv/ui/pinned/PinnedTagsFragment.kt:155-177 | app/src/main/java/ceui/pixiv/ui/pinned/PinnedUsersFragment.kt:110-130 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:344 — app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:344-364 | app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:366-386 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (21 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:204 — app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:204-225 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:227-247 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×4
  • Edited copies of one member (3 members, 15+ corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:230 — app/src/main/java/ceui/pixiv/ui/settings/AiTranslateSettingsFragment.kt:230-244 | app/src/main/java/ceui/pixiv/ui/settings/ViewerDismissTuningFragment.kt:272-290 | app/src/main/java/ceui/pixiv/ui/settings/WebDavSettingsFragment.kt:181-199 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:30 — app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:30-44 | app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:67-83 | app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:86-102 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) app/src/main/java/ceui/lisa/download/IllustDownload.java:92 — app/src/main/java/ceui/lisa/download/IllustDownload.java:92-110 | app/src/main/java/ceui/lisa/download/IllustDownload.java:116-130 | app/src/main/java/ceui/lisa/download/IllustDownload.java:132-146 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 15+ corresponding lines) app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:88 — app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:88-102 | app/src/main/java/ceui/pixiv/ui/user/UserMangaSeriesFeedFragment.kt:105-121 | app/src/main/java/ceui/pixiv/ui/user/UserNovelSeriesFeedFragment.kt:114-130 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:273 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:273-280 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:324-331 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:561-568 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:76 — app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:76-83 | app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:85-92 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:87-94 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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, `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:93` calls `applyRefreshButton`, `setViewVisibility` and `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:84` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 3) app/src/main/java/ceui/pixiv/ui/rank/RankIllustFeedFragment.kt:97 — app/src/main/java/ceui/pixiv/ui/rank/RankIllustFeedFragment.kt:97-104 | app/src/main/java/ceui/pixiv/ui/rank/RankNovelFeedFragment.kt:80-87 | app/src/main/java/ceui/pixiv/ui/recommend/BookmarkRankFragment.kt:81-88 — 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 (8 lines × 3) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:481 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:481-488 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:534-541 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsExperimental.java:287-294 — 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 `app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:481` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) app/src/main/java/ceui/pixiv/download/ExifKeywordWriter.kt:179 — app/src/main/java/ceui/pixiv/download/ExifKeywordWriter.kt:179-184 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:396-401 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:749-754 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 × 3) app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:927 — app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:927-932 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1051-1056 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1110-1116 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:927` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) app/src/main/java/ceui/lisa/utils/Emoji.java:285 — app/src/main/java/ceui/lisa/utils/Emoji.java:285-291 | app/src/main/java/ceui/lisa/utils/Emoji.java:307-313 | app/src/main/java/ceui/lisa/utils/Emoji.java:331-336 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/utils/Emoji.java:285` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 3) app/src/main/java/ceui/lisa/utils/PixivOperate.java:322 — app/src/main/java/ceui/lisa/utils/PixivOperate.java:322-327 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:334-339 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:412-417 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
X2 · Cancellation propagation · Suspend function with a blocking request · ×4
  • Suspend function with a blocking request: fetchModels app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:341 — `fetchModels` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
  • Suspend function with a blocking request: probe app/src/main/java/ceui/pixiv/ui/settings/GithubProxyDialog.kt:290 — `probe` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
  • Suspend function with a blocking request: fetch app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderFontRepository.kt:113 — `fetch` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
  • Suspend function with a blocking request: downloadZipTo app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:853 — `downloadZipTo` suspends, but makes its request with `newCall(…).execute()`, which blocks: its caller's cancellation cannot reach the request, so it runs to its end after whatever wanted it has given up — `withContext(Dispatchers.IO)` moves it off the caller's thread and does not change that. Make the request with a call that suspends: Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` over `enqueue` that cancels the `Call` in `invokeOnCancellation`.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×3
  • Edited copy of a member (34 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:803 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:803-839 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:858-891 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:105 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:105-138 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:105-138 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (34 corresponding lines) app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:135 — app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:135-168 | app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:178-217 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×3
  • Edited copy of a member (26 corresponding lines) app/src/main/java/ceui/lisa/activities/SearchActivity.java:597 — app/src/main/java/ceui/lisa/activities/SearchActivity.java:597-632 | app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:298-323 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/SearchNovelSeriesWebSource.kt:192 — app/src/main/java/ceui/pixiv/ui/search/SearchNovelSeriesWebSource.kt:192-217 | app/src/main/java/ceui/pixiv/ui/user/UserNovelByTagFeedFragment.kt:155-181 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:176 — app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:176-201 | app/src/main/java/ceui/pixiv/ui/muted/MutedObjectsFeedFragment.kt:245-275 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×3
  • Edited copy of a member (5 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:908 — app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:908-915 | app/src/main/java/ceui/pixiv/download/config/DownloadItems.kt:481-485 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderV3ViewModel.kt:208 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderV3ViewModel.kt:208-212 | app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt:782-787 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (5 corresponding lines) app/src/main/java/ceui/pixiv/ui/prime/CorpusTagDetailFragment.kt:66 — app/src/main/java/ceui/pixiv/ui/prime/CorpusTagDetailFragment.kt:66-70 | app/src/main/java/ceui/pixiv/ui/prime/PrimeTagDetailFragment.kt:69-73 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (4 corresponding lines) · ×3
  • Edited copy of a member (4 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:277 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:277-280 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:130-133 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:439 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:439-443 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:940-943 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) app/src/main/java/ceui/pixiv/snapshot/SnapshotLocalFileLoader.kt:30 — app/src/main/java/ceui/pixiv/snapshot/SnapshotLocalFileLoader.kt:30-33 | app/src/main/java/ceui/pixiv/snapshot/SnapshotLocalImageLoader.kt:38-44 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×3
  • Duplicated block (22 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:303 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:303-324 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:745-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (22 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/ui/AnnotationsSheet.kt:42 — app/src/main/java/ceui/pixiv/ui/novel/reader/ui/AnnotationsSheet.kt:42-63 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/BookmarksSheet.kt:42-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/AnnotationsSheet.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 (22 lines × 2) app/src/main/java/ceui/pixiv/cache/ImageCacheQuota.kt:48 — app/src/main/java/ceui/pixiv/cache/ImageCacheQuota.kt:48-78 | app/src/main/java/ceui/pixiv/cache/OriginalImageCacheQuota.kt:25-46 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×3
  • Duplicated block (8–9 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt:107 — app/src/main/java/ceui/lisa/activities/UActivity.kt:107-114 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:141-149 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/UActivity.kt:107` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:89 — app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:89-97 | app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:111-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–9 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:149 — app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:149-156 | app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:218-226 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:218` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D17 · Explicit Debt · TodoComment · ×2
  • TodoComment app/src/main/java/ceui/pixiv/ui/novel/reader/render/PageRenderer.kt:108 — // TODO(v3): re-wire saved annotations on the hosting ReaderTextBlockView. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1834 — // ---- 作品 API 探测(TODO #6b)----
D35 · Change Coupling · Change-coupling hub · ×2
  • Change-coupling hub: SearchConfig.kt → SearchIllustRepo.kt, SearchModel.java, API.kt, SearchFilterV3BottomSheet.kt, SearchFilterV3LegacyBridge.kt app/src/main/java/ceui/pixiv/ui/search/SearchConfig.kt — `app/src/main/java/ceui/pixiv/ui/search/SearchConfig.kt` changes together with 5 other files — `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt`, `app/src/main/java/ceui/lisa/viewmodel/SearchModel.java`, `app/src/main/java/ceui/pixiv/api/API.kt`, `app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt`, `app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.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: Settings.java → FragmentSettingsAppearance.java, FragmentSettingsBrowsing.java, SettingsCatalog.kt app/src/main/java/ceui/lisa/utils/Settings.java — `app/src/main/java/ceui/lisa/utils/Settings.java` changes together with 3 other files — `app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java`, `app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java`, `app/src/main/java/ceui/lisa/fragments/SettingsCatalog.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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:75 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:75-131 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:92-180 | app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:53-74 | app/src/main/java/ceui/pixiv/ui/notification/NotificationPagerFragment.kt:22-44 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:184 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:184-204 | app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:261-317 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:205-242 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:375-443 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (35 corresponding lines) · ×2
  • Edited copy of a member (35 corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:434 — app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:434-468 | app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt:312-352 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (35 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentNew.java:29 — app/src/main/java/ceui/lisa/fragments/FragmentNew.java:29-67 | app/src/main/java/ceui/lisa/fragments/FragmentPv.java:29-63 — These two members are one piece of code written twice and then edited apart: 35 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (46 corresponding lines) · ×2
  • Edited copy of a member (46 corresponding lines) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1202 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1202-1247 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1425-1475 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (46 corresponding lines) app/src/main/java/ceui/lisa/activities/UActivity.kt:159 — app/src/main/java/ceui/lisa/activities/UActivity.kt:159-204 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:296-360 — These two members are one piece of code written twice and then edited apart: 46 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×2
  • Edited copy of a member (31 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:407 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:407-437 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:906-938 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (31 corresponding lines) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:542 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:542-581 | app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:327-357 — These two members are one piece of code written twice and then edited apart: 31 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (27 corresponding lines) · ×2
  • Edited copy of a member (27 corresponding lines) app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:165 — app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:165-191 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:195-226 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (27 corresponding lines) app/src/main/java/ceui/lisa/activities/RankActivity.java:165 — app/src/main/java/ceui/lisa/activities/RankActivity.java:165-196 | app/src/main/java/ceui/lisa/fragments/FragmentEditFile.java:279-305 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:158 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:158-185 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:158-182 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1051 — app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1051-1075 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1301-1327 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (32 corresponding lines) · ×2
  • Edited copy of a member (32 corresponding lines) app/src/main/java/ceui/pixiv/ui/recommend/TypeTabsRankFragment.kt:51 — app/src/main/java/ceui/pixiv/ui/recommend/TypeTabsRankFragment.kt:51-82 | app/src/main/java/ceui/pixiv/ui/recommend/WallpaperRankFragment.kt:27-62 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (32 corresponding lines) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1256 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1256-1295 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1302-1333 — These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×2
  • Edited copy of a member (36 corresponding lines) app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:395 — app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:395-430 | app/src/main/java/ceui/pixiv/snapshot/SnapshotOpen.kt:31-66 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (36 corresponding lines) scripts/find_missing_used_strings.py:82 — scripts/find_missing_used_strings.py:82-122 | scripts/sort_locale_strings.py:65-100 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×2
  • Edited copy of a member (19 corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:479 — app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:479-502 | app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:504-522 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (19 corresponding lines) app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:365 — app/src/main/java/ceui/pixiv/ui/home/RecmdIllustFeedFragment.kt:365-383 | app/src/main/java/ceui/pixiv/ui/home/RecmdNovelFeedFragment.kt:62-80 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (30 corresponding lines) · ×2
  • Edited copy of a member (30 corresponding lines) app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:299 — app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:299-328 | app/src/main/java/ceui/pixiv/ui/user/RequestPlanFeedFragment.kt:126-156 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (30 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:344 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:344-374 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:699-728 — 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 (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:248 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:248-271 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:296-319 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/PixivTagEditOperate.kt:54 — app/src/main/java/ceui/pixiv/ui/detail/PixivTagEditOperate.kt:54-77 | app/src/main/java/ceui/pixiv/ui/user/PixivBlockOperate.kt:241-264 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 12+ corresponding lines) app/src/main/java/ceui/lisa/utils/PixivOperate.java:357 — app/src/main/java/ceui/lisa/utils/PixivOperate.java:357-369 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:376-387 | app/src/main/java/ceui/lisa/utils/PixivOperate.java:411-423 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 12+ corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:225 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:225-236 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:93-104 | app/src/main/java/ceui/pixiv/ui/pinned/PinnedTagsFragment.kt:180-195 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 13+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 13+ corresponding lines) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:48 — app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:48-60 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:32-44 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:47-59 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 13+ corresponding lines) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryFragment.kt:95 — app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryFragment.kt:95-107 | app/src/main/java/ceui/pixiv/ui/library/FollowingLibraryFragment.kt:57-69 | app/src/main/java/ceui/pixiv/ui/library/NovelBookmarkLibraryFragment.kt:59-71 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (27–28 lines × 2) · ×2
  • Duplicated block (27–28 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:208 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt:208-235 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt:205-231 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/SeriesListSheet.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicSeriesListSheet.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 (27–28 lines × 2) app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:146 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:146-173 | app/src/main/java/ceui/pixiv/ui/common/NovelFeedItem.kt:122-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, 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 (25 lines × 2) · ×2
  • Duplicated block (25 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt:127 — app/src/main/java/ceui/lisa/activities/UActivity.kt:127-151 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:469-493 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:469` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) REDACTED:28 — REDACTED:28-52 | REDACTED:31-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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1057 — app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1057-1075 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1309-1327 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1057` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:119 — app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:119-137 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:169-187 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:119` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:286 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:286-303 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:412-429 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:286` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (18 lines × 2) app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:868 — app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:868-885 | app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:893-910 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:868` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:468 — app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:468-484 | app/src/main/java/ceui/lisa/fragments/HistoryUserFeed.kt:172-188 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:468` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (17 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt:681 — app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt:681-697 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/TxtExporter.kt:63-79 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3ViewModel.kt:681` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 × 2) · ×2
  • Duplicated block (16 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:158 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:158-173 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:516-531 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:158` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:221 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:221-236 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:187-202 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.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.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×2
  • Duplicated block (13–14 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:109 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:109-122 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:130-142 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt` and `app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.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. If that is what happened, the fix is to keep one copy and have the 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 (13–14 lines × 2) app/src/main/java/ceui/lisa/adapters/LazyFragmentPagerAdapter.java:104 — app/src/main/java/ceui/lisa/adapters/LazyFragmentPagerAdapter.java:104-116 | app/src/main/java/ceui/lisa/adapters/LazyFragmentStatePagerAdapter.java:132-145 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/adapters/LazyFragmentPagerAdapter.java:104` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/lisa/adapters/LazyFragmentPagerAdapter.java:118` calls `remove` and `app/src/main/java/ceui/lisa/adapters/LazyFragmentStatePagerAdapter.java:146` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×2
  • Duplicated block (11–13 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1429 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1429-1441 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:261-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 `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1429` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `pageIndex` to `Int` in one and `Int = 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (11–13 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:368 — app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:368-380 | app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:170-180 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:368` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×2
  • Duplicated block (12–13 lines × 2) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:63 — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:63-74 | app/src/main/java/ceui/pixiv/ui/notification/NotificationPagerFragment.kt:32-44 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:63` it begins part-way through the construct above it, so those exact lines 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) app/src/main/java/ceui/lisa/download/IllustDownload.java:97 — app/src/main/java/ceui/lisa/download/IllustDownload.java:97-108 | app/src/main/java/ceui/lisa/download/IllustDownload.java:118-130 — both copies are in the same file, so extract the 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 (10–12 lines × 2) · ×2
  • Duplicated block (10–12 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1206 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1206-1217 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:62-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1206` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `pageIndex` to `Int` in one and `Int = 0` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10–12 lines × 2) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:146 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:146-157 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:162-171 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt` and `app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.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. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:146` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:158` calls `findItem` and `app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:172` 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 × 3) · ×2
  • Duplicated block (11 lines × 3) app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:342 — app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:342-352 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1393-1403 | feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt:696-708 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/snapshot/SnapshotListFragment.kt:342` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:162 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:162-172 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:274-284 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:434-444 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:162` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×2
  • Duplicated block (7–8 lines × 2) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:501 — app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:501-507 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:511-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 `app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:511` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:247 — app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:247-253 | app/src/main/java/ceui/pixiv/ui/translate/CloudTranslator.kt:239-246 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:247` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `null` to `to) val lines = chunkJobs[i].await() if (lines !=` in one and `to) = range val lines = chunkJobs[i].await() if (lines !=` 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 (5 lines × 3) · ×2
  • Duplicated block (5 lines × 3) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:461 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:461-465 | app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:918-924 | app/src/main/java/ceui/pixiv/ui/download/QueueListV3Fragment.kt:435-441 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:461` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 3) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:330 — app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:330-334 | app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:339-343 | app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:348-352 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:330` it does not close everything it opens, so those 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.
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×2
  • Outbound HTTP without resilience app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:582 — `.openConnection(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience app/src/main/java/ceui/lisa/update/AppUpdateChecker.kt:73 — `Retrofit.Builder(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.2 · ×1
  • Low contrast colour pair in CSS (3.2:1) mockup.html:429 — `.wf-img .r18-badge` sets color: white on background-color: #FF5252 — 3.2:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×1
  • Focus outline removed in CSS without a :focus replacement docs/tablet-design/common.css:34 — `.search input` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D1 · Cyclomatic Complexity · TemplateRouteFactory.create (cyclomatic 157) · ×1
  • TemplateRouteFactory.create (cyclomatic 157) app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt:153 — TemplateRouteFactory.create has cyclomatic complexity 157 (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 · NetworkTestViewModel.runTests (cyclomatic 59) · ×1
  • NetworkTestViewModel.runTests (cyclomatic 59) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:348 — NetworkTestViewModel.runTests has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent 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 · NetworkTestViewModel.testTarget (cyclomatic 59) · ×1
  • NetworkTestViewModel.testTarget (cyclomatic 59) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:635 — NetworkTestViewModel.testTarget has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent 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 · ProfileManager.buildProfile (cyclomatic 51) · ×1
  • ProfileManager.buildProfile (cyclomatic 51) app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt:111 — ProfileManager.buildProfile has cyclomatic complexity 51 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UgoiraEngineKt.downloadZipTo (cyclomatic 47) · ×1
  • UgoiraEngineKt.downloadZipTo (cyclomatic 47) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:853 — UgoiraEngineKt.downloadZipTo has cyclomatic complexity 47 (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 · Manager.startDownloadChain (cyclomatic 42) · ×1
  • Manager.startDownloadChain (cyclomatic 42) app/src/main/java/ceui/lisa/core/Manager.java:1160 — Manager.startDownloadChain has cyclomatic complexity 42 (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 · EpubExporter.export (cyclomatic 39) · ×1
  • EpubExporter.export (cyclomatic 39) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:30 — EpubExporter.export has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MainActivity.handleDrawerAction (cyclomatic 39) · ×1
  • MainActivity.handleDrawerAction (cyclomatic 39) app/src/main/java/ceui/lisa/activities/MainActivity.java:1054 — MainActivity.handleDrawerAction has cyclomatic complexity 39 (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 · ReferralPlanSheet.render (cyclomatic 38) · ×1
  • ReferralPlanSheet.render (cyclomatic 38) app/src/main/java/ceui/pixiv/ui/referral/ReferralPlanSheet.kt:104 — ReferralPlanSheet.render 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 · DrawerIconCatalog.iconFor (cyclomatic 33) · ×1
  • DrawerIconCatalog.iconFor (cyclomatic 33) app/src/main/java/ceui/pixiv/ui/navigation/DrawerIconCatalog.java:18 — DrawerIconCatalog.iconFor has cyclomatic complexity 33 (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 · FetchProgressDialog.handleEvent (cyclomatic 32) · ×1
  • FetchProgressDialog.handleEvent (cyclomatic 32) app/src/main/java/ceui/pixiv/ui/bulk/FetchProgressDialog.kt:185 — FetchProgressDialog.handleEvent 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 · ErrorCtrl.parseAndToast (cyclomatic 32) · ×1
  • ErrorCtrl.parseAndToast (cyclomatic 32) app/src/main/java/ceui/lisa/http/ErrorCtrl.java:89 — ErrorCtrl.parseAndToast 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 · ResumableOkHttpFetcher.fetchWithProgress (cyclomatic 31) · ×1
  • ResumableOkHttpFetcher.fetchWithProgress (cyclomatic 31) app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt:47 — ResumableOkHttpFetcher.fetchWithProgress 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 · UgoiraVideoEncoder.encode (cyclomatic 31) · ×1
  • UgoiraVideoEncoder.encode (cyclomatic 31) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraVideoEncoder.kt:109 — UgoiraVideoEncoder.encode 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 · SearchFilterV3.activeCount (cyclomatic 31) · ×1
  • SearchFilterV3.activeCount (cyclomatic 31) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3.kt:169 — SearchFilterV3.activeCount has cyclomatic complexity 31 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FragmentEditAccount.submit (cyclomatic 31) · ×1
  • FragmentEditAccount.submit (cyclomatic 31) app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:64 — FragmentEditAccount.submit 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 · ImageDetailActivity.initView (cyclomatic 30) · ×1
  • ImageDetailActivity.initView (cyclomatic 30) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:168 — ImageDetailActivity.initView 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 · Manager.runStagedTransfer (cyclomatic 30) · ×1
  • Manager.runStagedTransfer (cyclomatic 30) app/src/main/java/ceui/lisa/core/Manager.java:1481 — Manager.runStagedTransfer 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 · UgoiraEngine.runPipeline (cyclomatic 29) · ×1
  • UgoiraEngine.runPipeline (cyclomatic 29) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:572 — UgoiraEngine.runPipeline has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BubbleHolder.bind (cyclomatic 28) · ×1
  • BubbleHolder.bind (cyclomatic 28) app/src/main/java/ceui/pixiv/chat/ui/ChatMessageAdapter.kt:235 — BubbleHolder.bind 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 · QueueDownloadManager.settleCompleted (cyclomatic 28) · ×1
  • QueueDownloadManager.settleCompleted (cyclomatic 28) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:588 — QueueDownloadManager.settleCompleted has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NovelReaderV3Fragment.observeReaderState (cyclomatic 28) · ×1
  • NovelReaderV3Fragment.observeReaderState (cyclomatic 28) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:565 — NovelReaderV3Fragment.observeReaderState 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 · ReferralPageView.render (cyclomatic 28) · ×1
  • ReferralPageView.render (cyclomatic 28) app/src/main/java/ceui/pixiv/ui/referral/ReferralPageView.kt:96 — ReferralPageView.render 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 · IllustAiHelper.observeUpscaleTask (cyclomatic 28) · ×1
  • IllustAiHelper.observeUpscaleTask (cyclomatic 28) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:388 — IllustAiHelper.observeUpscaleTask has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BottomPanelCoordinator.setupImeInsets (cyclomatic 28) · ×1
  • BottomPanelCoordinator.setupImeInsets (cyclomatic 28) panel/src/main/java/ceui/pixiv/panel/BottomPanelCoordinator.kt:202 — BottomPanelCoordinator.setupImeInsets has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SearchNovelRepo.initApi (cyclomatic 27) · ×1
  • SearchNovelRepo.initApi (cyclomatic 27) app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:90 — SearchNovelRepo.initApi has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PanoramaDragListener.onTouch (cyclomatic 27) · ×1
  • PanoramaDragListener.onTouch (cyclomatic 27) app/src/main/java/ceui/lisa/view/PanoramaPan.kt:83 — PanoramaDragListener.onTouch has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PlazaTimelineViewModel.refresh (cyclomatic 27) · ×1
  • PlazaTimelineViewModel.refresh (cyclomatic 27) app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:112 — PlazaTimelineViewModel.refresh has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PostView.bindReactions (cyclomatic 27) · ×1
  • PostView.bindReactions (cyclomatic 27) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:523 — PostView.bindReactions has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SearchViewModel.buildSearchConfig (cyclomatic 27) · ×1
  • SearchViewModel.buildSearchConfig (cyclomatic 27) app/src/main/java/ceui/pixiv/ui/search/SearchViewModel.kt:100 — SearchViewModel.buildSearchConfig has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · SearchFilterV3LegacyBridge.seedFromLegacy (cyclomatic 27) · ×1
  • SearchFilterV3LegacyBridge.seedFromLegacy (cyclomatic 27) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.kt:115 — SearchFilterV3LegacyBridge.seedFromLegacy has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ZoomSyncKt.setupZoomSync (cyclomatic 26) · ×1
  • ZoomSyncKt.setupZoomSync (cyclomatic 26) app/src/main/java/ceui/pixiv/ui/common/ZoomSync.kt:35 — ZoomSyncKt.setupZoomSync 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 · SearchIllustRepo.initApi (cyclomatic 25) · ×1
  • SearchIllustRepo.initApi (cyclomatic 25) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:94 — SearchIllustRepo.initApi 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 · PostView.bind (cyclomatic 25) · ×1
  • PostView.bind (cyclomatic 25) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:362 — PostView.bind 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 · Manager.downloadOne (cyclomatic 25) · ×1
  • Manager.downloadOne (cyclomatic 25) app/src/main/java/ceui/lisa/core/Manager.java:951 — Manager.downloadOne 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 · Mapper.apply (cyclomatic 25) · ×1
  • Mapper.apply (cyclomatic 25) app/src/main/java/ceui/lisa/core/Mapper.java:99 — Mapper.apply 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 · BookmarkLibraryUi.refreshIfStale (cyclomatic 24) · ×1
  • BookmarkLibraryUi.refreshIfStale (cyclomatic 24) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt:551 — BookmarkLibraryUi.refreshIfStale has cyclomatic complexity 24 (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 · IllustAiHelper.observeRembgTask (cyclomatic 24) · ×1
  • IllustAiHelper.observeRembgTask (cyclomatic 24) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:115 — IllustAiHelper.observeRembgTask 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 · ApkDownloadManager.runJob (cyclomatic 23) · ×1
  • ApkDownloadManager.runJob (cyclomatic 23) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:752 — ApkDownloadManager.runJob 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 · NetworkTestViewModel.runImageDownloadPhase (cyclomatic 23) · ×1
  • NetworkTestViewModel.runImageDownloadPhase (cyclomatic 23) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1397 — NetworkTestViewModel.runImageDownloadPhase 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 · PageAdapter.bindAiOverlayAndPills (cyclomatic 23) · ×1
  • PageAdapter.bindAiOverlayAndPills (cyclomatic 23) app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt:523 — PageAdapter.bindAiOverlayAndPills 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 · ReferralPageView.taskCard (cyclomatic 23) · ×1
  • ReferralPageView.taskCard (cyclomatic 23) app/src/main/java/ceui/pixiv/ui/referral/ReferralPageView.kt:339 — ReferralPageView.taskCard 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 · Shaft.onCreate (cyclomatic 23) · ×1
  • Shaft.onCreate (cyclomatic 23) app/src/main/java/ceui/lisa/activities/Shaft.java:340 — Shaft.onCreate 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 · CronetInterceptor.intercept (cyclomatic 23) · ×1
  • CronetInterceptor.intercept (cyclomatic 23) app/src/main/java/ceui/lisa/http/CronetInterceptor.java:138 — CronetInterceptor.intercept 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 · BackupUtils.applyRestored (cyclomatic 23) · ×1
  • BackupUtils.applyRestored (cyclomatic 23) app/src/main/java/ceui/lisa/utils/BackupUtils.java:351 — BackupUtils.applyRestored 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 · ImageIntegrityValidator.validateAndRepairPng (cyclomatic 22) · ×1
  • ImageIntegrityValidator.validateAndRepairPng (cyclomatic 22) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt:240 — ImageIntegrityValidator.validateAndRepairPng 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 · PlazaReportFragment.onViewCreated (cyclomatic 22) · ×1
  • PlazaReportFragment.onViewCreated (cyclomatic 22) app/src/main/java/ceui/pixiv/plaza/ui/PlazaReportFragment.kt:54 — PlazaReportFragment.onViewCreated 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 · ArtworkDetailIllustAdapter.bindExpandOverlay (cyclomatic 22) · ×1
  • ArtworkDetailIllustAdapter.bindExpandOverlay (cyclomatic 22) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:88 — ArtworkDetailIllustAdapter.bindExpandOverlay 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 · FeedFragment.render (cyclomatic 22) · ×1
  • FeedFragment.render (cyclomatic 22) feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt:718 — FeedFragment.render 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 · FragmentSettingsDownload.initData (cyclomatic 22) · ×1
  • FragmentSettingsDownload.initData (cyclomatic 22) app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:46 — FragmentSettingsDownload.initData has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ApkDownloadManager.downloadSegment (cyclomatic 21) · ×1
  • ApkDownloadManager.downloadSegment (cyclomatic 21) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:956 — ApkDownloadManager.downloadSegment 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 · PostView.bindImages (cyclomatic 21) · ×1
  • PostView.bindImages (cyclomatic 21) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:849 — PostView.bindImages 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 · FetchProgressDialog.refreshStatusLine (cyclomatic 21) · ×1
  • FetchProgressDialog.refreshStatusLine (cyclomatic 21) app/src/main/java/ceui/pixiv/ui/bulk/FetchProgressDialog.kt:358 — FetchProgressDialog.refreshStatusLine 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 · NetworkTestViewModel.downloadImageStep (cyclomatic 21) · ×1
  • NetworkTestViewModel.downloadImageStep (cyclomatic 21) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1577 — NetworkTestViewModel.downloadImageStep 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 · UgoiraVideoPlayer.decodeLoop (cyclomatic 21) · ×1
  • UgoiraVideoPlayer.decodeLoop (cyclomatic 21) app/src/main/java/ceui/pixiv/ui/detail/UgoiraVideoPlayer.kt:141 — UgoiraVideoPlayer.decodeLoop 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 · ActiveListV3Fragment.onViewCreated (cyclomatic 21) · ×1
  • ActiveListV3Fragment.onViewCreated (cyclomatic 21) app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:119 — ActiveListV3Fragment.onViewCreated 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 · BubbleAreaFinder.expand (cyclomatic 21) · ×1
  • BubbleAreaFinder.expand (cyclomatic 21) app/src/main/java/ceui/pixiv/ui/translate/BubbleAreaFinder.kt:43 — BubbleAreaFinder.expand has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Manager.runDirectTransfer (cyclomatic 21) · ×1
  • Manager.runDirectTransfer (cyclomatic 21) app/src/main/java/ceui/lisa/core/Manager.java:1668 — Manager.runDirectTransfer 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 · FragmentUserRight.initData (cyclomatic 20) · ×1
  • FragmentUserRight.initData (cyclomatic 20) app/src/main/java/ceui/lisa/fragments/FragmentUserRight.kt:29 — FragmentUserRight.initData 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 · ImageIntegrityValidator.verifyPngZlibStream (cyclomatic 20) · ×1
  • ImageIntegrityValidator.verifyPngZlibStream (cyclomatic 20) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt:389 — ImageIntegrityValidator.verifyPngZlibStream 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 · PlazaTimelineFragment.onViewCreated (cyclomatic 20) · ×1
  • PlazaTimelineFragment.onViewCreated (cyclomatic 20) app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineFragment.kt:57 — PlazaTimelineFragment.onViewCreated has cyclomatic complexity 20 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · StickerStore.prepare (cyclomatic 20) · ×1
  • StickerStore.prepare (cyclomatic 20) app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:32 — StickerStore.prepare 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 · NetworkTestFragment.renderSummary (cyclomatic 20) · ×1
  • NetworkTestFragment.renderSummary (cyclomatic 20) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestFragment.kt:217 — NetworkTestFragment.renderSummary 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 · SearchNovelSeriesWebSourceKt.buildWebNovelSearchParams (cyclomatic 20) · ×1
  • SearchNovelSeriesWebSourceKt.buildWebNovelSearchParams (cyclomatic 20) app/src/main/java/ceui/pixiv/ui/search/SearchNovelSeriesWebSource.kt:299 — SearchNovelSeriesWebSourceKt.buildWebNovelSearchParams 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 · FragmentSettingsAppearance.initData (cyclomatic 20) · ×1
  • FragmentSettingsAppearance.initData (cyclomatic 20) app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:212 — FragmentSettingsAppearance.initData 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 · SharedConfig.measureDevicePerformanceClass (cyclomatic 20) · ×1
  • SharedConfig.measureDevicePerformanceClass (cyclomatic 20) app/src/main/java/ceui/pixiv/widget/telegram/TelegramCompat.java:116 — SharedConfig.measureDevicePerformanceClass has cyclomatic complexity 20 (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 · Nana7miSearchTelemetry.validCombination (cyclomatic 19) · ×1
  • Nana7miSearchTelemetry.validCombination (cyclomatic 19) app/src/main/java/ceui/pixiv/actions/Nana7miSearchTelemetry.kt:637 — Nana7miSearchTelemetry.validCombination 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 · ChatMessageBodyLayout.onMeasure (cyclomatic 19) · ×1
  • ChatMessageBodyLayout.onMeasure (cyclomatic 19) app/src/main/java/ceui/pixiv/chat/ui/ChatMessageBodyLayout.kt:27 — ChatMessageBodyLayout.onMeasure 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 · DiscoveryPool.collect (cyclomatic 19) · ×1
  • DiscoveryPool.collect (cyclomatic 19) app/src/main/java/ceui/pixiv/db/discovery/DiscoveryPool.kt:81 — DiscoveryPool.collect 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 · BookmarkMirrorService.onRunFinished (cyclomatic 19) · ×1
  • BookmarkMirrorService.onRunFinished (cyclomatic 19) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:849 — BookmarkMirrorService.onRunFinished 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 · IllustAiHelper.restoreAiTasks (cyclomatic 19) · ×1
  • IllustAiHelper.restoreAiTasks (cyclomatic 19) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:327 — IllustAiHelper.restoreAiTasks 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 · BackupUtils.restoreBackupEntity (cyclomatic 19) · ×1
  • BackupUtils.restoreBackupEntity (cyclomatic 19) app/src/main/java/ceui/lisa/utils/BackupUtils.java:252 — BackupUtils.restoreBackupEntity 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 · ImageDetailActivity.syncAiOverlayForPage (cyclomatic 18) · ×1
  • ImageDetailActivity.syncAiOverlayForPage (cyclomatic 18) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1535 — ImageDetailActivity.syncAiOverlayForPage 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 · ImageTranslationViewModel.runManualPipeline (cyclomatic 18) · ×1
  • ImageTranslationViewModel.runManualPipeline (cyclomatic 18) app/src/main/java/ceui/lisa/activities/ImageTranslationViewModel.kt:279 — ImageTranslationViewModel.runManualPipeline 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 · ReboundSpringChain.animate (cyclomatic 18) · ×1
  • ReboundSpringChain.animate (cyclomatic 18) app/src/main/java/ceui/lisa/helper/ReboundSpringChain.kt:106 — ReboundSpringChain.animate 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 · RenameSweeper.plan (cyclomatic 18) · ×1
  • RenameSweeper.plan (cyclomatic 18) app/src/main/java/ceui/pixiv/download/maintenance/RenameSweeper.kt:76 — RenameSweeper.plan 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 · MediaUploader.upload (cyclomatic 18) · ×1
  • MediaUploader.upload (cyclomatic 18) app/src/main/java/ceui/pixiv/shaftapi/MediaUploader.kt:34 — MediaUploader.upload 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 · SnapshotBackfillFragment.renderStatus (cyclomatic 18) · ×1
  • SnapshotBackfillFragment.renderStatus (cyclomatic 18) app/src/main/java/ceui/pixiv/snapshot/SnapshotBackfillFragment.kt:306 — SnapshotBackfillFragment.renderStatus 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 · SnapshotGenerator.generateContent (cyclomatic 18) · ×1
  • SnapshotGenerator.generateContent (cyclomatic 18) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:156 — SnapshotGenerator.generateContent 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 · StickerRepository.prepare (cyclomatic 18) · ×1
  • StickerRepository.prepare (cyclomatic 18) app/src/main/java/ceui/pixiv/sticker/StickerRepository.kt:103 — StickerRepository.prepare 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 · UgoiraTaskKt.downloadUgoira (cyclomatic 18) · ×1
  • UgoiraTaskKt.downloadUgoira (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraTask.kt:62 — UgoiraTaskKt.downloadUgoira 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 · IllustStaggerRendererKt.staggerIllustRenderer (cyclomatic 18) · ×1
  • IllustStaggerRendererKt.staggerIllustRenderer (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt:100 — IllustStaggerRendererKt.staggerIllustRenderer 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 · ArtworkV3Actions.showMoreMenu (cyclomatic 18) · ×1
  • ArtworkV3Actions.showMoreMenu (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Actions.kt:211 — ArtworkV3Actions.showMoreMenu 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 · LibraryProfile.sortKeyLabel (cyclomatic 18) · ×1
  • LibraryProfile.sortKeyLabel (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/library/LibraryProfile.kt:89 — LibraryProfile.sortKeyLabel has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: LibraryProfile.sortLabel (cyclomatic 21) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Paginator.emitParagraph (cyclomatic 18) · ×1
  • Paginator.emitParagraph (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/novel/reader/paginate/Paginator.kt:212 — Paginator.emitParagraph 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 · SearchFilterV3BottomSheet.registerPickerListeners (cyclomatic 18) · ×1
  • SearchFilterV3BottomSheet.registerPickerListeners (cyclomatic 18) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:243 — SearchFilterV3BottomSheet.registerPickerListeners 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 · FeedViewModel.loadMore (cyclomatic 18) · ×1
  • FeedViewModel.loadMore (cyclomatic 18) feeds/src/main/java/ceui/pixiv/feeds/FeedViewModel.kt:240 — FeedViewModel.loadMore 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 · DownloadPageBackfill.runIfNeeded (cyclomatic 17) · ×1
  • DownloadPageBackfill.runIfNeeded (cyclomatic 17) app/src/main/java/ceui/lisa/database/DownloadPageBackfill.kt:58 — DownloadPageBackfill.runIfNeeded 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 · HistoryBackfill.run (cyclomatic 17) · ×1
  • HistoryBackfill.run (cyclomatic 17) app/src/main/java/ceui/pixiv/db/HistoryBackfill.kt:80 — HistoryBackfill.run 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 · BookmarkMirrorService.runOnePage (cyclomatic 17) · ×1
  • BookmarkMirrorService.runOnePage (cyclomatic 17) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:579 — BookmarkMirrorService.runOnePage 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 · EmailBackupV3Fragment.render (cyclomatic 17) · ×1
  • EmailBackupV3Fragment.render (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3Fragment.kt:122 — EmailBackupV3Fragment.render 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 · ModelArchiveInstaller.install (cyclomatic 17) · ×1
  • ModelArchiveInstaller.install (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/common/ModelArchiveInstaller.kt:53 — ModelArchiveInstaller.install 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 · NetworkTestViewModel.httpsHandshakeSampled (cyclomatic 17) · ×1
  • NetworkTestViewModel.httpsHandshakeSampled (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1031 — NetworkTestViewModel.httpsHandshakeSampled 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 · ActiveAdapterV3.bindIllustStateAndProgress (cyclomatic 17) · ×1
  • ActiveAdapterV3.bindIllustStateAndProgress (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:929 — ActiveAdapterV3.bindIllustStateAndProgress 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 · EpubExporter.buildChapterXhtml (cyclomatic 17) · ×1
  • EpubExporter.buildChapterXhtml (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:227 — EpubExporter.buildChapterXhtml has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · PdfExporter.export (cyclomatic 17) · ×1
  • PdfExporter.export (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/novel/reader/export/PdfExporter.kt:36 — PdfExporter.export 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 · NovelReaderView.onTouchEvent (cyclomatic 17) · ×1
  • NovelReaderView.onTouchEvent (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:389 — NovelReaderView.onTouchEvent 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 · SearchFilterV3BottomSheet.otherSummary (cyclomatic 17) · ×1
  • SearchFilterV3BottomSheet.otherSummary (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:621 — SearchFilterV3BottomSheet.otherSummary has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · MangaBatchTranslateCenter.runBatch (cyclomatic 17) · ×1
  • MangaBatchTranslateCenter.runBatch (cyclomatic 17) app/src/main/java/ceui/pixiv/ui/translate/MangaBatchTranslateCenter.kt:236 — MangaBatchTranslateCenter.runBatch 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 · WitTagFlowView.renderItems (cyclomatic 17) · ×1
  • WitTagFlowView.renderItems (cyclomatic 17) witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitTagFlowView.kt:193 — WitTagFlowView.renderItems 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 · NeuQuant.map (cyclomatic 17) · ×1
  • NeuQuant.map (cyclomatic 17) app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:849 — NeuQuant.map 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 · SpoilerThread.init (cyclomatic 17) · ×1
  • SpoilerThread.init (cyclomatic 17) app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:471 — SpoilerThread.init 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 · UserActivityV3.displayUser (cyclomatic 16) · ×1
  • UserActivityV3.displayUser (cyclomatic 16) app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:495 — UserActivityV3.displayUser 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 · FragmentIllust.refreshPageProgressPill (cyclomatic 16) · ×1
  • FragmentIllust.refreshPageProgressPill (cyclomatic 16) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1085 — FragmentIllust.refreshPageProgressPill 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 · FragmentImageDetail.loadFromNetwork (cyclomatic 16) · ×1
  • FragmentImageDetail.loadFromNetwork (cyclomatic 16) app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt:854 — FragmentImageDetail.loadFromNetwork 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 · ImageHostManager.rewrite (cyclomatic 16) · ×1
  • ImageHostManager.rewrite (cyclomatic 16) app/src/main/java/ceui/lisa/http/ImageHostManager.kt:89 — ImageHostManager.rewrite 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 · UpgradeRequiredPrompt.open (cyclomatic 16) · ×1
  • UpgradeRequiredPrompt.open (cyclomatic 16) app/src/main/java/ceui/lisa/update/UpgradeRequiredPrompt.kt:77 — UpgradeRequiredPrompt.open has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · SafBackend.ensureDirectory (cyclomatic 16) · ×1
  • SafBackend.ensureDirectory (cyclomatic 16) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:293 — SafBackend.ensureDirectory 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 · PlazaComposeFragment.onViewCreated (cyclomatic 16) · ×1
  • PlazaComposeFragment.onViewCreated (cyclomatic 16) app/src/main/java/ceui/pixiv/plaza/ui/PlazaComposeFragment.kt:84 — PlazaComposeFragment.onViewCreated 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 · StickerStore.reopen (cyclomatic 16) · ×1
  • StickerStore.reopen (cyclomatic 16) app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:172 — StickerStore.reopen has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ArtlistEditorModel.save (cyclomatic 16) · ×1
  • ArtlistEditorModel.save (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/artlist/ArtlistModels.kt:141 — ArtlistEditorModel.save 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 · ArtlistRepository.call (cyclomatic 16) · ×1
  • ArtlistRepository.call (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/artlist/ArtlistRepository.kt:31 — ArtlistRepository.call 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 · QueueDownloadManager.runMainLoop (cyclomatic 16) · ×1
  • QueueDownloadManager.runMainLoop (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:495 — QueueDownloadManager.runMainLoop 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 · ModelDownloadFragment.startDownload (cyclomatic 16) · ×1
  • ModelDownloadFragment.startDownload (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:199 — ModelDownloadFragment.startDownload 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 · ArtworkV3Fragment.onViewCreated (cyclomatic 16) · ×1
  • ArtworkV3Fragment.onViewCreated (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:394 — ArtworkV3Fragment.onViewCreated 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 · MergedEpubWriter.buildChapterXhtml (cyclomatic 16) · ×1
  • MergedEpubWriter.buildChapterXhtml (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:571 — MergedEpubWriter.buildChapterXhtml 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 · MergeDownloadNovelSeriesTask.bulkMergeNovelSeries (cyclomatic 16) · ×1
  • MergeDownloadNovelSeriesTask.bulkMergeNovelSeries (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/task/MergeDownloadNovelSeriesTask.kt:41 — MergeDownloadNovelSeriesTask.bulkMergeNovelSeries 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 · AiTranslator.streamChatCompletion (cyclomatic 16) · ×1
  • AiTranslator.streamChatCompletion (cyclomatic 16) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:510 — AiTranslator.streamChatCompletion 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 · WebDavClient.readMultistatus (cyclomatic 16) · ×1
  • WebDavClient.readMultistatus (cyclomatic 16) app/src/main/java/ceui/pixiv/webdav/WebDavClient.kt:145 — WebDavClient.readMultistatus 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 · FragmentSearch.dispatchClick (cyclomatic 16) · ×1
  • FragmentSearch.dispatchClick (cyclomatic 16) app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:163 — FragmentSearch.dispatchClick 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 · FragmentSettingsData.clearAiResults (cyclomatic 16) · ×1
  • FragmentSettingsData.clearAiResults (cyclomatic 16) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:638 — FragmentSettingsData.clearAiResults 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 · PixivOperate.encodeGifV2 (cyclomatic 16) · ×1
  • PixivOperate.encodeGifV2 (cyclomatic 16) app/src/main/java/ceui/lisa/utils/PixivOperate.java:599 — PixivOperate.encodeGifV2 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 · mockup.html.document.addEventListener("keydown") (cyclomatic 16) · ×1
  • mockup.html.document.addEventListener("keydown") (cyclomatic 16) mockup.html:2473 — mockup.html.document.addEventListener("keydown") 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.
D17 · Explicit Debt · XxxComment · ×1
  • XxxComment app/src/main/java/ceui/pixiv/ui/recommend/EventHistoryFeed.kt:149 — // "收藏了《XXX》" / "关注了 XXX" — 用户类型不加书名号,作品类型加 — 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.
D2 · Cognitive Complexity · EpubExporter.export (cognitive 130) · ×1
  • EpubExporter.export (cognitive 130) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:30 — EpubExporter.export has cognitive complexity 130 (threshold 15). Drivers by points: if/else 28 (91 pts), loops 8 (27 pts), match/switch 4 (10 pts), boolean chains 2 (nesting depth added 88). 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 · ErrorCtrl.parseAndToast (cognitive 104) · ×1
  • ErrorCtrl.parseAndToast (cognitive 104) app/src/main/java/ceui/lisa/http/ErrorCtrl.java:89 — ErrorCtrl.parseAndToast has cognitive complexity 104 (threshold 15). Drivers by points: if/else 31 (95 pts), boolean chains 7, error handling 1 (2 pts) (nesting depth added 65). 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 · ProfileManager.buildProfile (cognitive 80) · ×1
  • ProfileManager.buildProfile (cognitive 80) app/src/main/java/ceui/pixiv/db/discovery/ProfileManager.kt:111 — ProfileManager.buildProfile has cognitive complexity 80 (threshold 15). Drivers by points: if/else 28 (44 pts), error handling 9 (16 pts), loops 15, boolean chains 5 (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 · NetworkTestViewModel.testTarget (cognitive 78) · ×1
  • NetworkTestViewModel.testTarget (cognitive 78) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:635 — NetworkTestViewModel.testTarget has cognitive complexity 78 (threshold 15). Drivers by points: if/else 34 (47 pts), boolean chains 14, match/switch 5 (10 pts), loops 2 (4 pts), error handling 2 (3 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QueueDownloadManager.settleCompleted (cognitive 73) · ×1
  • QueueDownloadManager.settleCompleted (cognitive 73) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:588 — QueueDownloadManager.settleCompleted has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (58 pts), loops 4 (11 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 41). To reduce it, split the body into named stages: move each independent 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 · NetworkTestViewModel.runTests (cognitive 73) · ×1
  • NetworkTestViewModel.runTests (cognitive 73) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:348 — NetworkTestViewModel.runTests has cognitive complexity 73 (threshold 15). Drivers by points: if/else 30 (49 pts), boolean chains 17, match/switch 4 (5 pts), error handling 1, 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 · Manager.runStagedTransfer (cognitive 62) · ×1
  • Manager.runStagedTransfer (cognitive 62) app/src/main/java/ceui/lisa/core/Manager.java:1481 — Manager.runStagedTransfer has cognitive complexity 62 (threshold 15). Drivers by points: if/else 21 (46 pts), ternaries 3 (9 pts), boolean chains 5, error handling 1 (2 pts) (nesting depth added 32). 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 · NeuQuant.map (cognitive 58) · ×1
  • NeuQuant.map (cognitive 58) app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:849 — NeuQuant.map has cognitive complexity 58 (threshold 15). Drivers by points: if/else 16 (56 pts), boolean chains 1, loops 1 (nesting depth added 40). 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 · UgoiraEngineKt.downloadZipTo (cognitive 56) · ×1
  • UgoiraEngineKt.downloadZipTo (cognitive 56) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:853 — UgoiraEngineKt.downloadZipTo has cognitive complexity 56 (threshold 15). Drivers by points: if/else 25 (32 pts), boolean chains 22, loops 1, match/switch 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 · FragmentEditAccount.submit (cognitive 56) · ×1
  • FragmentEditAccount.submit (cognitive 56) app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:64 — FragmentEditAccount.submit has cognitive complexity 56 (threshold 15). Drivers by points: if/else 27 (47 pts), boolean chains 9 (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 · Manager.startDownloadChain (cognitive 54) · ×1
  • Manager.startDownloadChain (cognitive 54) app/src/main/java/ceui/lisa/core/Manager.java:1160 — Manager.startDownloadChain has cognitive complexity 54 (threshold 15). Drivers by points: if/else 24 (29 pts), error handling 9 (12 pts), ternaries 6 (7 pts), boolean chains 6 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UgoiraVideoPlayer.decodeLoop (cognitive 53) · ×1
  • UgoiraVideoPlayer.decodeLoop (cognitive 53) app/src/main/java/ceui/pixiv/ui/detail/UgoiraVideoPlayer.kt:141 — UgoiraVideoPlayer.decodeLoop has cognitive complexity 53 (threshold 15). Drivers by points: if/else 17 (48 pts), loops 2, match/switch 1 (2 pts), error handling 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageDetailActivity.initView (cognitive 50) · ×1
  • ImageDetailActivity.initView (cognitive 50) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:168 — ImageDetailActivity.initView has cognitive complexity 50 (threshold 15). Drivers by points: if/else 25 (42 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BubbleHolder.bind (cognitive 50) · ×1
  • BubbleHolder.bind (cognitive 50) app/src/main/java/ceui/pixiv/chat/ui/ChatMessageAdapter.kt:235 — BubbleHolder.bind has cognitive complexity 50 (threshold 15). Drivers by points: if/else 35 (41 pts), boolean chains 8, 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 · ImageIntegrityValidator.verifyPngZlibStream (cognitive 49) · ×1
  • ImageIntegrityValidator.verifyPngZlibStream (cognitive 49) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt:389 — ImageIntegrityValidator.verifyPngZlibStream has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (31 pts), loops 6 (15 pts), boolean chains 2, error handling 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ResumableOkHttpFetcher.fetchWithProgress (cognitive 48) · ×1
  • ResumableOkHttpFetcher.fetchWithProgress (cognitive 48) app/src/main/java/ceui/pixiv/imageloader/ResumableOkHttpFetcher.kt:47 — ResumableOkHttpFetcher.fetchWithProgress has cognitive complexity 48 (threshold 15). Drivers by points: if/else 24 (39 pts), boolean chains 5, loops 1 (2 pts), error handling 1, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PostView.bindReactions (cognitive 48) · ×1
  • PostView.bindReactions (cognitive 48) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:523 — PostView.bindReactions has cognitive complexity 48 (threshold 15). Drivers by points: if/else 36 (43 pts), boolean chains 5 (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 · PageAdapter.bindAiOverlayAndPills (cognitive 48) · ×1
  • PageAdapter.bindAiOverlayAndPills (cognitive 48) app/src/main/java/ceui/pixiv/ui/detail/ArtworkTabletStage.kt:523 — PageAdapter.bindAiOverlayAndPills has cognitive complexity 48 (threshold 15). Drivers by points: if/else 25 (44 pts), boolean chains 4 (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 · IllustAiHelper.observeUpscaleTask (cognitive 48) · ×1
  • IllustAiHelper.observeUpscaleTask (cognitive 48) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:388 — IllustAiHelper.observeUpscaleTask has cognitive complexity 48 (threshold 15). Drivers by points: if/else 31 (45 pts), boolean chains 2, 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 · ReferralPlanSheet.render (cognitive 46) · ×1
  • ReferralPlanSheet.render (cognitive 46) app/src/main/java/ceui/pixiv/ui/referral/ReferralPlanSheet.kt:104 — ReferralPlanSheet.render has cognitive complexity 46 (threshold 15). Drivers by points: if/else 29 (42 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UgoiraVideoEncoder.encode (cognitive 45) · ×1
  • UgoiraVideoEncoder.encode (cognitive 45) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraVideoEncoder.kt:109 — UgoiraVideoEncoder.encode has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (31 pts), error handling 5 (6 pts), boolean chains 4, loops 2, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PanoramaDragListener.onTouch (cognitive 44) · ×1
  • PanoramaDragListener.onTouch (cognitive 44) app/src/main/java/ceui/lisa/view/PanoramaPan.kt:83 — PanoramaDragListener.onTouch has cognitive complexity 44 (threshold 15). Drivers by points: if/else 18 (39 pts), boolean chains 4, match/switch 1 (nesting depth added 21). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UgoiraEngine.runPipeline (cognitive 44) · ×1
  • UgoiraEngine.runPipeline (cognitive 44) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:572 — UgoiraEngine.runPipeline has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (31 pts), error handling 5 (8 pts), boolean chains 5 (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 · SearchViewModel.buildSearchConfig (cognitive 43) · ×1
  • SearchViewModel.buildSearchConfig (cognitive 43) app/src/main/java/ceui/pixiv/ui/search/SearchViewModel.kt:100 — SearchViewModel.buildSearchConfig has cognitive complexity 43 (threshold 15). Drivers by points: if/else 34, boolean chains 9. 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 · ArtworkDetailIllustAdapter.bindExpandOverlay (cognitive 42) · ×1
  • ArtworkDetailIllustAdapter.bindExpandOverlay (cognitive 42) app/src/main/java/ceui/pixiv/ui/detail/CollapsibleIllustAdapter.kt:88 — ArtworkDetailIllustAdapter.bindExpandOverlay has cognitive complexity 42 (threshold 15). Drivers by points: if/else 24 (37 pts), boolean chains 5 (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 · MainActivity.handleDrawerAction (cognitive 42) · ×1
  • MainActivity.handleDrawerAction (cognitive 42) app/src/main/java/ceui/lisa/activities/MainActivity.java:1054 — MainActivity.handleDrawerAction has cognitive complexity 42 (threshold 15). Drivers by points: if/else 39 (41 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 · PlazaTimelineViewModel.refresh (cognitive 41) · ×1
  • PlazaTimelineViewModel.refresh (cognitive 41) app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt:112 — PlazaTimelineViewModel.refresh has cognitive complexity 41 (threshold 15). Drivers by points: if/else 16 (24 pts), error handling 5 (9 pts), boolean chains 8 (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 · PostView.bind (cognitive 41) · ×1
  • PostView.bind (cognitive 41) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:362 — PostView.bind has cognitive complexity 41 (threshold 15). Drivers by points: if/else 37 (38 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 · NetworkTestViewModel.downloadImageStep (cognitive 41) · ×1
  • NetworkTestViewModel.downloadImageStep (cognitive 41) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1577 — NetworkTestViewModel.downloadImageStep has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (36 pts), boolean chains 2, match/switch 1 (2 pts), error handling 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 · MergedEpubWriter.write (cognitive 41) · ×1
  • MergedEpubWriter.write (cognitive 41) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:455 — MergedEpubWriter.write has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 5 (12 pts), boolean chains 1 (nesting depth added 24). 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 · ReferralPageView.render (cognitive 41) · ×1
  • ReferralPageView.render (cognitive 41) app/src/main/java/ceui/pixiv/ui/referral/ReferralPageView.kt:96 — ReferralPageView.render has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IllustAiHelper.observeRembgTask (cognitive 41) · ×1
  • IllustAiHelper.observeRembgTask (cognitive 41) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:115 — IllustAiHelper.observeRembgTask has cognitive complexity 41 (threshold 15). Drivers by points: if/else 25 (38 pts), boolean chains 2, 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 · Shaft.onCreate (cognitive 41) · ×1
  • Shaft.onCreate (cognitive 41) app/src/main/java/ceui/lisa/activities/Shaft.java:340 — Shaft.onCreate has cognitive complexity 41 (threshold 15). Drivers by points: if/else 12 (30 pts), boolean chains 8, error handling 1 (2 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 · RenameSweeper.plan (cognitive 40) · ×1
  • RenameSweeper.plan (cognitive 40) app/src/main/java/ceui/pixiv/download/maintenance/RenameSweeper.kt:76 — RenameSweeper.plan has cognitive complexity 40 (threshold 15). Drivers by points: if/else 12 (31 pts), boolean chains 3, loops 2 (3 pts), 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 · SearchNovelRepo.initApi (cognitive 38) · ×1
  • SearchNovelRepo.initApi (cognitive 38) app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:90 — SearchNovelRepo.initApi has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 8, error handling 4, match/switch 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 · DiscoveryPool.collect (cognitive 37) · ×1
  • DiscoveryPool.collect (cognitive 37) app/src/main/java/ceui/pixiv/db/discovery/DiscoveryPool.kt:81 — DiscoveryPool.collect has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (34 pts), boolean chains 1, error handling 1, loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DownloadTreeScanner.scan (cognitive 37) · ×1
  • DownloadTreeScanner.scan (cognitive 37) app/src/main/java/ceui/pixiv/download/importer/DownloadTreeScanner.kt:67 — DownloadTreeScanner.scan has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 2 (3 pts), error handling 1 (2 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 · StickerStore.prepare (cognitive 37) · ×1
  • StickerStore.prepare (cognitive 37) app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:32 — StickerStore.prepare has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 4 (10 pts), boolean chains 9 (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 · FetchProgressDialog.handleEvent (cognitive 37) · ×1
  • FetchProgressDialog.handleEvent (cognitive 37) app/src/main/java/ceui/pixiv/ui/bulk/FetchProgressDialog.kt:185 — FetchProgressDialog.handleEvent has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (35 pts), boolean chains 1, match/switch 1 (nesting depth added 19). 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 · TextEraser.dilate8 (cognitive 37) · ×1
  • TextEraser.dilate8 (cognitive 37) app/src/main/java/ceui/pixiv/ui/translate/TextEraser.kt:181 — TextEraser.dilate8 has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 4 (10 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 · Manager.downloadOne (cognitive 37) · ×1
  • Manager.downloadOne (cognitive 37) app/src/main/java/ceui/lisa/core/Manager.java:951 — Manager.downloadOne has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 9, error handling 4 (9 pts), ternaries 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 · Manager.runDirectTransfer (cognitive 37) · ×1
  • Manager.runDirectTransfer (cognitive 37) app/src/main/java/ceui/lisa/core/Manager.java:1668 — Manager.runDirectTransfer has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (29 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Mapper.apply (cognitive 36) · ×1
  • Mapper.apply (cognitive 36) app/src/main/java/ceui/lisa/core/Mapper.java:99 — Mapper.apply has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (20 pts), boolean chains 15, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BackupUtils.applyRestored (cognitive 36) · ×1
  • BackupUtils.applyRestored (cognitive 36) app/src/main/java/ceui/lisa/utils/BackupUtils.java:351 — BackupUtils.applyRestored has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 5 (10 pts), boolean chains 5 (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 · PixivOperate.encodeGifV2 (cognitive 36) · ×1
  • PixivOperate.encodeGifV2 (cognitive 36) app/src/main/java/ceui/lisa/utils/PixivOperate.java:599 — PixivOperate.encodeGifV2 has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (8 pts), error handling 2 (3 pts), boolean chains 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 · DownloadPageBackfill.runIfNeeded (cognitive 35) · ×1
  • DownloadPageBackfill.runIfNeeded (cognitive 35) app/src/main/java/ceui/lisa/database/DownloadPageBackfill.kt:58 — DownloadPageBackfill.runIfNeeded has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (9 pts), boolean chains 1, error handling 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 · ApkDownloadManager.runJob (cognitive 35) · ×1
  • ApkDownloadManager.runJob (cognitive 35) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:752 — ApkDownloadManager.runJob has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (24 pts), loops 5 (6 pts), boolean chains 4, error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageIntegrityValidator.validateAndRepairPng (cognitive 35) · ×1
  • ImageIntegrityValidator.validateAndRepairPng (cognitive 35) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt:240 — ImageIntegrityValidator.validateAndRepairPng has cognitive complexity 35 (threshold 15). Drivers by points: if/else 15 (27 pts), boolean chains 3, loops 2 (3 pts), error handling 2 (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 · CloudTranslationStreamKt.readTranslationEvents (cognitive 35) · ×1
  • CloudTranslationStreamKt.readTranslationEvents (cognitive 35) app/src/main/java/ceui/pixiv/shaftapi/CloudTranslationStream.kt:67 — CloudTranslationStreamKt.readTranslationEvents has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (25 pts), match/switch 2 (9 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 · GoogleWebTranslator.translateBatch (cognitive 34) · ×1
  • GoogleWebTranslator.translateBatch (cognitive 34) app/src/main/java/ceui/pixiv/ui/translate/GoogleWebTranslator.kt:51 — GoogleWebTranslator.translateBatch has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (15 pts), error handling 4 (12 pts), loops 3 (7 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 · BottomPanelCoordinator.setupImeInsets (cognitive 34) · ×1
  • BottomPanelCoordinator.setupImeInsets (cognitive 34) panel/src/main/java/ceui/pixiv/panel/BottomPanelCoordinator.kt:202 — BottomPanelCoordinator.setupImeInsets has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 9, 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 · AppLevelStateHelper.fill (cognitive 34) · ×1
  • AppLevelStateHelper.fill (cognitive 34) app/src/main/java/ceui/lisa/helper/AppLevelStateHelper.java:26 — AppLevelStateHelper.fill has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 4 (12 pts), ternaries 1 (4 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchIllustRepo.initApi (cognitive 33) · ×1
  • SearchIllustRepo.initApi (cognitive 33) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:94 — SearchIllustRepo.initApi has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (18 pts), boolean chains 9, error handling 4, 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 · NovelReaderView.onTouchEvent (cognitive 33) · ×1
  • NovelReaderView.onTouchEvent (cognitive 33) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:389 — NovelReaderView.onTouchEvent has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (30 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 · SearchFilterV3LegacyBridge.seedFromLegacy (cognitive 33) · ×1
  • SearchFilterV3LegacyBridge.seedFromLegacy (cognitive 33) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.kt:115 — SearchFilterV3LegacyBridge.seedFromLegacy has cognitive complexity 33 (threshold 15). Drivers by points: if/else 21, boolean chains 8, match/switch 3 (4 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 · PlazaReportFragment.onViewCreated (cognitive 32) · ×1
  • PlazaReportFragment.onViewCreated (cognitive 32) app/src/main/java/ceui/pixiv/plaza/ui/PlazaReportFragment.kt:54 — PlazaReportFragment.onViewCreated has cognitive complexity 32 (threshold 15). Drivers by points: if/else 27 (28 pts), boolean chains 2, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NetworkTestViewModel.runImageDownloadPhase (cognitive 32) · ×1
  • NetworkTestViewModel.runImageDownloadPhase (cognitive 32) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1397 — NetworkTestViewModel.runImageDownloadPhase has cognitive complexity 32 (threshold 15). Drivers by points: if/else 22 (27 pts), boolean chains 3, error handling 1, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FrameSequencePlayer.decodeLoop (cognitive 32) · ×1
  • FrameSequencePlayer.decodeLoop (cognitive 32) app/src/main/java/ceui/pixiv/ui/detail/FrameSequencePlayer.kt:175 — FrameSequencePlayer.decodeLoop has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (25 pts), error handling 3 (6 pts), loops 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 · DrawerIconCatalog.iconFor (cognitive 32) · ×1
  • DrawerIconCatalog.iconFor (cognitive 32) app/src/main/java/ceui/pixiv/ui/navigation/DrawerIconCatalog.java:18 — DrawerIconCatalog.iconFor has cognitive complexity 32 (threshold 15). Drivers by points: if/else 31, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · HistoryBackfill.run (cognitive 31) · ×1
  • HistoryBackfill.run (cognitive 31) app/src/main/java/ceui/pixiv/db/HistoryBackfill.kt:80 — HistoryBackfill.run has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (19 pts), loops 5 (9 pts), error handling 2, 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 · QueueDownloadManager.runMainLoop (cognitive 31) · ×1
  • QueueDownloadManager.runMainLoop (cognitive 31) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:495 — QueueDownloadManager.runMainLoop has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (22 pts), boolean chains 4, error handling 2 (4 pts), loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ZoomSyncKt.setupZoomSync (cognitive 31) · ×1
  • ZoomSyncKt.setupZoomSync (cognitive 31) app/src/main/java/ceui/pixiv/ui/common/ZoomSync.kt:35 — ZoomSyncKt.setupZoomSync has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 8, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ApkDownloadManager.downloadSegment (cognitive 30) · ×1
  • ApkDownloadManager.downloadSegment (cognitive 30) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:956 — ApkDownloadManager.downloadSegment has cognitive complexity 30 (threshold 15). Drivers by points: if/else 19 (24 pts), boolean chains 5, loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PostView.bindImages (cognitive 30) · ×1
  • PostView.bindImages (cognitive 30) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:849 — PostView.bindImages has cognitive complexity 30 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 6, loops 2 (5 pts), match/switch 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 · SearchFilterV3.activeCount (cognitive 30) · ×1
  • SearchFilterV3.activeCount (cognitive 30) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3.kt:169 — SearchFilterV3.activeCount has cognitive complexity 30 (threshold 15). Drivers by points: if/else 20, boolean chains 10. 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 · FragmentSettingsDownload.initData (cognitive 30) · ×1
  • FragmentSettingsDownload.initData (cognitive 30) app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:46 — FragmentSettingsDownload.initData has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 4 (6 pts), ternaries 4, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Paginator.emitParagraph (cognitive 29) · ×1
  • Paginator.emitParagraph (cognitive 29) app/src/main/java/ceui/pixiv/ui/novel/reader/paginate/Paginator.kt:212 — Paginator.emitParagraph has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (22 pts), loops 2 (3 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AiTranslator.translateBatch (cognitive 29) · ×1
  • AiTranslator.translateBatch (cognitive 29) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:191 — AiTranslator.translateBatch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (13 pts), error handling 5 (9 pts), loops 3 (7 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 · FragmentSearch.dispatchClick (cognitive 29) · ×1
  • FragmentSearch.dispatchClick (cognitive 29) app/src/main/java/ceui/lisa/fragments/FragmentSearch.java:163 — FragmentSearch.dispatchClick has cognitive complexity 29 (threshold 15). Drivers by points: if/else 17 (22 pts), error handling 2 (6 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CronetInterceptor.intercept (cognitive 29) · ×1
  • CronetInterceptor.intercept (cognitive 29) app/src/main/java/ceui/lisa/http/CronetInterceptor.java:138 — CronetInterceptor.intercept has cognitive complexity 29 (threshold 15). Drivers by points: if/else 13 (17 pts), loops 4 (5 pts), ternaries 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PickerContent.render (cognitive 28) · ×1
  • PickerContent.render (cognitive 28) app/src/main/java/ceui/pixiv/sticker/StickerPicker.kt:84 — PickerContent.render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (21 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 12). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · EmailBackupV3Fragment.render (cognitive 28) · ×1
  • EmailBackupV3Fragment.render (cognitive 28) app/src/main/java/ceui/pixiv/ui/account/EmailBackupV3Fragment.kt:122 — EmailBackupV3Fragment.render has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24 (25 pts), boolean chains 2, 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 · TemplateRouteFactory.create (cognitive 28) · ×1
  • TemplateRouteFactory.create (cognitive 28) app/src/main/java/ceui/pixiv/ui/navigation/TemplateRouteFactory.kt:153 — TemplateRouteFactory.create has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (20 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · NovelReaderV3Fragment.observeReaderState (cognitive 28) · ×1
  • NovelReaderV3Fragment.observeReaderState (cognitive 28) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:565 — NovelReaderV3Fragment.observeReaderState has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20 (25 pts), match/switch 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ReferralPageView.taskCard (cognitive 28) · ×1
  • ReferralPageView.taskCard (cognitive 28) app/src/main/java/ceui/pixiv/ui/referral/ReferralPageView.kt:339 — ReferralPageView.taskCard has cognitive complexity 28 (threshold 15). Drivers by points: if/else 24 (25 pts), match/switch 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ImageDetailActivity.syncAiOverlayForPage (cognitive 27) · ×1
  • ImageDetailActivity.syncAiOverlayForPage (cognitive 27) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1535 — ImageDetailActivity.syncAiOverlayForPage has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5 (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 · ReboundSpringChain.animate (cognitive 27) · ×1
  • ReboundSpringChain.animate (cognitive 27) app/src/main/java/ceui/lisa/helper/ReboundSpringChain.kt:106 — ReboundSpringChain.animate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 19 (21 pts), loops 3 (4 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 · PixivActionQueue.report (cognitive 27) · ×1
  • PixivActionQueue.report (cognitive 27) app/src/main/java/ceui/pixiv/actions/PixivActionQueue.kt:311 — PixivActionQueue.report has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 1, match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ChatMessageBodyLayout.onMeasure (cognitive 27) · ×1
  • ChatMessageBodyLayout.onMeasure (cognitive 27) app/src/main/java/ceui/pixiv/chat/ui/ChatMessageBodyLayout.kt:27 — ChatMessageBodyLayout.onMeasure has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (19 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 · SearchFilterV3BottomSheet.registerPickerListeners (cognitive 27) · ×1
  • SearchFilterV3BottomSheet.registerPickerListeners (cognitive 27) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3BottomSheet.kt:243 — SearchFilterV3BottomSheet.registerPickerListeners has cognitive complexity 27 (threshold 15). Drivers by points: if/else 22, boolean chains 4, 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 · FragmentEditFile.invoke (cognitive 27) · ×1
  • FragmentEditFile.invoke (cognitive 27) app/src/main/java/ceui/lisa/fragments/FragmentEditFile.java:168 — FragmentEditFile.invoke has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (6 pts) (nesting depth added 16). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · ImageTranslationViewModel.runManualPipeline (cognitive 26) · ×1
  • ImageTranslationViewModel.runManualPipeline (cognitive 26) app/src/main/java/ceui/lisa/activities/ImageTranslationViewModel.kt:279 — ImageTranslationViewModel.runManualPipeline has cognitive complexity 26 (threshold 15). Drivers by points: if/else 14 (22 pts), error handling 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BookmarkMirrorService.onRunFinished (cognitive 26) · ×1
  • BookmarkMirrorService.onRunFinished (cognitive 26) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:849 — BookmarkMirrorService.onRunFinished has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SafBackend.ensureDirectory (cognitive 26) · ×1
  • SafBackend.ensureDirectory (cognitive 26) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:293 — SafBackend.ensureDirectory has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 5 (9 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PdfExporter.export (cognitive 26) · ×1
  • PdfExporter.export (cognitive 26) app/src/main/java/ceui/pixiv/ui/novel/reader/export/PdfExporter.kt:36 — PdfExporter.export has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 3 (8 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UgoiraTaskKt.downloadUgoira (cognitive 25) · ×1
  • UgoiraTaskKt.downloadUgoira (cognitive 25) app/src/main/java/ceui/pixiv/ui/bulk/UgoiraTask.kt:62 — UgoiraTaskKt.downloadUgoira has cognitive complexity 25 (threshold 15). Drivers by points: if/else 16 (18 pts), error handling 3 (4 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 · ModelArchiveInstaller.install (cognitive 25) · ×1
  • ModelArchiveInstaller.install (cognitive 25) app/src/main/java/ceui/pixiv/ui/common/ModelArchiveInstaller.kt:53 — ModelArchiveInstaller.install has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (18 pts), loops 2 (4 pts), boolean chains 3 (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 · ArtworkV3Actions.showMoreMenu (cognitive 25) · ×1
  • ArtworkV3Actions.showMoreMenu (cognitive 25) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Actions.kt:211 — ArtworkV3Actions.showMoreMenu has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (20 pts), boolean chains 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NaturalOrder.compare (cognitive 25) · ×1
  • NaturalOrder.compare (cognitive 25) app/src/main/java/ceui/pixiv/ui/download/DownloadPageOrder.kt:22 — NaturalOrder.compare has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (7 pts), boolean chains 4 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NovelReaderV3Fragment.addReaderMenuItems (cognitive 25) · ×1
  • NovelReaderV3Fragment.addReaderMenuItems (cognitive 25) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1052 — NovelReaderV3Fragment.addReaderMenuItems has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 2, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · MangaBatchTranslateCenter.runBatch (cognitive 25) · ×1
  • MangaBatchTranslateCenter.runBatch (cognitive 25) app/src/main/java/ceui/pixiv/ui/translate/MangaBatchTranslateCenter.kt:236 — MangaBatchTranslateCenter.runBatch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (16 pts), error handling 2 (6 pts), match/switch 1 (2 pts), loops 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 · WitTagFlowView.renderItems (cognitive 25) · ×1
  • WitTagFlowView.renderItems (cognitive 25) witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitTagFlowView.kt:193 — WitTagFlowView.renderItems has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17 (21 pts), boolean chains 3, 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 · UserActivityV3.displayUser (cognitive 24) · ×1
  • UserActivityV3.displayUser (cognitive 24) app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:495 — UserActivityV3.displayUser has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppUpdateChecker.isRateLimit (cognitive 24) · ×1
  • AppUpdateChecker.isRateLimit (cognitive 24) app/src/main/java/ceui/lisa/update/AppUpdateChecker.kt:103 — AppUpdateChecker.isRateLimit has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 2 (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · AccountOnlineReportOutbox.workerLoop (cognitive 24) · ×1
  • AccountOnlineReportOutbox.workerLoop (cognitive 24) app/src/main/java/ceui/pixiv/actions/AccountOnlineReportOutbox.kt:204 — AccountOnlineReportOutbox.workerLoop has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 4 (6 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · StickerStore.reopen (cognitive 24) · ×1
  • StickerStore.reopen (cognitive 24) app/src/main/java/ceui/pixiv/sticker/StickerStore.kt:172 — StickerStore.reopen has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (9 pts), error handling 4 (7 pts), loops 3 (5 pts), boolean chains 3 (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 · ModelDownloadFragment.startDownload (cognitive 24) · ×1
  • ModelDownloadFragment.startDownload (cognitive 24) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:199 — ModelDownloadFragment.startDownload has cognitive complexity 24 (threshold 15). Drivers by points: if/else 17 (20 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 · BookmarkLibraryUi.refreshIfStale (cognitive 24) · ×1
  • BookmarkLibraryUi.refreshIfStale (cognitive 24) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt:551 — BookmarkLibraryUi.refreshIfStale has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (9 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 · IllustAiHelper.restoreAiTasks (cognitive 24) · ×1
  • IllustAiHelper.restoreAiTasks (cognitive 24) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:327 — IllustAiHelper.restoreAiTasks has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), match/switch 2 (4 pts), loops 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 · FragmentWebView.recursiveRequest (cognitive 24) · ×1
  • FragmentWebView.recursiveRequest (cognitive 24) app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:577 — FragmentWebView.recursiveRequest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), error handling 3, loops 1 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SharedConfig.measureDevicePerformanceClass (cognitive 24) · ×1
  • SharedConfig.measureDevicePerformanceClass (cognitive 24) app/src/main/java/ceui/pixiv/widget/telegram/TelegramCompat.java:116 — SharedConfig.measureDevicePerformanceClass has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), error handling 2 (3 pts), loops 2 (3 pts), ternaries 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 · BulkDownloadCacheCleaner.deepSlim (cognitive 23) · ×1
  • BulkDownloadCacheCleaner.deepSlim (cognitive 23) app/src/main/java/ceui/pixiv/db/bulkclean/BulkDownloadCacheCleaner.kt:175 — BulkDownloadCacheCleaner.deepSlim has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlazaModerationModel.submit (cognitive 23) · ×1
  • PlazaModerationModel.submit (cognitive 23) app/src/main/java/ceui/pixiv/plaza/ui/PlazaModerationModel.kt:78 — PlazaModerationModel.submit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, error handling 2, loops 1 (2 pts), match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SnapshotGenerator.generateContent (cognitive 23) · ×1
  • SnapshotGenerator.generateContent (cognitive 23) app/src/main/java/ceui/pixiv/snapshot/SnapshotGenerator.kt:156 — SnapshotGenerator.generateContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 3, error handling 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · QueueDownloadManager.pullRowToInFlight (cognitive 23) · ×1
  • QueueDownloadManager.pullRowToInFlight (cognitive 23) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:857 — QueueDownloadManager.pullRowToInFlight has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 1 (2 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 · IllustStaggerRendererKt.staggerIllustRenderer (cognitive 23) · ×1
  • IllustStaggerRendererKt.staggerIllustRenderer (cognitive 23) app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt:100 — IllustStaggerRendererKt.staggerIllustRenderer has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 8 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · JustifiedLayoutManagerKt.packJustifiedRows (cognitive 23) · ×1
  • JustifiedLayoutManagerKt.packJustifiedRows (cognitive 23) app/src/main/java/ceui/pixiv/ui/common/JustifiedLayoutManager.kt:247 — JustifiedLayoutManagerKt.packJustifiedRows has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NetworkTestViewModel.httpsHandshakeSampled (cognitive 23) · ×1
  • NetworkTestViewModel.httpsHandshakeSampled (cognitive 23) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1031 — NetworkTestViewModel.httpsHandshakeSampled has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, error handling 2 (3 pts), match/switch 2, 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 · SearchFilterV3LegacyBridge.applyToLegacy (cognitive 23) · ×1
  • SearchFilterV3LegacyBridge.applyToLegacy (cognitive 23) app/src/main/java/ceui/pixiv/ui/search/v3/SearchFilterV3LegacyBridge.kt:282 — SearchFilterV3LegacyBridge.applyToLegacy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 22, 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 · ComicTextDetector.detectLocked (cognitive 23) · ×1
  • ComicTextDetector.detectLocked (cognitive 23) app/src/main/java/ceui/pixiv/ui/translate/ComicTextDetector.kt:196 — ComicTextDetector.detectLocked has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 2 (4 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedFragment.render (cognitive 23) · ×1
  • FeedFragment.render (cognitive 23) feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt:718 — FeedFragment.render has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11, boolean chains 8, match/switch 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 · FragmentSettingsAppearance.initData (cognitive 23) · ×1
  • FragmentSettingsAppearance.initData (cognitive 23) app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:212 — FragmentSettingsAppearance.initData has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (14 pts), ternaries 7, loops 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.
D2 · Cognitive Complexity · NeuQuant.learn (cognitive 23) · ×1
  • NeuQuant.learn (cognitive 23) app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:771 — NeuQuant.learn has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (18 pts), loops 3 (5 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 · DownloadedPageIndex.scan (cognitive 22) · ×1
  • DownloadedPageIndex.scan (cognitive 22) app/src/main/java/ceui/pixiv/download/DownloadedPageIndex.kt:74 — DownloadedPageIndex.scan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 3 (4 pts), boolean chains 3, error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CloudTranslationStreamKt.translateTextsStreaming (cognitive 22) · ×1
  • CloudTranslationStreamKt.translateTextsStreaming (cognitive 22) app/src/main/java/ceui/pixiv/shaftapi/CloudTranslationStream.kt:17 — CloudTranslationStreamKt.translateTextsStreaming has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (20 pts), error handling 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 · QueueDownloadManager.fillSlots (cognitive 22) · ×1
  • QueueDownloadManager.fillSlots (cognitive 22) app/src/main/java/ceui/pixiv/ui/bulk/QueueDownloadManager.kt:776 — QueueDownloadManager.fillSlots has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 5, 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 · NovelReaderV3Fragment.jumpChapter (cognitive 22) · ×1
  • NovelReaderV3Fragment.jumpChapter (cognitive 22) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1464 — NovelReaderV3Fragment.jumpChapter has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (22 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 · ReferralPageView.hero (cognitive 22) · ×1
  • ReferralPageView.hero (cognitive 22) app/src/main/java/ceui/pixiv/ui/referral/ReferralPageView.kt:252 — ReferralPageView.hero has cognitive complexity 22 (threshold 15). Drivers by points: if/else 21, boolean chains 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · MergeDownloadNovelSeriesTask.bulkMergeNovelSeries (cognitive 22) · ×1
  • MergeDownloadNovelSeriesTask.bulkMergeNovelSeries (cognitive 22) app/src/main/java/ceui/pixiv/ui/task/MergeDownloadNovelSeriesTask.kt:41 — MergeDownloadNovelSeriesTask.bulkMergeNovelSeries has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BubbleAreaFinder.expand (cognitive 22) · ×1
  • BubbleAreaFinder.expand (cognitive 22) app/src/main/java/ceui/pixiv/ui/translate/BubbleAreaFinder.kt:43 — BubbleAreaFinder.expand has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), loops 6 (nesting depth added 2). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MangaOcrRecognizer.recognizeLocked (cognitive 22) · ×1
  • MangaOcrRecognizer.recognizeLocked (cognitive 22) app/src/main/java/ceui/pixiv/ui/translate/MangaOcrRecognizer.kt:167 — MangaOcrRecognizer.recognizeLocked has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 4 (6 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedViewModel.refresh (cognitive 22) · ×1
  • FeedViewModel.refresh (cognitive 22) feeds/src/main/java/ceui/pixiv/feeds/FeedViewModel.kt:95 — FeedViewModel.refresh has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 4 (6 pts), boolean chains 4, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FeedViewModel.loadMore (cognitive 22) · ×1
  • FeedViewModel.loadMore (cognitive 22) feeds/src/main/java/ceui/pixiv/feeds/FeedViewModel.kt:240 — FeedViewModel.loadMore has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4, error handling 2, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LZWEncoder.compress (cognitive 22) · ×1
  • LZWEncoder.compress (cognitive 22) app/src/main/java/ceui/lisa/utils/AnimatedGifEncoder.java:1186 — LZWEncoder.compress has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UActivity.invoke (cognitive 21) · ×1
  • UActivity.invoke (cognitive 21) app/src/main/java/ceui/lisa/activities/UActivity.kt:210 — UActivity.invoke has cognitive complexity 21 (threshold 15). Drivers by points: if/else 19 (21 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 · FragmentIllust.refreshPageProgressPill (cognitive 21) · ×1
  • FragmentIllust.refreshPageProgressPill (cognitive 21) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:1085 — FragmentIllust.refreshPageProgressPill has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PlazaComposeFragment.onViewCreated (cognitive 21) · ×1
  • PlazaComposeFragment.onViewCreated (cognitive 21) app/src/main/java/ceui/pixiv/plaza/ui/PlazaComposeFragment.kt:84 — PlazaComposeFragment.onViewCreated has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15 (17 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · StickerRepository.prepare (cognitive 21) · ×1
  • StickerRepository.prepare (cognitive 21) app/src/main/java/ceui/pixiv/sticker/StickerRepository.kt:103 — StickerRepository.prepare has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 5, error handling 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 · NetworkTestFragment.renderSummary (cognitive 21) · ×1
  • NetworkTestFragment.renderSummary (cognitive 21) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestFragment.kt:217 — NetworkTestFragment.renderSummary has cognitive complexity 21 (threshold 15). Drivers by points: if/else 18 (19 pts), boolean chains 1, match/switch 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · EpubRetryDialogHelper.showForegroundRetryDialog (cognitive 21) · ×1
  • EpubRetryDialogHelper.showForegroundRetryDialog (cognitive 21) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubImageRetryPolicy.kt:212 — EpubRetryDialogHelper.showForegroundRetryDialog has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (21 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 · IllustLayoutPreviewView.layoutTiles (cognitive 21) · ×1
  • IllustLayoutPreviewView.layoutTiles (cognitive 21) app/src/main/java/ceui/pixiv/ui/settings/IllustListLayoutPicker.kt:308 — IllustLayoutPreviewView.layoutTiles has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LazyFragmentStatePagerAdapter.restoreState (cognitive 21) · ×1
  • LazyFragmentStatePagerAdapter.restoreState (cognitive 21) app/src/main/java/ceui/lisa/adapters/LazyFragmentStatePagerAdapter.java:194 — LazyFragmentStatePagerAdapter.restoreState has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (10 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 · ActionQueue.execute (cognitive 20) · ×1
  • ActionQueue.execute (cognitive 20) actionqueue/src/main/java/ceui/pixiv/actionqueue/ActionQueue.kt:353 — ActionQueue.execute has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), error handling 4, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FragmentImageDetail.loadFromNetwork (cognitive 20) · ×1
  • FragmentImageDetail.loadFromNetwork (cognitive 20) app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt:854 — FragmentImageDetail.loadFromNetwork has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (17 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 · ImageHostManager.rewrite (cognitive 20) · ×1
  • ImageHostManager.rewrite (cognitive 20) app/src/main/java/ceui/lisa/http/ImageHostManager.kt:89 — ImageHostManager.rewrite has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 1, match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UpgradeRequiredPrompt.open (cognitive 20) · ×1
  • UpgradeRequiredPrompt.open (cognitive 20) app/src/main/java/ceui/lisa/update/UpgradeRequiredPrompt.kt:77 — UpgradeRequiredPrompt.open has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 4 (7 pts), boolean chains 3, match/switch 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SnapshotImportRecovery.recover (cognitive 20) · ×1
  • SnapshotImportRecovery.recover (cognitive 20) app/src/main/java/ceui/pixiv/snapshot/SnapshotImportRecovery.kt:21 — SnapshotImportRecovery.recover has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, 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 · IllustCardMenuKt.showCardMenu (cognitive 20) · ×1
  • IllustCardMenuKt.showCardMenu (cognitive 20) app/src/main/java/ceui/pixiv/ui/common/IllustCardMenu.kt:39 — IllustCardMenuKt.showCardMenu has cognitive complexity 20 (threshold 15). Drivers by points: if/else 15 (16 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 · SearchNovelSeriesWebSourceKt.buildWebNovelSearchParams (cognitive 20) · ×1
  • SearchNovelSeriesWebSourceKt.buildWebNovelSearchParams (cognitive 20) app/src/main/java/ceui/pixiv/ui/search/SearchNovelSeriesWebSource.kt:299 — SearchNovelSeriesWebSourceKt.buildWebNovelSearchParams has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, match/switch 4, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · V3BottomSheetBase.restyleCardSegments (cognitive 20) · ×1
  • V3BottomSheetBase.restyleCardSegments (cognitive 20) app/src/main/java/ceui/pixiv/ui/search/v3/V3BottomSheetBase.kt:108 — V3BottomSheetBase.restyleCardSegments has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 2, loops 2, 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 · RobustWebSocketClient.deliver (cognitive 20) · ×1
  • RobustWebSocketClient.deliver (cognitive 20) websocket/src/main/java/ceui/pixiv/websocket/RobustWebSocketClient.kt:607 — RobustWebSocketClient.deliver has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HistoryFeedSource.loadPage (cognitive 19) · ×1
  • HistoryFeedSource.loadPage (cognitive 19) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:146 — HistoryFeedSource.loadPage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ApkDownloadManager.restore (cognitive 19) · ×1
  • ApkDownloadManager.restore (cognitive 19) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:405 — ApkDownloadManager.restore has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DragDismissLayout.onInterceptTouchEvent (cognitive 19) · ×1
  • DragDismissLayout.onInterceptTouchEvent (cognitive 19) app/src/main/java/ceui/lisa/view/DragDismissLayout.kt:183 — DragDismissLayout.onInterceptTouchEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, 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 · BubbleHolder.bindQuote (cognitive 19) · ×1
  • BubbleHolder.bindQuote (cognitive 19) app/src/main/java/ceui/pixiv/chat/ui/ChatMessageAdapter.kt:393 — BubbleHolder.bindQuote has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 2, 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 · ImageIntegrityValidator.findByteRepair (cognitive 19) · ×1
  • ImageIntegrityValidator.findByteRepair (cognitive 19) app/src/main/java/ceui/pixiv/download/ImageIntegrityValidator.kt:185 — ImageIntegrityValidator.findByteRepair has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (13 pts), loops 3 (5 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 · MediaStoreBackend.openModern (cognitive 19) · ×1
  • MediaStoreBackend.openModern (cognitive 19) app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:245 — MediaStoreBackend.openModern has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MediaUploader.upload (cognitive 19) · ×1
  • MediaUploader.upload (cognitive 19) app/src/main/java/ceui/pixiv/shaftapi/MediaUploader.kt:34 — MediaUploader.upload has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 3, error handling 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NovelFeedItem.passesContentFilters (cognitive 19) · ×1
  • NovelFeedItem.passesContentFilters (cognitive 19) app/src/main/java/ceui/pixiv/ui/common/NovelFeedItem.kt:114 — NovelFeedItem.passesContentFilters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UgoiraTimelineView.onHandleTouch (cognitive 19) · ×1
  • UgoiraTimelineView.onHandleTouch (cognitive 19) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraTimelineView.kt:392 — UgoiraTimelineView.onHandleTouch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · ActiveListV3Fragment.onViewCreated (cognitive 19) · ×1
  • ActiveListV3Fragment.onViewCreated (cognitive 19) app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:119 — ActiveListV3Fragment.onViewCreated has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 3, loops 2, 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 · NovelTtsText.split (cognitive 19) · ×1
  • NovelTtsText.split (cognitive 19) app/src/main/java/ceui/pixiv/ui/novel/reader/tts/NovelTtsText.kt:110 — NovelTtsText.split has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AiTranslator.streamChatCompletion (cognitive 19) · ×1
  • AiTranslator.streamChatCompletion (cognitive 19) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:510 — AiTranslator.streamChatCompletion has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 1, error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · BaseAdapter.setLiked (cognitive 19) · ×1
  • BaseAdapter.setLiked (cognitive 19) app/src/main/java/ceui/lisa/adapters/BaseAdapter.java:132 — BaseAdapter.setLiked has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (17 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 · BackupUtils.restoreBackupEntity (cognitive 19) · ×1
  • BackupUtils.restoreBackupEntity (cognitive 19) app/src/main/java/ceui/lisa/utils/BackupUtils.java:252 — BackupUtils.restoreBackupEntity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (4 pts), match/switch 1 (2 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 · DrawerLayoutViewPager.onTouchEvent (cognitive 19) · ×1
  • DrawerLayoutViewPager.onTouchEvent (cognitive 19) app/src/main/java/ceui/lisa/view/DrawerLayoutViewPager.java:47 — DrawerLayoutViewPager.onTouchEvent has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (16 pts), boolean chains 2, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · FragmentUserRight.initData (cognitive 18) · ×1
  • FragmentUserRight.initData (cognitive 18) app/src/main/java/ceui/lisa/fragments/FragmentUserRight.kt:29 — FragmentUserRight.initData has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17, 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 · ApkDownloadManager.launchJob (cognitive 18) · ×1
  • ApkDownloadManager.launchJob (cognitive 18) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:581 — ApkDownloadManager.launchJob has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 5, 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 · BookmarkMirrorService.runOnePage (cognitive 18) · ×1
  • BookmarkMirrorService.runOnePage (cognitive 18) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:579 — BookmarkMirrorService.runOnePage has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 2, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · PlazaTimelineFragment.onViewCreated (cognitive 18) · ×1
  • PlazaTimelineFragment.onViewCreated (cognitive 18) app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineFragment.kt:57 — PlazaTimelineFragment.onViewCreated has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 12, if/else 5, match/switch 1. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · ArtlistEditorModel.save (cognitive 18) · ×1
  • ArtlistEditorModel.save (cognitive 18) app/src/main/java/ceui/pixiv/ui/artlist/ArtlistModels.kt:141 — ArtlistEditorModel.save has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4, error handling 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 · IllustFeedPoolSync.bind (cognitive 18) · ×1
  • IllustFeedPoolSync.bind (cognitive 18) app/src/main/java/ceui/pixiv/ui/common/IllustFeedSync.kt:150 — IllustFeedPoolSync.bind has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 2, error handling 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · NovelFeedFragment.novelCardRenderer (cognitive 18) · ×1
  • NovelFeedFragment.novelCardRenderer (cognitive 18) app/src/main/java/ceui/pixiv/ui/common/NovelFeedFragment.kt:199 — NovelFeedFragment.novelCardRenderer has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UgoiraPlayerView.applyPlayButtonPosition (cognitive 18) · ×1
  • UgoiraPlayerView.applyPlayButtonPosition (cognitive 18) app/src/main/java/ceui/pixiv/ui/detail/UgoiraPlayerView.kt:336 — UgoiraPlayerView.applyPlayButtonPosition has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · UgoiraFramesViewModel.exportClip (cognitive 18) · ×1
  • UgoiraFramesViewModel.exportClip (cognitive 18) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesViewModel.kt:298 — UgoiraFramesViewModel.exportClip has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (12 pts), error handling 2 (5 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SearchPinController.render (cognitive 18) · ×1
  • SearchPinController.render (cognitive 18) app/src/main/java/ceui/pixiv/ui/search/SearchPinController.kt:149 — SearchPinController.render has cognitive complexity 18 (threshold 15). Drivers by points: if/else 17 (18 pts) (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · WebDavClient.readMultistatus (cognitive 18) · ×1
  • WebDavClient.readMultistatus (cognitive 18) app/src/main/java/ceui/pixiv/webdav/WebDavClient.kt:145 — WebDavClient.readMultistatus has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (6 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WitPopup.show (cognitive 18) · ×1
  • WitPopup.show (cognitive 18) witstudio/src/main/java/ceui/pixiv/witstudio/popup/WitPopup.kt:114 — WitPopup.show has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 2, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · OutWakeActivity.routePathLink (cognitive 18) · ×1
  • OutWakeActivity.routePathLink (cognitive 18) app/src/main/java/ceui/lisa/activities/OutWakeActivity.java:112 — OutWakeActivity.routePathLink has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · 6.onEditorAction (cognitive 18) · ×1
  • 6.onEditorAction (cognitive 18) app/src/main/java/ceui/lisa/activities/SearchActivity.java:331 — 6.onEditorAction has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), ternaries 2 (3 pts), boolean chains 2, error handling 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 · Manager.addTasks (cognitive 18) · ×1
  • Manager.addTasks (cognitive 18) app/src/main/java/ceui/lisa/core/Manager.java:454 — Manager.addTasks has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3, boolean chains 2, error handling 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppLevelState.updateFollowUserStatus (cognitive 18) · ×1
  • AppLevelState.updateFollowUserStatus (cognitive 18) app/src/main/java/ceui/lisa/viewmodel/AppLevelState.java:46 — AppLevelState.updateFollowUserStatus has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · UserActivityV3.showMoreMenu (cognitive 17) · ×1
  • UserActivityV3.showMoreMenu (cognitive 17) app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:737 — UserActivityV3.showMoreMenu has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 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 · FragmentImageDetail.loadImage (cognitive 17) · ×1
  • FragmentImageDetail.loadImage (cognitive 17) app/src/main/java/ceui/lisa/fragments/FragmentImageDetail.kt:661 — FragmentImageDetail.loadImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 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 · ApkDownloadManager.validateZip (cognitive 17) · ×1
  • ApkDownloadManager.validateZip (cognitive 17) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:137 — ApkDownloadManager.validateZip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2 (3 pts), error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AppUpdateChecker.checkForUpdate (cognitive 17) · ×1
  • AppUpdateChecker.checkForUpdate (cognitive 17) app/src/main/java/ceui/lisa/update/AppUpdateChecker.kt:205 — AppUpdateChecker.checkForUpdate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 3 (5 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImagePageSaver.save (cognitive 17) · ×1
  • ImagePageSaver.save (cognitive 17) app/src/main/java/ceui/pixiv/download/ImagePageSaver.kt:127 — ImagePageSaver.save has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 4, boolean chains 1, error handling 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SafBackend.replace (cognitive 17) · ×1
  • SafBackend.replace (cognitive 17) app/src/main/java/ceui/pixiv/download/backend/SafBackend.kt:90 — SafBackend.replace has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (12 pts), error handling 2 (4 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 · IllustFeedItem.passesContentFilters (cognitive 17) · ×1
  • IllustFeedItem.passesContentFilters (cognitive 17) app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:131 — IllustFeedItem.passesContentFilters has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 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 · NetworkTestViewModel.probeIllust (cognitive 17) · ×1
  • NetworkTestViewModel.probeIllust (cognitive 17) app/src/main/java/ceui/pixiv/ui/debug/NetworkTestViewModel.kt:1836 — NetworkTestViewModel.probeIllust has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), error handling 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 · IllustSeriesFeedSource.load (cognitive 17) · ×1
  • IllustSeriesFeedSource.load (cognitive 17) app/src/main/java/ceui/pixiv/ui/detail/IllustSeriesFeed.kt:111 — IllustSeriesFeedSource.load has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FollowingExportSheet.show (cognitive 17) · ×1
  • FollowingExportSheet.show (cognitive 17) app/src/main/java/ceui/pixiv/ui/library/FollowingExportSheet.kt:50 — FollowingExportSheet.show has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, boolean chains 2, error handling 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NovelSeriesFeedKt.bindNovelSeriesHero (cognitive 17) · ×1
  • NovelSeriesFeedKt.bindNovelSeriesHero (cognitive 17) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:379 — NovelSeriesFeedKt.bindNovelSeriesHero has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EpubExporter.buildChapterXhtml (cognitive 17) · ×1
  • EpubExporter.buildChapterXhtml (cognitive 17) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:227 — EpubExporter.buildChapterXhtml has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EpubRetryDialogHelper.showBatchRetryDialog (cognitive 17) · ×1
  • EpubRetryDialogHelper.showBatchRetryDialog (cognitive 17) app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubImageRetryPolicy.kt:268 — EpubRetryDialogHelper.showBatchRetryDialog 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 · SlideshowFragment.showCurrentImage (cognitive 17) · ×1
  • SlideshowFragment.showCurrentImage (cognitive 17) app/src/main/java/ceui/pixiv/ui/slideshow/SlideshowFragment.kt:176 — SlideshowFragment.showCurrentImage has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 2 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · AiTranslator.doCallChatCompletion (cognitive 17) · ×1
  • AiTranslator.doCallChatCompletion (cognitive 17) app/src/main/java/ceui/pixiv/ui/translate/AiTranslator.kt:431 — AiTranslator.doCallChatCompletion has cognitive complexity 17 (threshold 15). Drivers by points: error handling 5 (12 pts), if/else 2 (4 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TextRenderer.wrapTextHorizontal (cognitive 17) · ×1
  • TextRenderer.wrapTextHorizontal (cognitive 17) app/src/main/java/ceui/pixiv/ui/translate/TextRenderer.kt:214 — TextRenderer.wrapTextHorizontal has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2, 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 · LikeHapticKt.playLikePressHaptic (cognitive 17) · ×1
  • LikeHapticKt.playLikePressHaptic (cognitive 17) app/src/main/java/ceui/pixiv/utils/LikeHaptic.kt:31 — LikeHapticKt.playLikePressHaptic has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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 · WitDialogBuilder.onCreateOperatorLayout (cognitive 17) · ×1
  • WitDialogBuilder.onCreateOperatorLayout (cognitive 17) witstudio/src/main/java/ceui/pixiv/witstudio/dialog/WitDialogBuilder.kt:326 — WitDialogBuilder.onCreateOperatorLayout has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OutWakeActivity.handleExternalSearch (cognitive 17) · ×1
  • OutWakeActivity.handleExternalSearch (cognitive 17) app/src/main/java/ceui/lisa/activities/OutWakeActivity.java:456 — OutWakeActivity.handleExternalSearch has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Manager.pumpBytes (cognitive 17) · ×1
  • Manager.pumpBytes (cognitive 17) app/src/main/java/ceui/lisa/core/Manager.java:1790 — Manager.pumpBytes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FragmentSettingsData.clearAiResults (cognitive 17) · ×1
  • FragmentSettingsData.clearAiResults (cognitive 17) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:638 — FragmentSettingsData.clearAiResults has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 4, ternaries 1 (2 pts), 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.
D2 · Cognitive Complexity · 4.shouldOverrideUrlLoading (cognitive 17) · ×1
  • 4.shouldOverrideUrlLoading (cognitive 17) app/src/main/java/ceui/lisa/fragments/FragmentWebView.java:294 — 4.shouldOverrideUrlLoading has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), error handling 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpoilerThread.run (cognitive 17) · ×1
  • SpoilerThread.run (cognitive 17) app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:393 — SpoilerThread.run has cognitive complexity 17 (threshold 15). Drivers by points: error handling 4 (9 pts), if/else 3 (5 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 · mockup.html.showScreen (cognitive 17) · ×1
  • mockup.html.showScreen (cognitive 17) mockup.html:2395 — mockup.html.showScreen has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (14 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 · mockup.html.document.addEventListener("keydown") (cognitive 17) · ×1
  • mockup.html.document.addEventListener("keydown") (cognitive 17) mockup.html:2473 — mockup.html.document.addEventListener("keydown") 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.
D2 · Cognitive Complexity · ImageDetailActivity.observeAiTask (cognitive 16) · ×1
  • ImageDetailActivity.observeAiTask (cognitive 16) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1480 — ImageDetailActivity.observeAiTask has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · HistoryFeedKt.historyIllustRenderer (cognitive 16) · ×1
  • HistoryFeedKt.historyIllustRenderer (cognitive 16) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:317 — HistoryFeedKt.historyIllustRenderer has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, 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 · ApkDownloadManager.downloadSegmentWithRetry (cognitive 16) · ×1
  • ApkDownloadManager.downloadSegmentWithRetry (cognitive 16) app/src/main/java/ceui/lisa/update/ApkDownloadManager.kt:918 — ApkDownloadManager.downloadSegmentWithRetry has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 3 (6 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChatBannerBridge.toBannerRequest (cognitive 16) · ×1
  • ChatBannerBridge.toBannerRequest (cognitive 16) app/src/main/java/ceui/pixiv/banner/host/ChatBannerBridge.kt:98 — ChatBannerBridge.toBannerRequest has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · ObjectPool.updateObjects (cognitive 16) · ×1
  • ObjectPool.updateObjects (cognitive 16) app/src/main/java/ceui/pixiv/cache/ObjectPool.kt:280 — ObjectPool.updateObjects has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 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 · StageStore.decideWrite (cognitive 16) · ×1
  • StageStore.decideWrite (cognitive 16) app/src/main/java/ceui/pixiv/download/StageStore.kt:209 — StageStore.decideWrite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), match/switch 2 (4 pts), boolean chains 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.
D2 · Cognitive Complexity · PostView.bindComments (cognitive 16) · ×1
  • PostView.bindComments (cognitive 16) app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt:692 — PostView.bindComments has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 1, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ModelDownloadFragment.showCopyOrImportDialog (cognitive 16) · ×1
  • ModelDownloadFragment.showCopyOrImportDialog (cognitive 16) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadFragment.kt:294 — ModelDownloadFragment.showCopyOrImportDialog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArtworkV3Fragment.onViewCreated (cognitive 16) · ×1
  • ArtworkV3Fragment.onViewCreated (cognitive 16) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:394 — ArtworkV3Fragment.onViewCreated has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · SocialCardsLayout.onLayout (cognitive 16) · ×1
  • SocialCardsLayout.onLayout (cognitive 16) app/src/main/java/ceui/pixiv/ui/discovery/DiscoverSocialSection.kt:127 — SocialCardsLayout.onLayout has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActiveAdapterV3.bindIllustStateAndProgress (cognitive 16) · ×1
  • ActiveAdapterV3.bindIllustStateAndProgress (cognitive 16) app/src/main/java/ceui/pixiv/ui/download/ActiveListV3Fragment.kt:929 — ActiveAdapterV3.bindIllustStateAndProgress has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 2, match/switch 2 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · NovelReaderV3Fragment.syncTtsState (cognitive 16) · ×1
  • NovelReaderV3Fragment.syncTtsState (cognitive 16) app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt:1181 — NovelReaderV3Fragment.syncTtsState has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MergedEpubWriter.buildChapterXhtml (cognitive 16) · ×1
  • MergedEpubWriter.buildChapterXhtml (cognitive 16) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:571 — MergedEpubWriter.buildChapterXhtml has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, match/switch 1 (2 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NovelReaderView.onInterceptTouchEvent (cognitive 16) · ×1
  • NovelReaderView.onInterceptTouchEvent (cognitive 16) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt:300 — NovelReaderView.onInterceptTouchEvent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SearchItemVisibilityKt.shouldHideSearchNovel (cognitive 16) · ×1
  • SearchItemVisibilityKt.shouldHideSearchNovel (cognitive 16) app/src/main/java/ceui/pixiv/ui/search/SearchItemVisibility.kt:214 — SearchItemVisibilityKt.shouldHideSearchNovel has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · SearchNovelFeedSource.load (cognitive 16) · ×1
  • SearchNovelFeedSource.load (cognitive 16) app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:375 — SearchNovelFeedSource.load has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · DateRangePickerSheet.showDatePicker (cognitive 16) · ×1
  • DateRangePickerSheet.showDatePicker (cognitive 16) app/src/main/java/ceui/pixiv/ui/search/v3/DateRangePickerSheet.kt:205 — DateRangePickerSheet.showDatePicker has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MangaOcr.recognize (cognitive 16) · ×1
  • MangaOcr.recognize (cognitive 16) app/src/main/java/ceui/pixiv/ui/upscale/MangaOcr.kt:124 — MangaOcr.recognize has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, error handling 4, boolean chains 2, loops 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 · IllustAdapter.loadFromNetwork (cognitive 16) · ×1
  • IllustAdapter.loadFromNetwork (cognitive 16) app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:781 — IllustAdapter.loadFromNetwork has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), ternaries 3 (4 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.
D2 · Cognitive Complexity · BackupUtils.writeBackup (cognitive 16) · ×1
  • BackupUtils.writeBackup (cognitive 16) app/src/main/java/ceui/lisa/utils/BackupUtils.java:169 — BackupUtils.writeBackup has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (5 pts), boolean chains 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SpoilerThread.init (cognitive 16) · ×1
  • SpoilerThread.init (cognitive 16) app/src/main/java/ceui/pixiv/widget/telegram/SpoilerEffect2.java:471 — SpoilerThread.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11, boolean chains 4, ternaries 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.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (92 shared lines) · ×1
  • Near-duplicate member pair (92 shared lines) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:94 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:94-406 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:90-416 — These two members are variants of one another: 92 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 (64 shared lines) · ×1
  • Near-duplicate member pair (64 shared lines) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:422 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:422-513 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:432-522 — These two members are variants of one another: 64 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 (50 shared lines) · ×1
  • Near-duplicate member pair (50 shared lines) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:115 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:115-251 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:388-534 — These two members are variants of one another: 50 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 (35 shared lines) · ×1
  • Near-duplicate member pair (35 shared lines) app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:103 — app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:103-146 | app/src/main/java/ceui/pixiv/ui/fanbox/FanboxPostDetailFeed.kt:120-164 — These two members are variants of one another: 35 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (29 shared lines) · ×1
  • Near-duplicate member pair (29 shared lines) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:92 — app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:92-161 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:104-189 — These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (26 shared lines) · ×1
  • Near-duplicate member pair (26 shared lines) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:94 — app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:94-153 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:63-106 — These two members are variants of one another: 26 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 (25 shared lines) · ×1
  • Near-duplicate member pair (25 shared lines) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:288 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:288-377 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:486-565 — These two members are variants of one another: 25 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 (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:272 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:272-301 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:323-351 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:546-594 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:123-175 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:177-192 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Edited copy of a member (41 corresponding lines) · ×1
  • Edited copy of a member (41 corresponding lines) app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:196 — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:196-236 | app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt:154-202 — These two members are one piece of code written twice and then edited apart: 41 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (50 corresponding lines) · ×1
  • Edited copy of a member (50 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:531 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:531-580 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:685-734 — These two members are one piece of code written twice and then edited apart: 50 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (56 corresponding lines) · ×1
  • Edited copy of a member (56 corresponding lines) app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1011 — app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1011-1067 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1075-1130 — These two members are one piece of code written twice and then edited apart: 56 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:47 — app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:47-122 | app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.kt:46-125 — These two members are one piece of code written twice and then edited apart: 76 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:54 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:54-113 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:253-315 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (65 corresponding lines) · ×1
  • Edited copy of a member (65 corresponding lines) app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:434 — app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:434-500 | app/src/main/java/ceui/lisa/fragments/HistoryUserFeed.kt:139-203 — These two members are one piece of code written twice and then edited apart: 65 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (49 corresponding lines) · ×1
  • Edited copy of a member (49 corresponding lines) app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:146 — app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:146-197 | app/src/main/java/ceui/pixiv/ui/upscale/UpscaleTaskPool.kt:291-339 — These two members are one piece of code written twice and then edited apart: 49 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×1
  • Edited copy of a member (43 corresponding lines) app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:35 — app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:35-85 | app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorMapper.kt:93-135 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:68 — app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:68-111 | app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:122-167 — These two members are one piece of code written twice and then edited apart: 44 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (40 corresponding lines) · ×1
  • Edited copy of a member (40 corresponding lines) app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:34 — app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:34-74 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:35-74 — These two members are one piece of code written twice and then edited apart: 40 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) app/src/main/java/ceui/pixiv/cache/SeriesCache.kt:63 — app/src/main/java/ceui/pixiv/cache/SeriesCache.kt:63-91 | app/src/main/java/ceui/pixiv/cache/SeriesCache.kt:98-126 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 35+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 35+ corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:906 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:906-940 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:955-989 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsExperimental.java:325-360 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 35 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 24+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 24+ corresponding lines) app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:478 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:478-501 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:531-558 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsExperimental.java:284-310 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 24 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 18+ corresponding lines) app/src/main/java/ceui/pixiv/ui/settings/GithubProxyDialog.kt:157 — app/src/main/java/ceui/pixiv/ui/settings/GithubProxyDialog.kt:157-181 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:134-151 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:461-478 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×1
  • Edited copy of a member (33 corresponding lines) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:102 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:102-138 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:132-164 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:138 — app/src/main/java/ceui/pixiv/ui/common/IllustFeedItem.kt:138-175 | app/src/main/java/ceui/pixiv/ui/common/NovelFeedItem.kt:121-158 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt:196 — app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt:196-241 | feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt:674-715 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 27+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 27+ corresponding lines) app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:324 — app/src/main/java/ceui/pixiv/ui/bulk/BulkSelectV3Fragment.kt:324-353 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:333-361 | app/src/main/java/ceui/pixiv/ui/bulk/NovelBulkSelectV3Fragment.kt:364-390 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 27 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 22+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 22+ corresponding lines) app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:116 — app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:116-137 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:166-187 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:195-216 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 19+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 19+ corresponding lines) app/src/main/java/ceui/pixiv/api/Client.kt:242 — app/src/main/java/ceui/pixiv/api/Client.kt:242-265 | app/src/main/java/ceui/pixiv/api/Client.kt:361-382 | app/src/main/java/ceui/pixiv/api/Client.kt:388-406 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:233 — app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:233-245 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:252-263 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:304-318 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymOperate.kt:567-579 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 10+ corresponding lines) app/src/main/java/ceui/lisa/utils/Emoji.java:243 — app/src/main/java/ceui/lisa/utils/Emoji.java:243-252 | app/src/main/java/ceui/lisa/utils/Emoji.java:347-356 | app/src/main/java/ceui/lisa/utils/Emoji.java:358-367 | app/src/main/java/ceui/lisa/utils/Emoji.java:369-378 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 20+ corresponding lines) app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:440 — app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:440-460 | app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:489-508 | app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:530-549 | app/src/main/java/ceui/pixiv/ui/search/v3/OtherFilterSheet.kt:597-616 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 9+ corresponding lines) app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotBehaviorStore.kt:93 — app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotBehaviorStore.kt:93-101 | app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotBehaviorStore.kt:115-124 | app/src/main/java/ceui/pixiv/snapshot/AutoSnapshotBehaviorStore.kt:133-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 10+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 10+ corresponding lines) app/src/main/java/ceui/lisa/fragments/StreetMainFragment.kt:342 — app/src/main/java/ceui/lisa/fragments/StreetMainFragment.kt:342-356 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:470-479 | app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineFragment.kt:311-320 | app/src/main/java/ceui/pixiv/ui/comments/CommentsFragment.kt:337-348 | app/src/main/java/ceui/pixiv/ui/synonym/SynonymDictFragment.kt:201-212 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryViewModel.kt:227 — app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryViewModel.kt:227-243 | app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryViewModel.kt:251-264 | app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryViewModel.kt:266-280 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 14 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 8+ corresponding lines) app/src/main/java/ceui/pixiv/ui/download/DoneListV3Fragment.kt:306 — app/src/main/java/ceui/pixiv/ui/download/DoneListV3Fragment.kt:306-316 | app/src/main/java/ceui/pixiv/ui/download/QueueListV3Fragment.kt:275-282 | app/src/main/java/ceui/pixiv/ui/trending/HotTagsFeedFragment.kt:132-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 15+ corresponding lines) app/src/main/java/ceui/pixiv/widget/DailyRankStripWidgetProvider.kt:50 — app/src/main/java/ceui/pixiv/widget/DailyRankStripWidgetProvider.kt:50-65 | app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetProvider.kt:66-80 | app/src/main/java/ceui/pixiv/widget/RecommendStripWidgetProvider.kt:57-71 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetProvider.kt:62-76 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 7+ corresponding lines) app/src/main/java/ceui/pixiv/ui/prime/PrimeTagsFragment.kt:93 — app/src/main/java/ceui/pixiv/ui/prime/PrimeTagsFragment.kt:93-101 | app/src/main/java/ceui/pixiv/ui/upscale/FragmentAiUpscale.kt:321-327 | app/src/main/java/ceui/pixiv/ui/user/RequestPlanFeedFragment.kt:159-165 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (8 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (8 members, 4+ corresponding lines) app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:118 — app/src/main/java/ceui/pixiv/ui/collection/LikeIllustFeedFragment.kt:118-121 | app/src/main/java/ceui/pixiv/ui/collection/LikeNovelFeedFragment.kt:101-104 | app/src/main/java/ceui/pixiv/ui/dynamic/FollowingNovelFeedFragment.kt:90-95 | app/src/main/java/ceui/pixiv/ui/user/FollowUserFeedFragment.kt:89-92 | app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:187-191 | app/src/main/java/ceui/pixiv/ui/user/UserMangaSeriesFeedFragment.kt:100-103 | app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt:81-84 | app/src/main/java/ceui/pixiv/ui/user/UserNovelSeriesFeedFragment.kt:109-112 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (1 corresponding lines) · ×1
  • Edited copy of a member (1 corresponding lines) app/src/main/java/ceui/pixiv/actions/PixivActionHandlers.kt:163 — app/src/main/java/ceui/pixiv/actions/PixivActionHandlers.kt:163-163 | app/src/main/java/ceui/pixiv/db/mirror/BookmarkMirrorService.kt:1118-1118 — These two members are one piece of code written twice and then edited apart: 1 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) app/src/main/java/ceui/pixiv/ui/discovery/DiscoveryFeedFragment.kt:92 — app/src/main/java/ceui/pixiv/ui/discovery/DiscoveryFeedFragment.kt:92-98 | app/src/main/java/ceui/pixiv/ui/home/NiceFriendIllustFeedFragment.kt:33-37 | app/src/main/java/ceui/pixiv/ui/home/WalkthroughFeedFragment.kt:32-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (24–29 lines × 2) · ×1
  • Duplicated block (24–29 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:197 — app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:197-225 | app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt:130-153 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (23–26 lines × 2) · ×1
  • Duplicated block (23–26 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:277 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:277-302 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:721-743 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.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.
D4 · Code Duplication · Duplicated block (21–26 lines × 2) · ×1
  • Duplicated block (21–26 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:134 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:134-154 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:116-141 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1382 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1382-1402 | feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt:685-707 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1382` it does not close everything it opens, so those 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–22 lines × 2) · ×1
  • Duplicated block (16–22 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt:188 — app/src/main/java/ceui/lisa/activities/UActivity.kt:188-203 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:328-349 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/UActivity.kt:188` it begins part-way through the construct above it, so those 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–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:255 — app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt:255-276 | app/src/main/java/ceui/pixiv/ui/novel/reader/export/PdfExporter.kt:48-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (20–22 lines × 2) · ×1
  • Duplicated block (20–22 lines × 2) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:117 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:117-138 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:145-164 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:117` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) app/src/main/java/ceui/lisa/activities/UActivity.kt:254 — app/src/main/java/ceui/lisa/activities/UActivity.kt:254-274 | app/src/main/java/ceui/lisa/activities/UserActivityV3.kt:785-805 — before extracting anything, compare `app/src/main/java/ceui/lisa/activities/UActivity.kt` and `app/src/main/java/ceui/lisa/activities/UserActivityV3.kt` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 104 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/UActivity.kt:254` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–19 lines × 2) · ×1
  • Duplicated block (15–19 lines × 2) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:257 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:257-275 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:703-717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:943 — app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:943-957 | app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1440-1457 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt:943` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:450 — app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:450-466 | app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt:332-347 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 69 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:450` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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, `app/src/main/java/ceui/pixiv/ui/settings/AiTagRulesSheet.kt:331` calls `roundToInt` and `app/src/main/java/ceui/pixiv/ui/settings/AiBlockExemptAuthorsSheet.kt:449` 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 (14–16 lines × 2) · ×1
  • Duplicated block (14–16 lines × 2) app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:369 — app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:369-384 | app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt:381-394 — before extracting anything, compare `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt` and `app/src/main/java/ceui/lisa/repo/SearchNovelRepo.kt` as WHOLE FILES: this scan already matched 13 separate duplicated blocks between them, totalling at least 176 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/repo/SearchIllustRepo.kt:369` it begins part-way through the construct above it, so those 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 (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:208 — app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:208-233 | app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.kt:338-364 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/download/backend/MediaStoreBackend.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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code 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–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:244 — app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt:244-264 | app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.kt:392-413 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderSettingsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderSettingsPanel.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. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, 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 (12–14 lines × 2) · ×1
  • Duplicated block (12–14 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:321 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:321-334 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:499-510 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.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. Note first that the copies are not typed on the same thing: the declarations holding them bind `b` to `CellNovelSeriesHeroBinding` in one and `CellNovelHeaderBinding` 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 (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:119 — app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:119-130 | app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:114-125 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:123-134 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:119` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:85 — app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt:85-96 | app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.kt:87-97 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.kt` and `app/src/main/java/ceui/pixiv/ui/novel/SeriesDownloadOptionsSheet.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 `app/src/main/java/ceui/pixiv/ui/novel/CrossSeriesDownloadOptionsSheet.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 (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:112 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:112-122 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:62-70 — before extracting anything, compare `app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:110 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:110-120 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:165-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. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:110` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:175` calls `onTabSelected` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.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 (3–11 lines × 3) · ×1
  • Duplicated block (3–11 lines × 3) app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:1014 — app/src/main/java/ceui/pixiv/ui/detail/ArtworkSectionRenderers.kt:1014-1024 | app/src/main/java/ceui/pixiv/ui/user/RequestPlanDetailFragment.kt:146-155 | witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Views.kt:104-106 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code 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–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:133 — app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:133-143 | app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt:92-99 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt` and `app/src/main/java/ceui/pixiv/ui/settings/RenameDownloadedFilesFlow.kt` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/download/ImportLocalDownloadsFlow.kt:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×1
  • Duplicated block (8–10 lines × 3) app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1257 — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1257-1266 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1303-1310 | app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1340-1347 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1257` it does not close everything it opens, so those 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 (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:335 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:335-343 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:573-581 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:180-188 — 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 `app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:335` it does not close everything it opens, so those 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 × 3) · ×1
  • Duplicated block (8–9 lines × 3) app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:140 — app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt:140-148 | app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetWorker.kt:140-147 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt:164-171 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.kt` and `app/src/main/java/ceui/pixiv/widget/SpotlightWidgetWorker.kt` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 48 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/widget/BaseStripWidgetWorker.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.
D4 · Code Duplication · Duplicated block (7–8 lines × 5) · ×1
  • Duplicated block (7–8 lines × 5) app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:288 — app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:288-294 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:338-344 | app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:576-583 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:146-153 | app/src/main/java/ceui/pixiv/ui/settings/NovelHeaderSettingsFragment.kt:183-189 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/settings/DownloadPathSettingsFragment.kt:576` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code 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 × 4) · ×1
  • Duplicated block (8 lines × 4) app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:96 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryTabs.kt:96-103 | app/src/main/java/ceui/pixiv/snapshot/SnapshotManagerFragment.kt:113-120 | app/src/main/java/ceui/pixiv/ui/fanbox/FanboxHomeFeed.kt:66-73 | app/src/main/java/ceui/pixiv/ui/notification/NotificationPagerFragment.kt:36-43 — 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.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:181 — app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:181-188 | app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.kt:213-218 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/feature/FeatureFeedFragment.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.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:166 — app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:166-172 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:185-191 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:278-284 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:438-444 | app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:457-463 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:165` calls `ensureOverlay` and `app/src/main/java/ceui/pixiv/ui/upscale/IllustAiHelper.kt:184` 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 × 4) · ×1
  • Duplicated block (7 lines × 4) app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:185 — app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:185-191 | app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt:296-302 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:206-212 | app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt:422-428 — before extracting anything, compare `app/src/main/java/ceui/pixiv/ui/search/SearchIllustFeedFragment.kt` and `app/src/main/java/ceui/pixiv/ui/search/SearchNovelFeedFragment.kt` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 110 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the 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 (3–7 lines × 3) · ×1
  • Duplicated block (3–7 lines × 3) app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:396 — app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:396-402 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:583-589 | app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:835-837 — 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 `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:396` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/novel/NovelTextFeed.kt:833` calls `isNullOrBlank` and `app/src/main/java/ceui/pixiv/ui/novel/NovelSeriesFeed.kt:396` 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 (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:226 — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:226-230 | app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt:94-98 | app/src/main/java/ceui/pixiv/ui/muted/MutedObjectsFeedFragment.kt:248-251 — before extracting anything, compare `app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt` and `app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 32 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitRoundButton.kt:71 — witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitRoundButton.kt:71-108 | witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitRoundLinearLayout.kt:27-40 | witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitRoundRelativeLayout.kt:24-37 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×1
  • Duplicated block (10 lines × 5) app/src/main/java/ceui/pixiv/ui/bookmark/SelectTagBottomSheet.kt:132 — app/src/main/java/ceui/pixiv/ui/bookmark/SelectTagBottomSheet.kt:132-144 | app/src/main/java/ceui/pixiv/ui/detail/TagEditSheet.kt:305-316 | app/src/main/java/ceui/pixiv/ui/library/BookmarkFilterSheet.kt:177-186 | app/src/main/java/ceui/pixiv/ui/muted/MuteTagSheet.kt:411-422 | app/src/main/java/ceui/pixiv/ui/recommend/RankPickerSheet.kt:82-91 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `app/src/main/java/ceui/pixiv/ui/muted/MuteTagSheet.kt:407` calls `showToast`, `getString`, `dismissAllowingStateLoss` and `app/src/main/java/ceui/pixiv/ui/library/BookmarkFilterSheet.kt:174` 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 × 3) · ×1
  • Duplicated block (7 lines × 3) app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryFragment.kt:126 — app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryFragment.kt:126-132 | app/src/main/java/ceui/pixiv/ui/library/FollowingLibraryFragment.kt:88-94 | app/src/main/java/ceui/pixiv/ui/library/NovelBookmarkLibraryFragment.kt:90-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryFragment.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.
D4 · Code Duplication · Duplicated block (14 lines × 4) · ×1
  • Duplicated block (14 lines × 4) app/src/main/java/ceui/pixiv/widget/DailyRankStripWidgetProvider.kt:35 — app/src/main/java/ceui/pixiv/widget/DailyRankStripWidgetProvider.kt:35-48 | app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetProvider.kt:45-58 | app/src/main/java/ceui/pixiv/widget/RecommendStripWidgetProvider.kt:36-49 | app/src/main/java/ceui/pixiv/widget/SpotlightWidgetProvider.kt:41-54 — before extracting anything, compare `app/src/main/java/ceui/pixiv/widget/RecommendCardWidgetProvider.kt` and `app/src/main/java/ceui/pixiv/widget/RecommendStripWidgetProvider.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. If that is what happened, the fix is to keep one copy and have the 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 × 8) · ×1
  • Duplicated block (10 lines × 8) app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:62 — app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:62-71 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:104-113 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:128-137 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:153-162 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:178-187 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:207-216 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:251-260 | app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:276-285 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/pixiv/download/config/ConfigPresets.kt:62` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (4–25 lines × 3) · ×1
  • Duplicated block (4–25 lines × 3) app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:900 — app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:900-903 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1022-1046 | app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:1081-1103 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/adapters/IllustAdapter.java:900` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) app/src/main/java/ceui/lisa/activities/SearchActivity.java:212 — app/src/main/java/ceui/lisa/activities/SearchActivity.java:212-228 | app/src/main/java/ceui/lisa/fragments/FragmentViewPager.java:109-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/SearchActivity.java:212` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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–12 lines × 2) · ×1
  • Duplicated block (9–12 lines × 2) app/src/main/java/ceui/lisa/core/Mapper.java:123 — app/src/main/java/ceui/lisa/core/Mapper.java:123-134 | app/src/main/java/ceui/lisa/core/Mapper.java:147-155 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/core/Mapper.java:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) app/src/main/java/ceui/lisa/activities/BaseActivity.java:146 — app/src/main/java/ceui/lisa/activities/BaseActivity.java:146-153 | app/src/main/java/ceui/lisa/fragments/BaseFragment.java:132-141 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/activities/BaseActivity.java: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 (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:460 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:460-469 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:371-377 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:89 — app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:89-97 | app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:182-191 | app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java:199-208 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `app/src/main/java/ceui/lisa/fragments/FragmentEditAccount.java: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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) models/src/main/java/ceui/lisa/models/AddressesBean.java:1 — models/src/main/java/ceui/lisa/models/AddressesBean.java:1-39 | models/src/main/java/ceui/lisa/models/JobsBean.java:1-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `models/src/main/java/ceui/lisa/models/AddressesBean.java:1` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 25) · ×1
  • Duplicated block (5 lines × 25) app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:86 — app/src/main/java/ceui/lisa/fragments/FragmentFileName.java:86-90 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:370-374 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:383-387 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:396-400 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:54-58 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:106-110 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:117-121 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:129-133 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:141-145 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:153-157 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:55-59 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:67-71 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:302-306 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:321-325 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsDownload.java:334-338 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsExperimental.java:110-114 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsNetwork.java:131-135 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsNetwork.java:144-148 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:75-79 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:87-91 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:167-171 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:180-184 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:288-292 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:301-305 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsViewing.java:314-318 — there are 25 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 25 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 12) · ×1
  • Duplicated block (5 lines × 12) app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:581 — app/src/main/java/ceui/lisa/fragments/FragmentSettingsAppearance.java:581-585 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:32-36 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:43-47 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:65-69 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBookmarks.java:76-80 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:79-83 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:120-124 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:145-149 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:157-161 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:293-297 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:306-310 | app/src/main/java/ceui/lisa/fragments/FragmentSettingsBrowsing.java:319-323 — there are 12 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 12 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) scripts/find_missing_used_strings.py:100 — scripts/find_missing_used_strings.py:100-122 | scripts/sort_locale_strings.py:78-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/find_missing_used_strings.py:100` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: NovelScrollReaderView (LCOM4 7) app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt:53 — NovelScrollReaderView's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
DM4 · Rich vs anemic model · Anemic entity · ×1
  • Anemic entity: RemoteKey app/src/main/java/ceui/pixiv/db/RemoteKey.kt:7 — `RemoteKey` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service.
P2 · Observability · No structured logging · ×1
  • No structured logging — No logging or diagnostics emission found. This repository ships a binary its users launch rather than a service you operate, so there is no operator to page — but when a run fails on a user's machine, neither they nor you have anything to read.
Minor — 117 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate app/src/main/java/ceui/lisa/core/FilterMapper.java:22 — `filterStarSize && (starSizeLimit > 0 || starSizeMaxLimit > 0)` appears character-identically in 2 files — app/src/main/java/ceui/lisa/core/FilterMapper.java, app/src/main/java/ceui/lisa/core/NovelFilterMapper.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/activities/BaseActivity.java:145 — `toolbar == null || !toolbar.getFitsSystemWindows()` appears character-identically in 2 files — app/src/main/java/ceui/lisa/activities/BaseActivity.java, app/src/main/java/ceui/lisa/fragments/BaseFragment.java. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt:202 — `!firstPageDelivered && state.items.isNotEmpty()` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/user/UserIllustFeedFragment.kt, app/src/main/java/ceui/pixiv/ui/user/UserNovelFeedFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/detail/PixivTagEditOperate.kt:67 — `!retried && (ex.code() == 403 || ex.code() == 400)` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/detail/PixivTagEditOperate.kt, app/src/main/java/ceui/pixiv/ui/user/PixivBlockOperate.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/detail/TagEditSheet.kt:290 — `!translated.isNullOrEmpty() && translated != name` appears character-identically in 3 files — app/src/main/java/ceui/pixiv/ui/detail/TagEditSheet.kt, app/src/main/java/ceui/pixiv/ui/library/LibraryFilterViews.kt, app/src/main/java/ceui/pixiv/ui/muted/MuteTagSheet.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt:637 — `!zipFile.isFile || zipFile.length() == 0L` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt, app/src/main/java/ceui/pixiv/ui/bulk/UgoiraTask.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/referral/ReferralUi.kt:153 — `Build.VERSION.SDK_INT < 26 || ValueAnimator.areAnimatorsEnabled()` appears character-identically in 3 files — app/src/main/java/ceui/pixiv/ui/referral/ReferralUi.kt, witstudio/src/main/java/ceui/pixiv/witstudio/theme/V3Views.kt, witstudio/src/main/java/ceui/pixiv/witstudio/widget/WitTagFlowView.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt:116 — `SessionManager.loggedInUid > 0L && Shaft.sSettings.isCloudHistorySync && Shaft.sSettings.isCloudHistoryConsentShown` appears character-identically in 2 files — app/src/main/java/ceui/lisa/fragments/HistoryFeed.kt, app/src/main/java/ceui/lisa/fragments/HistoryUserFeed.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:908 — `Shaft.sSettings.isAutoPostLikeWhenDownload && !illust.isBookmarked` appears character-identically in 5 files — app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt, app/src/main/java/ceui/lisa/fragments/FragmentIllust.kt, app/src/main/java/ceui/pixiv/download/ImagePageSaver.kt, app/src/main/java/ceui/pixiv/ui/comic/reader/ComicReaderV3Fragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/view/DragDismissLayout.kt:204 — `abs(dy) > touchSlop && abs(dy) > abs(dx)` appears character-identically in 2 files — app/src/main/java/ceui/lisa/view/DragDismissLayout.kt, app/src/main/java/ceui/lisa/view/PanoramaPan.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt:96 — `act == null || act.isFinishing || act.isDestroyed || !com.blankj.utilcode.util.AppUtils.isAppForeground()` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/novel/reader/export/EpubExporter.kt, app/src/main/java/ceui/pixiv/ui/novel/reader/export/MergedNovelWriter.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/db/DbTiming.kt:196 — `activity == null || activity.isFinishing || activity.isDestroyed` appears character-identically in 3 files — app/src/main/java/ceui/pixiv/db/DbTiming.kt, app/src/main/java/ceui/pixiv/ui/recommend/SensitiveContentGate.kt, app/src/main/java/ceui/pixiv/ui/translate/TranslateProxyHint.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/http/CfBlockGuide.kt:95 — `activity.isFinishing || activity.isDestroyed` appears character-identically in 9 files — app/src/main/java/ceui/lisa/http/CfBlockGuide.kt, app/src/main/java/ceui/lisa/update/UpgradeRequiredPrompt.kt, app/src/main/java/ceui/pixiv/push/InAppPushCenter.kt, app/src/main/java/ceui/pixiv/ui/bulk/QueueColdStartPrompt.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt:198 — `cfg.screenWidthDp >= 600 && cfg.screenWidthDp > cfg.screenHeightDp` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt, app/src/main/java/ceui/pixiv/ui/filter/ImageFilterFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:294 — `e is retrofit2.HttpException && e.code() == 404 && account == currentUid() && requestRevision == PlazaRepository.revision.value` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt, app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/view/DragDismissLayout.kt:115 — `ev.actionMasked == MotionEvent.ACTION_UP || ev.actionMasked == MotionEvent.ACTION_CANCEL` appears character-identically in 2 files — app/src/main/java/ceui/lisa/view/DragDismissLayout.kt, app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelScrollReaderView.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/common/ZoomSync.kt:94 — `event.actionMasked == MotionEvent.ACTION_UP || event.actionMasked == MotionEvent.ACTION_CANCEL` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/common/ZoomSync.kt, app/src/main/java/ceui/pixiv/ui/novel/reader/render/NovelReaderView.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt:60 — `expected <= 0 || expected != currentUid()` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFeedSource.kt, app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineViewModel.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/common/IllustCardMenu.kt:52 — `fakeInvalidWorksEnabled && DebugInvalidWorks.shouldFakeAsInvalid(bean.id)` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/common/IllustCardMenu.kt, app/src/main/java/ceui/pixiv/ui/common/IllustStaggerRenderer.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt:1389 — `firstStart != null && firstStart < listView.paddingTop` appears character-identically in 3 files — app/src/main/java/ceui/pixiv/ui/detail/ArtworkV3Fragment.kt, app/src/main/java/ceui/pixiv/ui/library/BookmarkLibraryUi.kt, feeds/src/main/java/ceui/pixiv/feeds/FeedFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/account/AccountActionsSheet.kt:135 — `fm.isStateSaved || fm.findFragmentByTag(TAG) != null` appears character-identically in 6 files — app/src/main/java/ceui/pixiv/ui/account/AccountActionsSheet.kt, app/src/main/java/ceui/pixiv/ui/bookmark/SelectTagBottomSheet.kt, app/src/main/java/ceui/pixiv/ui/detail/TagEditSheet.kt, app/src/main/java/ceui/pixiv/ui/muted/MuteTagSheet.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt:121 — `hadWebCookieOnPause == false && SessionManager.hasWebCookie` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/user/UserIllustByTagFeedFragment.kt, app/src/main/java/ceui/pixiv/ui/user/UserNovelByTagFeedFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt:279 — `ids.isNotEmpty() && selectionVm.selectedIds.value.orEmpty().containsAll(ids)` appears character-identically in 2 files — app/src/main/java/ceui/lisa/fragments/FragmentHistoryList.kt, app/src/main/java/ceui/lisa/fragments/FragmentHistoryUserList.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt:482 — `imageViewerOpen || index !in post.images.indices` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/plaza/ui/PlazaFragment.kt, app/src/main/java/ceui/pixiv/plaza/ui/PlazaTimelineFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate app/src/main/java/ceui/pixiv/ui/comments/CommentsComposerViewModel.kt:230 — `it is CommentFeedItem && it.comment.id == ownerId` appears character-identically in 2 files — app/src/main/java/ceui/pixiv/ui/comments/CommentsComposerViewModel.kt, app/src/main/java/ceui/pixiv/ui/comments/CommentsFragment.kt. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
D34 · Knowledge Freshness · Orphaned file · ×35
  • Orphaned file app/src/main/java/ceui/lisa/utils/Emoji.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/Preset.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scripts/find_missing_used_strings.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file scripts/sort_locale_strings.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/ProfileBean.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/lisa/adapters/BaseAdapter.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/NovelDetail.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/lisa/ui/behavior/FragmentRightContentBehavior.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/ui/novel/reader/settings/ReaderTheme.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/ui/novel/reader/render/flip/SimulationFlipAnimator.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/lisa/helper/DeduplicateArrayList.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/widgets/SlidingCursorView.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/lisa/model/ListTrendingtag.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/GifResponse.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/ui/common/FragmentViewBindingDelegate.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/UgoiraMetadataBean.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/ErrorResponse.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/ui/novel/reader/ui/ReaderChrome.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file models/src/main/java/ceui/lisa/models/NovelSeriesItem.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/lisa/adapters/SearchHintAdapter.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/lisa/helper/NavigationLocationHelper.java:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/ui/common/ValueViewModel.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/utils/DateParse.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file app/src/main/java/ceui/pixiv/ui/common/KeyedViewModel.kt:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 10 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default in catch · ×13
  • Silent fallback default in catch app/src/main/java/ceui/lisa/download/MediaStoreUtil.kt:52 — `length` swallows every exception into `-1` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/lisa/update/GitHubFeedParser.kt:55 — `parse` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/pixiv/download/importer/DownloadImporter.kt:322 — `peek` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/pixiv/session/SessionManager.kt:525 — `getBearerTokenOrEmpty` 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 app/src/main/java/ceui/pixiv/shaftapi/ShaftHmac.kt:36 — `signHex` 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 app/src/main/java/ceui/pixiv/snapshot/SnapshotQuotaBanner.kt:92 — `refresh` swallows every exception into `0L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/pixiv/ui/common/ModelDownloadManager.kt:177 — `querySize` swallows every exception into `-1L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/pixiv/ui/discovery/DiscoverViewModel.kt:161 — `loadTags` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/pixiv/ui/novel/local/LocalLibraryViewModel.kt:75 — `openRoot` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/pixiv/ui/novel/local/LocalLibraryViewModel.kt:125 — `loadInto` swallows every exception into `emptyList()` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the KDoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/lisa/activities/Shaft.java:887 — `memorySnapshot` swallows every exception into `return "mem[unavailable]"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/lisa/database/DownloadIdExtractor.java:42 — `extractIllustId` swallows every exception into `return -1L` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
  • Silent fallback default in catch app/src/main/java/ceui/lisa/fragments/FragmentSettingsData.java:328 — `backupTemplateFolder` swallows every exception into `return "ShaftBackups"` — a data error becomes a silent behavior change with no trail. Log the failure or let it propagate. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment in the catch or in the Javadoc, and the row stops firing.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×6
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/ceui/pixiv/ui/download/DoneListV3Fragment.kt:469 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/ceui/pixiv/api/CsrfTokenProvider.kt:98 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/ceui/lisa/update/GitHubFeedParser.kt:20 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/ceui/lisa/update/GitHubFeedParser.kt:26 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/ceui/lisa/update/GitHubFeedParser.kt:28 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex app/src/main/java/ceui/lisa/update/GitHubFeedParser.kt:32 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JVM code already uses a real parser in the same package; use it here too.
P10 · Library API & versioning · Implementation type on the public API · ×4
  • Implementation type on the public API actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:8 — 3 public types in `ceui.pixiv.actionqueue.internal.db.ActionStatus` are marked as implementation by their own namespace, folder or name: `PENDING` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:8, `internal`), `RUNNING` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:9, `internal`), `FAILED` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionEntity.kt:10, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionQueueDatabase.kt:30 — 1 public type in `ceui.pixiv.actionqueue.internal.db.ActionQueueDatabase` is marked as implementation by its own namespace, folder or name: `Companion` (actionqueue/src/main/java/ceui/pixiv/actionqueue/internal/db/ActionQueueDatabase.kt:30, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
  • Implementation type on the public API witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36 — 3 public types in `ceui.pixiv.witstudio.dialog.internal.WitMenuItemView.Style` are marked as implementation by their own namespace, folder or name: `TEXT` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36, `internal`), `MARK` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36, `internal`), `CHECK` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:36, `internal`). While they are public, every consumer of the library can bind to them, so changing them is a breaking change for those consumers.
  • Implementation type on the public API witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:1 — 1 public type in `ceui.pixiv.witstudio.dialog.internal` is marked as implementation by its own namespace, folder or name: `WitMenuItemViewKt` (witstudio/src/main/java/ceui/pixiv/witstudio/dialog/internal/WitMenuItemView.kt:1, `internal`). While it is public, every consumer of the library can bind to it, so changing it is a breaking change for those consumers.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 366 significant file(s) lose their only recent owner: app/src/main/java/ceui/lisa/model/ListNovel.java, app/src/main/java/ceui/pixiv/ui/novel/reader/NovelReaderV3Fragment.kt, app/src/main/java/ceui/pixiv/ui/bulk/UgoiraEngine.kt, app/src/main/java/ceui/pixiv/shaftapi/PixshaftApi.kt, app/src/main/java/ceui/pixiv/ui/usage/Nana7miUsageFragment.kt, app/src/main/java/ceui/pixiv/ui/detail/frames/UgoiraFramesFragment.kt, app/src/main/java/ceui/lisa/activities/UserActivityV3.kt, app/src/main/java/ceui/pixiv/plaza/ui/PlazaViews.kt (+358 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 7 significant file(s) lose their only recent owner: app/src/main/java/ceui/lisa/update/GitHubFeedParser.kt, app/src/main/java/ceui/pixiv/imageloader/PageImageSourceResolver.kt, app/src/main/java/ceui/lisa/http/GithubProxy.kt, app/src/main/java/ceui/pixiv/download/toast/DownloadToastKind.kt, app/src/main/java/ceui/pixiv/ui/interpolate/RifePrefs.kt, app/src/main/java/ceui/pixiv/utils/FrameQueue.kt, app/src/main/java/ceui/pixiv/utils/KUtils.kt. Pair on, review, or document these before any departure.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (376 single-owned of 914 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 914 of the 1402 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: app/src/main/java/ceui/pixiv/utils/GlideRecycle.kt, app/src/main/java/ceui/pixiv/download/sanitize/FsSanitizer.kt, app/src/main/java/ceui/pixiv/ui/novel/reader/feature/SearchEngine.kt.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found app/build.gradle:3 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `app/build.gradle` makes this repository a deployable product (line 3).
D21 · Naming Consistency · `serialVersionUID` spells `UID` where 93 names in the project spell it `Uid` · ×1
  • `serialVersionUID` spells `UID` where 93 names in the project spell it `Uid` app/src/main/java/ceui/pixiv/api/model/Models.kt:34 — 93 of 94 names in project app spell the token `Uid` (93 of 94; unit: names in project app containing `Uid`). Peers: Nana7miAccountSession.logFetchResult(requesterUid) (app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt:439); Nana7miSearchCache.requesterUidOrNull (app/src/main/java/ceui/lisa/repo/Nana7miSearchCache.kt:292); Payload.requesterUid (app/src/main/java/ceui/pixiv/actions/Nana7miSearchTelemetry.kt:307); Payload.borrowedUid (app/src/main/java/ceui/pixiv/actions/Nana7miSearchTelemetry.kt:308); Nana7miSearchTelemetry.reportOwnRequest(requesterUid) (app/src/main/java/ceui/pixiv/actions/Nana7miSearchTelemetry.kt:335). Rename to `serialVersionUid`. [rule N6]
D21 · Naming Consistency · `isCreatedByAI` spells `AI` where 72 names in the project spell it `Ai` · ×1
  • `isCreatedByAI` spells `AI` where 72 names in the project spell it `Ai` app/src/main/java/ceui/pixiv/api/model/Models.kt:171 — 72 of 73 names in project app spell the token `Ai` (72 of 73; unit: names in project app containing `Ai`). Peers: ImageDetailActivity.observedAiTasks (app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:125); ImageDetailActivity.setupSnapshotAiMenu (app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:697); ImageDetailActivity.setupViewerTransition(btnAi) (app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:773); ImageDetailActivity.maybeConfirmAiExit (app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1039); ImageDetailActivity.performAiRembg (app/src/main/java/ceui/lisa/activities/ImageDetailActivity.kt:1202). Rename to `isCreatedByAi`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 13 project(s) overshoot their size bounds, lowering Project Cohesion to 8.5/10. The most over is `app` (208506 LoC, 3740 module-visible types across 145 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.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 35 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: app/src/main/java/ceui/lisa/utils/Emoji.java, models/src/main/java/ceui/lisa/models/Preset.java, scripts/find_missing_used_strings.py, app/src/main/java/ceui/pixiv/utils/LiveDataUtil.kt, scripts/sort_locale_strings.py, models/src/main/java/ceui/lisa/models/ProfileBean.java, models/src/main/java/ceui/lisa/models/NovelDetail.java, app/src/main/java/ceui/lisa/ui/behavior/FragmentRightContentBehavior.java (and 27 more) (36 orphaned of 921 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 921 of the 1402 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:10 — 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 1 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.)
X2 · Cancellation propagation · Not all suspend functions that make a request accept the coroutine's cancellation · ×1
  • Not all suspend functions that make a request accept the coroutine's cancellation — Only 1/5 suspend functions that make a cancellable request (Ktor, OkHttp newCall, URL streams) accept the coroutine's cancellation or pass one on, so a request keeps running after whatever wanted it has given up — a screen navigated away from, a disposed widget, a superseded search. In a suspend function, make the request with a call that suspends — Ktor, OkHttp's `executeAsync()`, or a `suspendCancellableCoroutine` that cancels the `Call` — not a blocking `execute()`: `withContext(Dispatchers.IO)` moves the call off the caller's thread but does not make it cancellable; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a9212c13d64c435b80e69c8f5338ffdf/history.json --exit-code 0 --source .36artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a9212c13d64c435b80e69c8f5338ffdf/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/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .22artifacts/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 49 file(s) — `actionqueue/src/main/java/ceui/pixiv/actionqueue/ActionHandler.kt`, `actionqueue/src/main/java/ceui/pixiv/actionqueue/Clock.kt`, `app/src/main/java/ceui/lisa/core/JavaAsync.kt`, `app/src/main/java/ceui/lisa/helper/UserIllustJumpHelper.kt`, `app/src/main/java/ceui/lisa/repo/Nana7miAccountSession.kt`, … (+44 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 01a1d657-3cff-71f4-ac76-72b9442f9506 · 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