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

Lakr233/vphone-cli

Measured 14 November 2026, 08:55 UTC, at code version 1316940

CAI score 41out of 100 Weak
CriticalWeakAdequateStrongExemplary
Down 12 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: 154,762 lines of product code in 21 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Security and Compliance, 22

Findings by how serious they are

58 critical 1407 serious 85 minor

22 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
14 November 2026, 08:55 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 ▸

46of 46 dimensions measured by tools.
1519of 1550 findings point to an exact file and line, so you can open each one in the code. The other 31 concern the repository as a whole, such as missing documentation.
46dimensions across 6 lenses, read from 154,762 lines of product code in 21 projects.
Chapters

Executive summary

Lakr233/vphone-cli falls short of our standard for production, in part because it has security weaknesses in the code. It scores 41 out of 100 and is rated Weak, and 55 of its 58 critical findings are security problems.

Security and Compliance, at 22, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing the four passwords or keys found in the code's history, worth about 3 points. Fixing the security flaws the scanner found would lift Security and Compliance itself, worth about 5 points. Raising Security and Compliance to 70 would lift the score to about 57.

Thirty-three weaknesses in the code could be used by an attacker. Thirteen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and six passwords or keys are open to anyone who can read the repository. Fixing the weaknesses the scanner points to, pinning each tool to an exact version and replacing each exposed password or key would close these risks. Updating the vulnerable packages would fix the three packages with a known security hole. The three sets of files in separate parts that keep changing together need that dependency made explicit.

The product code is 154,762 lines, about €180,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.
Security and Compliance 22 · counts for 46%Production Readiness 49 · counts for 25%Code Health 52 · counts for 14%Maturity 64 · counts for 8%Architecture 91 · counts for 4%Performance 100 · counts for 2%

If Security and Compliance rose from 22 to 70, the lowest score rated Strong, the score would rise from 41 to about 57.

Code composition: what the lines of code are
Product code 72%Tests 28%
New since the last survey: 532 findings

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

  • Cyclomatic Complexity · GuestAPI.executeCore (cyclomatic 104) VPhoneDaemon/Daemon/GuestAPI.swift
  • Cyclomatic Complexity · TXMDevPatcher.patchExecutableRemap (cyclomatic 93) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift
  • Cyclomatic Complexity · CustomFirmwareParavirtGPUCompilerCache.resolve (cyclomatic 85) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESDepthClipPatcher.findSite (cyclomatic 84) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields (cyclomatic 72) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.findSite (cyclomatic 60) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift
  • Cyclomatic Complexity · GuestAPI.setDevicePose (cyclomatic 52) VPhoneDaemon/Daemon/GuestAPI+Device.swift
  • Cyclomatic Complexity · DyldSharedCacheHomeViewEnvironmentPatcher.findSites (cyclomatic 48) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheTextRecognitionANEPatcher.findSite (cyclomatic 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift
  • Cyclomatic Complexity · TXMDevPatcher.remapLibraryCompatibility (cyclomatic 45) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift
  • Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness (cyclomatic 45) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift
  • Cyclomatic Complexity · TXMDevPatcher.remapMissingProfileCompatibility (cyclomatic 43) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift
  • Cyclomatic Complexity · CustomFirmwareVisionOSFramePacing.locate (cyclomatic 43) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.containsDraw (cyclomatic 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheIOS16SurfaceAdapter.prepare (cyclomatic 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOS16SurfaceAdapter.swift
  • Cyclomatic Complexity · CustomFirmwareRemotePairing.rejectsLocalConnection (cyclomatic 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.sites (cyclomatic 36) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.findForkEntryLink (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift
  • Cyclomatic Complexity · DyldSharedCacheMachPortsPatcher.prepare (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMachPortsPatcher.swift
  • Cyclomatic Complexity · CustomFirmwareRemotePairing.locate (cyclomatic 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift
  • Cyclomatic Complexity · DyldSharedCacheArm64eX1BootstrapPatcher.lower (cyclomatic 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift
  • Cyclomatic Complexity · MachOSymbolTargets.init (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOSymbolTargets.swift
  • Cyclomatic Complexity · SPTMSecondaryCPUPatcher.tunableBranches (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SPTM/SPTMSecondaryCPUPatcher.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.buildForkInheritCave (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift
  • Cyclomatic Complexity · CustomFirmwareArm64eX1Installation.update (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Installation.swift
  • Cyclomatic Complexity · CustomFirmwareVirtualAudio.gatedDeviceStateSite (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Cyclomatic Complexity · IBootPatcher.patchSizeVerifyByShape (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift
  • Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.applyGuestPatches::on (cyclomatic 27) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESDepthClipPatcher.patch (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.pipelineFields (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cyclomatic Complexity · CustomFirmwareArm64eX1.sameDecode (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift
  • Cyclomatic Complexity · GuestPointGeometry.geometry (cyclomatic 25) VPhoneDaemon/Daemon/GuestPointGeometry.swift
  • Cyclomatic Complexity · CustomFirmwareDaemons.visionOSEnvironmentFeatures (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.debugEntryBit (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift
  • Cyclomatic Complexity · CustomFirmwareWatchAudioBudget.discover (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareWatchAudioBudget.swift
  • Cyclomatic Complexity · GuestAPI.executeFileTool (cyclomatic 23) VPhoneDaemon/Daemon/GuestAPI+FileTool.swift
  • Cyclomatic Complexity · CustomFirmwareTextRecognitionModels.plan (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTextRecognitionModels.swift
  • Cyclomatic Complexity · TXMDevPatcher.patchDeveloperModeBypass (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.findProcPidinfoGuards (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchProcPidinfo.swift
  • Cyclomatic Complexity · TXMDevPatcher.remapCategory (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift
  • Cyclomatic Complexity · CustomFirmwareArm64eX1Audit.containsX1 (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift
  • Cyclomatic Complexity · CustomFirmwareWatchAudioBudget.flagStore (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareWatchAudioBudget.swift
  • Cyclomatic Complexity · GuestAPI.executeVisionOSImmersion (cyclomatic 21) VPhoneDaemon/Daemon/GuestAPI+VisionOSImmersion.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.paravirtGPUPersonality (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtGLES.swift
  • Cyclomatic Complexity · GuestAPI.executeInput (cyclomatic 20) VPhoneDaemon/Daemon/GuestAPI+Input.swift
  • Cyclomatic Complexity · TXMDevPatcher.debuggerGateFlagStore (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.patch (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.materializedAddress (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift
  • Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate (cyclomatic 19) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
  • Cyclomatic Complexity · VPhoneMachOFile.init (cyclomatic 18) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift
  • Cyclomatic Complexity · CustomFirmwareParavirtGPUCompilerCache.addressPair (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift
  • Cyclomatic Complexity · GuestHyperTextHandler.handle (cyclomatic 17) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift
  • Cyclomatic Complexity · CryptexFilesystemPatcher.mergeFilesystems (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift
  • Cyclomatic Complexity · CustomFirmwareDaemons.visionOSLegacyUXMFeatures (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.findCsAssociateCall (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift
  • Cyclomatic Complexity · KernelPatcher.patchPostValidationNOP (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift
  • Cyclomatic Complexity · FirmwareGuestPatchResolution.glesUpdatePolicy (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestPatchResolution.swift
  • Cyclomatic Complexity · VPhoneVirtualMachineCreateBulkCommand.run (cyclomatic 17) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateBulkCommand.swift
  • Cyclomatic Complexity · CustomFirmwareArm64eX1Audit.scan::inspect (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.patch (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift
  • Cyclomatic Complexity · CustomFirmwareParavirtGPUCompilerCache.loadPair (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift
  • Cyclomatic Complexity · CustomFirmwareParavirtGPUCompilerCache.selectorSlots (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift
  • Cyclomatic Complexity · CustomFirmwareDaemons.filesystemLayout (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift
  • Cyclomatic Complexity · IBootPatcher.verificationGates (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.findIOTaskHasEntitlement (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift
  • Cyclomatic Complexity · KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Keystore/KernelCustomFirmwarePatchAksUnlockBag.swift
  • Cyclomatic Complexity · VPhoneVirtualMachineCreateCommand.run (cyclomatic 16) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift
  • Cyclomatic Complexity · VPhoneCameraServer.setSource (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneCameraServer.swift
  • Cyclomatic Complexity · VPhoneExternalDisplayWindowController.connect (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneExternalDisplayWindowController.swift
  • Cyclomatic Complexity · DyldSharedCacheGLESPrimitiveRestartPatcher.findEntry (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.plan (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheMetalVertexFormatPatcher.findFormatSite (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift
  • Cyclomatic Complexity · DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift
  • Cyclomatic Complexity · CustomFirmwareVirtualAudio.patchDeviceStateNullGate (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Cyclomatic Complexity · VPhoneHomeViewDistanceModel.receive (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomeViewDistanceModel.swift
  • Cognitive Complexity · CustomFirmwareParavirtGPUCompilerCache.resolve (cognitive 124) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift
  • Cognitive Complexity · GuestAPI.executeCore (cognitive 113) VPhoneDaemon/Daemon/GuestAPI.swift
  • Cognitive Complexity · TXMDevPatcher.patchExecutableRemap (cognitive 97) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift
  • Cognitive Complexity · DyldSharedCacheGLESDepthClipPatcher.findSite (cognitive 87) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift
  • Cognitive Complexity · GuestAPI.setDevicePose (cognitive 86) VPhoneDaemon/Daemon/GuestAPI+Device.swift
  • Cognitive Complexity · DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields (cognitive 71) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift
  • Cognitive Complexity · DyldSharedCacheArm64eX1BootstrapPatcher.lower (cognitive 66) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift
  • Cognitive Complexity · DyldSharedCacheMetalCacheReusePatcher.findSite (cognitive 63) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift
  • Cognitive Complexity · DyldSharedCacheHomeViewEnvironmentPatcher.findSites (cognitive 59) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift
  • Cognitive Complexity · DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness (cognitive 57) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift
  • Cognitive Complexity · DyldSharedCacheTextRecognitionANEPatcher.findSite (cognitive 56) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift
  • Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.containsDraw (cognitive 50) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cognitive Complexity · MachOSymbolTargets.init (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOSymbolTargets.swift
  • Cognitive Complexity · TXMDevPatcher.remapLibraryCompatibility (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift
  • Cognitive Complexity · TXMDevPatcher.remapMissingProfileCompatibility (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift
  • Cognitive Complexity · CustomFirmwareArm64eX1Installation.update (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Installation.swift
  • Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.sites (cognitive 46) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift
  • Cognitive Complexity · CustomFirmwareVisionOSFramePacing.locate (cognitive 44) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift
  • Cognitive Complexity · CustomFirmwareRemotePairing.locate (cognitive 44) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift
  • Cognitive Complexity · DyldSharedCacheIOS16SurfaceAdapter.prepare (cognitive 42) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOS16SurfaceAdapter.swift
  • Cognitive Complexity · CustomFirmwareTextRecognitionModels.plan (cognitive 41) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTextRecognitionModels.swift

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: 78 findings

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

  • Cyclomatic Complexity · GuestAPI.execute (cyclomatic 103) VPhoneDaemon/Daemon/GuestAPI.swift
  • Cyclomatic Complexity · DyldSharedCacheArm64eX1BootstrapPatcher.patch (cyclomatic 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift
  • Cyclomatic Complexity · VPhoneVirtualMachineView.sendTouchEvent (cyclomatic 21) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift
  • Cyclomatic Complexity · CustomFirmwareWatchDogSymbolTargets.init (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogSymbolTargets.swift
  • Cognitive Complexity · GuestAPI.execute (cognitive 122) VPhoneDaemon/Daemon/GuestAPI.swift
  • Cognitive Complexity · DyldSharedCacheArm64eX1BootstrapPatcher.patch (cognitive 53) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift
  • Cognitive Complexity · CustomFirmwareWatchDogSymbolTargets.init (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogSymbolTargets.swift
  • Cognitive Complexity · KernelCustomFirmwarePatcher.patchProcPidinfo (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchProcPidinfo.swift
  • Cognitive Complexity · DyldSharedCacheSymbolResolver.symbols (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheSymbolResolver.swift
  • Cognitive Complexity · GuestAPI.executeService (cognitive 16) VPhoneDaemon/Daemon/GuestAPI+Service.swift
  • God Classes · MethodTooLong: GuestAPI.execute VPhoneDaemon/Daemon/GuestAPI.swift
  • Code Duplication · Near-duplicate member pair (56 shared lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Near-duplicate member pair (53 shared lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Near-duplicate member pair (26 shared lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Near-duplicate member pair (22 shared lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift
  • Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift
  • Code Duplication · Duplicated block (17–21 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Duplicated block (16 lines × 2) VPhoneDaemon/Daemon/GuestPortForwardHandler.swift
  • Code Duplication · Duplicated block (16 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchNvram.swift
  • Code Duplication · Duplicated block (15 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/CrashLogs/VPhoneCrashLogsView.swift
  • Code Duplication · Duplicated block (11–12 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift
  • Code Duplication · Duplicated block (12 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegion.swift
  • Code Duplication · Duplicated block (11 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift
  • Code Duplication · Duplicated block (11 lines × 2) VPhoneDaemon/Daemon/GuestAPI+Attitude.swift
  • Code Duplication · Duplicated block (11 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift
  • Code Duplication · Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift
  • Code Duplication · Duplicated block (8–9 lines × 2) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift
  • Code Duplication · Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift
  • Code Duplication · Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
  • Code Duplication · Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift
  • Code Duplication · Duplicated block (6–8 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift
  • Code Duplication · Duplicated block (8 lines × 2) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift
  • Code Duplication · Duplicated block (7 lines × 2) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneDaemon/Daemon/GuestKeychain.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift
  • Code Duplication · Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift
  • Code Duplication · Duplicated block (3–6 lines × 5) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift
  • Code Duplication · Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideDaemons.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogSymbolTargets.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsButton.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift
  • Code Duplication · Duplicated block (4–5 lines × 3) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift
  • Code Duplication · Duplicated block (6 lines × 4) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardModel.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBoardDeviceTree.swift
  • Code Duplication · Duplicated block (10 lines × 2) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift
  • Code Duplication · Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift
  • Code Duplication · Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Services/VPhoneServiceAction.swift
  • Code Duplication · Duplicated block (15 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchContainerUpcall.swift
  • Cohesion (LCOM4) · Low cohesion: Data (LCOM4 15) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore/Support/VPhoneRestoreBackendError.swift VPhoneExecutable/VPhoneCommand/VPhoneRestore/VPhoneRestore/Support/VPhoneRestoreBackendError.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchContainerUpcall.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchContainerUpcall.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheError.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheError.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Startup/KernelPatchBsdInit.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Startup/KernelPatchBsdInit.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneDaemon/Daemon/GuestAPI+AppDetail.swift VPhoneDaemon/Daemon/GuestAPI+AppDetail.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPlan.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPlan.swift
  • Churn × Complexity Hotspots · Hotspot: VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneMachineTemplateTrimmer.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneMachineTemplateTrimmer.swift
  • Secrets (history) · High secret: REDACTED scripts/cfw_install_dev.sh
  • Secrets (history) · High secret: REDACTED scripts/cfw_install_jb_post.sh
  • Secrets (history) · High secret: REDACTED scripts/setup_machine.sh
  • Change Coupling · Boundary-crossing change coupling: GuestAPI+Environment.swift ↔ VPhoneCustomFirmwareInstaller.swift VPhoneDaemon/Daemon/GuestAPI+Environment.swift
  • Change Coupling · Change coupling: VPhoneCustomFirmwareInstaller.swift ↔ VPhoneCustomFirmwarePatchCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
  • Change Coupling · Change-coupling hub: FirmwareDeviceTreePatchSet.swift → CustomFirmwarePostRestoreDeviceTree.swift, VPhoneCustomFirmwareInstaller.swift, VPhoneCustomFirmwarePatchCommand.swift, VPhoneRestoreCommand.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift
  • Change Coupling · Change coupling: CryptexFilesystemPatcherGuestPayload.swift ↔ VPhoneCustomFirmwareInstaller.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift
  • Change Coupling · Change coupling: VPhoneFirmwareCommand.swift ↔ VPhoneVirtualMachineCreator.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift
Rebuild cost: about €180,000 · Estimate
Cost to rebuild€61,000 to €300,000, for 1,011 to 3,206 hours of work, about 1.3 person-years for 1 to 3 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 41. 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: 154,762 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
Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 3 points · Low effort · Secrets (history)
2
Resolve the 20 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (3), REDACTED (3).
Raises the score by about 5 points · Medium effort · Static Analysis (SAST)
3
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.
Raises the score by about 2 points · Low effort · ADR Quality

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €180,000 to build again, about 1.3 person-years of work. Its weakest lens is Security and Compliance, at 22 (checked 3 of 10). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 4 High secret finding(s) in Secrets (history). Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 4 Secrets (history) findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.2 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 16% on every change. The history of the code shows how much it changes: about 498,987 lines over the last 90 days, which is about 2,023,670 lines a year. At that pace, the extra work comes to an estimated 355 to 2130.1 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture — module dependency graph

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

arch FirmwarePatcher FirmwarePatcher VPhonePatchKit VPhonePatchKit FirmwarePatcher->VPhonePatchKit VPhoneSign VPhoneSign FirmwarePatcher->VPhoneSign MobileRecoveryCore MobileRecoveryCore MobileRestoreCore MobileRestoreCore MobileRestoreCore->MobileRecoveryCore VPhoneArchiveKit VPhoneArchiveKit VPhoneCoreKit VPhoneCoreKit VPhoneArchiveKit->VPhoneCoreKit VPhoneCommand VPhoneCommand VPhoneCommand->FirmwarePatcher VPhoneCommand->VPhonePatchKit VPhoneCommand->VPhoneSign VPhoneEscalator VPhoneEscalator VPhoneExternalAccessKit VPhoneExternalAccessKit VPhoneLaunchpad VPhoneLaunchpad VPhoneLaunchpadCLI VPhoneLaunchpadCLI VPhoneLaunchpadHelper VPhoneLaunchpadHelper VPhoneLaunchpadLauncher VPhoneLaunchpadLauncher VPhonePatchSetExample VPhonePatchSetExample VPhonePatchSetExample->VPhonePatchKit VPhoneRestore VPhoneRestore VPhoneRestore->MobileRecoveryCore VPhoneRestore->MobileRestoreCore VPhoneVirtualMachineKit VPhoneVirtualMachineKit VphonedNative VphonedNative vphone-vm vphone-vm vphone-vm->VPhoneVirtualMachineKit vphoned vphoned vphoned->VphonedNative __more__ +1 more projects

At a glance — Code Health · 52% · Adequate · gated by D1, D2, X5 ·

At a glance — Architecture · 91% · Adequate · gated by D26 ·

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

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

At a glance — Security · 22% · Checked 3 of 10 · gated by D29, D36 ·

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
A05:2025 — Injection47High / Critical
A07:2025 — Authentication Failures7High / Critical
A03:2025 — Software Supply Chain Failures7High / Critical

Roadmap

Top priorities: Resolve the 20 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (3), REDACTED (3); Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED; Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (9), REDACTED, REDACTED.

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

Do thisHelpsEffortDimension
Resolve the 4 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED.+3.2 ptsLowSecrets (history)
Resolve the 20 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (10), REDACTED (3), REDACTED (3).+5.4 ptsMediumStatic Analysis (SAST)
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj.+2.4 ptsLowADR Quality
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2).+1.9 ptsLowSecrets (history)
Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3).+1.9 ptsLowDependency Vulnerabilities
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.7 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.7 ptsLowSupply-chain Provenance & Signing
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing.+1.7 ptsLowSupply-chain Provenance & Signing

File quality

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

FileScoreBandWorst signal
REDACTED4.3MixedSecrets (history): REDACTED: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
VPhoneDaemon/Daemon/GuestAPI.swift5.0MixedChange Coupling: Boundary-crossing change coupling: GuestAPI.swift ↔ VPhoneGuestControlSystem.swift
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift5.5MixedCyclomatic Complexity: VPhoneCustomFirmwareInstaller.applyGuestPatches (cyclomatic 309)
VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift5.5MixedCyclomatic Complexity: VPhoneLaunchpadControlCommands.startCreation (cyclomatic 30)
VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift5.5MixedCyclomatic Complexity: VPhoneOTAArchive.validatePayloadPaths (cyclomatic 29)
VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift5.5MixedCyclomatic Complexity: VPhoneGuestControl.probe (cyclomatic 29)
VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift5.5MixedCyclomatic Complexity: KernelCustomFirmwarePatcherBase.findProcSecurityPolicy (cyclomatic 20)
VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift5.5MixedCognitive Complexity: CustomFirmwarePostRestoreDeviceTree.rewrite (cognitive 16)
VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift5.5MixedCode Duplication: Edited copies of one member (5 members, 16+ corresponding lines)
VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift5.5MixedCyclomatic Complexity: VPhoneVirtualMachineView.scrollNatively (cyclomatic 17)
VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift5.6MixedCognitive Complexity: VPhoneLaunchpadMachineLibrary.refresh (cognitive 18)
Research/VPhoneVirtualMachineRefactored.swift5.7MixedCode Duplication: Edited copy of a member (5 corresponding lines)
VPhoneDaemon/Daemon/GuestAPI+Environment.swift5.8MixedChange Coupling: Boundary-crossing change coupling: GuestAPI+Environment.swift ↔ VPhoneGuestEnvironment.swift
VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift5.8MixedChange Coupling: Boundary-crossing change coupling: FirmwareGuestSystemPatchSet.swift ↔ VPhoneGuestEnvironment.swift

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

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

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

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

Could not be resolved — 22

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 46 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 — 46 dimensions across the health lenses
D1D2D3D4D5D6D10D11D12D13D14D15D16D17D19D20D21D26D27D28D29D30D34D35D36D43AX10AX3AX4AX8AX9M1M2M3M4P1P2P3P4P6PF3X14X26X28X3X5

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, 1519 of 1550 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 01a1d944-bb22-77ab-87b0-29577a0c027f.

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: the Swift half could not be measured — the Swift suite in VPhoneDaemon/Tests/ResultSchema produced no coverage export. Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo.
  • D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its SwiftPM package dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (VPhoneKit/VPhoneKit.xcodeproj/project.pbxproj), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 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. `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift`, `Research/VPhoneVirtualMachineRefactored.swift`, `VPhoneDaemon/Daemon/APIWire.swift`, `VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Packages.swift`, `VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Payload.swift`, … (+308 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.
  • D44 Platform End-of-Life — 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 dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a Dockerfile) is simply not read here yet.
  • AX1 Captive dependencies — 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 Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppDetail.swift, whose lifetimes are not modelled 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.
  • AXB2 Runtime readiness — 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. `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. (rule: no-root-manifest). The renderer reported: the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • 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. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • 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 Swift, c, objectivec 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 Swift, c, objectivec is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X24 Document value interpolated into markup unescaped — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded, no Java, Rust, Erlang, F#, Python, Dart, Ruby, Scala or Kotlin was found, and this repository's C, Objective-C, Swift (Foundation mutable collections) 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.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP make no call through a named logger, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.3 / 10Critical✓ 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 2.3 / 10 · rule-coverage 100% · ceiling Prevented

297 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was VPhoneCustomFirmwareInstaller.applyGuestPatches at 309. A further 15 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 VPhoneVirtualMachineKeySender.asciiToVK at 99 — they are counted neither in the figure above nor in this dimension's score. 9 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: VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift (VPhoneVirtualMachineKeySender.asciiToVK at 99), VPhoneDaemon/Daemon/GuestAPICoreMethods.swift (CoreMethod.spec at 48), VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift (DeviceMethod.spec at 41), VPhoneDaemon/Daemon/GuestAPIServiceMethods.swift (ServiceMethod.spec at 20), VPhoneDaemon/Daemon/GuestAPIFileToolMethods.swift (FileToolMethod.spec at 18), and 4 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

Image.init (cyclomatic 21) · ×3Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:35
VPhoneCustomFirmwareInstaller.applyGuestPatches (cyclomatic 309)VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358
VPhoneCustomFirmwareInstaller.run (cyclomatic 148)VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:142
KernelCustomFirmwarePatcher.revealCSSCHandler (cyclomatic 105)VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchCSSC.swift:21
GuestAPI.executeCore (cyclomatic 104)VPhoneDaemon/Daemon/GuestAPI.swift:182

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

What to do

  1. Bring the 2 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with VPhoneCustomFirmwareInstaller.applyGuestPatches (cyclomatic 309), VPhoneCustomFirmwareInstaller.run (cyclomatic 148). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 2.3 to about 4.1/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

D2 · Cognitive Complexity2.0 / 10Critical✓ 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 2.0 / 10 · rule-coverage 100% · ceiling Prevented

410 method(s) exceeded the cognitive complexity threshold of 15; the worst was VPhoneCustomFirmwareInstaller.applyGuestPatches at 518.

Image.init (cognitive 39) · ×3Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:35
CustomFirmwareArm64eX1Audit.scan::inspect (cognitive 22) · ×2VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:49
Image.resolve (cognitive 17) · ×2Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:70
VPhoneCustomFirmwareInstaller.applyGuestPatches (cognitive 518)VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358
KDKRecovery.synthesizeSymbols (cognitive 176)VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift:59

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

What to do

  1. Bring the 6 bodies over 120 down to 120 or less in Cognitive Complexity — start with VPhoneCustomFirmwareInstaller.applyGuestPatches (cognitive 518), KDKRecovery.synthesizeSymbols (cognitive 176), VPhoneCustomFirmwareInstaller.run (cognitive 172). — 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 6 together lifts Cognitive Complexity from 2.0 to about 2.6/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

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

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

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

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

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

97 god class(es) detected.

MethodTooLong: VPhoneCustomFirmwareInstaller.applyGuestPatches · ×29VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358
FileTooLong: Firmware/VPhoneCustomFirmwareInstaller.swift · ×27VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift
ClassTooLong: VPhoneCustomFirmwareInstaller · ×25VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:25
TooManyMethods: KernelCustomFirmwarePatcher · ×16VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift:16

What to do

  1. Resolve the 29 MethodTooLong finding(s) in God Classes — start with VPhoneCustomFirmwareInstaller.swift (4), DyldSharedCacheArm64eX1BootstrapPatcher.swift (2), GuestAPICoreMethods.swift. — One of this dimension's main actionable groups (29 warning-level).
  2. Resolve the 27 FileTooLong finding(s) in God Classes — start with VPhoneCustomFirmwareInstaller.swift, CustomFirmwareVirtualAudio.swift, FirmwareGuestSystemPatchSet.swift. — One of this dimension's main actionable groups (27 warning-level).
  3. Resolve the 25 ClassTooLong finding(s) in God Classes — start with VPhoneCustomFirmwareInstaller.swift, CustomFirmwareVirtualAudio.swift, FirmwareGuestSystemPatchSet.swift. — One of this dimension's main actionable groups (25 warning-level).

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

D4 · Code Duplication7.7 / 10Strong✓ Tool-verified

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

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

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

188 duplicated block group(s) detected. 5.8 % of the production lines (8,920 of 154,762) are in a reported copy. A further 245 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 3 of the 433 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.

Edited copy of a member (6 corresponding lines) · ×21Research/Guest/SettingsRows/ReviewedProviderPatch.swift:95
Duplicated block (7 lines × 2) · ×21VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:216
Edited copy of a member (4 corresponding lines) · ×20VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:169
Duplicated block (6 lines × 2) · ×20VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:314
Duplicated block (5 lines × 2) · ×20Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:101

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

What to do

  1. Resolve the 21 Edited copy of a member (6 corresponding lines) finding(s) in Code Duplication — start with CustomFirmwareWatchDog.swift (2), ReviewedProviderPatch.swift, KernelCustomFirmwarePatchParavirtTask3.swift. — One of this dimension's main actionable groups (21 warning-level).
  2. Resolve the 21 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with CustomFirmwareVirtualAudio.swift (2), VPhoneCustomFirmwareInstaller.swift (2), GuestIrisinInstaller+RootHideBase.swift. — One of this dimension's main actionable groups (21 warning-level).
  3. Resolve the 20 Edited copy of a member (4 corresponding lines) finding(s) in Code Duplication — start with ARM64Encoder.swift (4), DyldSharedCacheGLESDepthClipPatcher.swift (2), CustomFirmwareVisionOSFramePacing.swift. — One of this dimension's main actionable groups (20 warning-level).

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

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

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

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

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

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

21 production modules (Xcode), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; a workspace's implicit (product-name) dependency is not visible there; 4 module(s) off the main sequence, with abstractness counted on 12 of the 21 (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: VPhoneVirtualMachineKit · ×4

What to do

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

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

D6 · Cohesion (LCOM4)8.8 / 10Strong✓ 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 8.8 / 10 · rule-coverage 100% · ceiling Verified

15 of 151 classes have LCOM4 above 3.

Low cohesion: Data (LCOM4 16) · ×15VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift:223

What to do

  1. Resolve the 15 Low cohesion finding(s) in Cohesion (LCOM4) — start with VPhoneAEA.swift, VPhoneMenuController.swift, KernelCustomFirmwarePatcherBase.swift. — One of this dimension's main actionable groups (15 warning-level).

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

D10 · Test Quality8.8 / 10Strong✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

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

24 skipped (24 with a documented reason), 38 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 458 tests.

No assertions: · ×38VPhoneKit/VPhoneArchiveKitTests/BundleTransferTests.swift:61
Skipped (documented): matchesApplesTree · ×24VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/DeviceTreeResearchBoardTests.swift:176

What to do

  1. Resolve the 38 No assertions finding(s) in Test Quality — start with PatchComparisonTests.swift (9), FirmwarePatcherTests.swift (5), DyldSharedCacheMISTrustAuthPatcherTests.swift (2). — One of this dimension's main actionable groups (38 warning-level).

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

D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the tests pass reliably, with no flakiness.

Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.

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

0 flaky across 1 measured tier(s). Swift (ResultSchemaCheck): measured (0 flaky).

✓ On the Gold path — maintain.

Detailed fixes: d11_recommendation.md.

D12 · Dependency Hygiene9.4 9.0 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 95% · ceiling Verified

12 outdated direct SwiftPM dependencies, 0 pinning defect(s). 20 of 21 direct dependencies had their releases listed (0 naming no readable repository, 1 pinned to a branch or a revision rather than a version). SwiftPM has no package registry: a dependency is a repository URL and its releases are that repository's semver tags, so currency is answered by listing tags rather than by querying an index. Only a newer tag on the SAME MAJOR is reported — a `from:` requirement admits everything below the next major and nothing above it, so a major crossing needs a Package.swift edit rather than an update, and naming the update as its remedy would be wrong. Whether any dependency is DEPRECATED or ABANDONED is not graded and cannot be: a repository publishes no such marker, and there is no registry that could carry one. Known CVEs in this dependency graph are D30's question.

Outdated: applemobiledevicelibrary · ×12

Detailed fixes: d12_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 21 SwiftPM package(s) use a banned license. SwiftPM has no package registry, so each package's licence is the one its repository declares: 21 of them read from the licence file the repository carries at the revision REDACTED pins, and 0 — unpinned, or whose licence file could not be read or named — from api.deps.dev, which reports the licence the repository declares today. Graded: every package a committed REDACTED pins, direct and transitive, and every declared dependency none pins. 1 of them declare no licence that matches a known SPDX licence; that is missing data, not a violation, and none of them is charged. ★ COVERAGE OF THIS VERDICT: it grades this repository's SwiftPM package dependencies and nothing else. The repository also declares package.json, and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots8.7 / 10Strong✓ Tool-verified

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

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

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

Top hotspots: VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift (148×344=50912); VPhoneDaemon/Daemon/GuestAPI.swift (91×104=9464); VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift (60×56=3360)

Hotspot: VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift · ×90VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358

What to do

  1. Resolve the 90 Hotspot finding(s) in Churn × Complexity Hotspots — start with VPhoneCustomFirmwareInstaller.swift, GuestAPI.swift, VPhoneVirtualMachineAppDelegate.swift. — One of this dimension's main actionable groups (90 warning-level).

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

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

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

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

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

123 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift. Counted over 595 of the 714 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

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

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

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

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

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

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

0 deducted task-comment markers across 154762 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

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

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

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

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

1 of 1 documentation facets pass in full. 17 document(s) read across 2 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 foundVPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj:1

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with project.pbxproj. — 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 Consistency5.7 / 10Adequate✓ 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 5.7 / 10 · rule-coverage 100% · ceiling Verified

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

`addGpuDriver` spells `Gpu` where 21 names in the project spell it `GPU`VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:186
`includeIpsw` spells `Ipsw` where 23 names in the project spell it `IPSW`VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineTransferCommand.swift:61

What to do

  1. Resolve the 1 `addGpuDriver` spells `Gpu` where 21 names in the project spell it `GPU` finding(s) in Naming Consistency — start with CryptexFilesystemPatcherGuestPayload.swift. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `includeIpsw` spells `Ipsw` where 23 names in the project spell it… finding(s) in Naming Consistency — start with VPhoneVirtualMachineTransferCommand.swift. — 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 Cohesion0.0 / 10Critical✓ 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 0.0 / 10 · rule-coverage 100% · ceiling Documented

4 of 7 build units (Xcode, npm) 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.

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)4.0 / 10Weak✓ 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 4.0 / 10 · rule-coverage 100% · ceiling Documented

6 finding(s): 0 critical, 6 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 4 High secret finding(s) in Secrets (history) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 issue-level).
  2. Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED (2). — One of this dimension's main actionable groups (2 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)0.0 / 10Critical✓ Tool-verified

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

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

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

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

47 finding(s): 0 critical, 46 high, 1 medium, 0 low. 13 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 45 file(s) — `Research/Guest/Evidence/duo-sim-baseline/probes/appkit-merge.zsh` (line 22, lines 22–23), `Research/Guest/Evidence/duo-sim-baseline/probes/appkit-run.zsh`, `Research/Guest/Evidence/duo-sim-baseline/probes/chrome-assemble.zsh`, `Research/Guest/Evidence/duo-sim-baseline/probes/chrome-run.zsh`, `Research/Guest/Evidence/duo-sim-baseline/probes/springboard-merge.zsh` (lines 12–117), … (+40 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

What to do

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

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

D30 · Dependency Vulnerabilities9.4 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

3 finding(s): 0 critical, 3 high, 0 medium, 0 low.

REDACTED

What to do

  1. Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

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

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

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

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

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

2 of 595 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneTouchIDMonitor.swift. Counted over 595 of the 714 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×2VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneTouchIDMonitor.swift:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

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

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

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

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

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

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

Strongest change-coupling: VPhoneLaunchpadHelperClient.swift↔VPhoneLaunchpadHelperService.swift 100%; VPhoneCustomFirmwareInstaller.swift↔VPhoneCustomFirmwarePatchCommand.swift 95%; GuestAPI+Environment.swift↔VPhoneGuestEnvironment.swift 94%

Boundary-crossing change coupling: GuestAPI+Environment.swift ↔ VPhoneGuestEnvironment.swift · ×3VPhoneDaemon/Daemon/GuestAPI+Environment.swift:1
Change coupling: KernelCustomFirmwarePatcher.swift ↔ FirmwareKernelCustomFirmwarePatchSet.swift · ×12VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift:1
Change-coupling hub: VPhoneLaunchpadHelperService.swift → VPhoneLaunchpadControlCommands.swift, VPhoneLaunchpadHelperClient.swift, VPhoneLaunchpadControl.swift · ×3VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift

What to do

  1. Resolve the 3 Boundary-crossing change coupling finding(s) in Change Coupling — start with GuestAPI+Environment.swift, FirmwareGuestSystemPatchSet.swift, GuestAPI.swift. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 12 Change coupling finding(s) in Change Coupling — start with FirmwarePatchSetCatalog.swift (2), FirmwareDeviceTreePatchSet.swift (2), KernelCustomFirmwarePatcher.swift. — One of this dimension's main actionable groups (12 warning-level).
  3. Resolve the 3 Change-coupling hub finding(s) in Change Coupling — start with VPhoneLaunchpadHelperService.swift, VPhoneCustomFirmwareInstaller.swift, VPhoneLaunchpadHelperFirmwareRequest.swift. — One of this dimension's main actionable groups (3 warning-level).

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

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

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

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

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

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

REDACTED
REDACTED
REDACTED
REDACTED

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. — One of this dimension's main actionable groups (1 recommendation-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.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition10.0 / 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.

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

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

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

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

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

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

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

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

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

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

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

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

What to do

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

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

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

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

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.

P2 · Observability7.0 / 10Strong✓ 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.

  • Only 4/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `VPhoneExecutable/VPhoneVirtualization`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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 CodeQL's Swift pack (Swift/Xcode) (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 4 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:6
  • `VPhoneWebsite/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — VPhoneWebsite/package.json:11

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's Swift pack (Swift/Xcode) — 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.

What to do

  • Make sure a person approves each release. The release job names an environment, but its approval rules live in the code host's settings, where we can't see them. Check that a reviewer must approve each release, or publish releases as drafts first, so a bad build can be stopped before anyone downloads it.
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.
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.

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.

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.

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.

X3 · Exception handling7.7 / 10Strong✓ 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` 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. (×5) — VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift:182, VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift:248, VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:148, …
  • 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. — VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneFrameProducer.swift:285

What to do

  • Swallowed exception (caught, then discarded)
X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

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

  • This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

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 Health52%Adequate — gated by D1, D2, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture91%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity64%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness49%Weak — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security22%Checked 3 of 10Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

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

  • X10 Duplicated predicate — 23 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 65 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not 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
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No Swift request handler (a Vapor, Hummingbird, Kitura, Swifter or Perfect route handler, as a method or a registered closure) is declared, so no state is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • 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 — no exported interface declares behaviour
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) exited before it served a page. Likely cause (our sandbox): `npm run` found no package.json in the folder where our sandbox ran it. This is a limit of our sandbox, not of your repository. Last output: "npm error code ENOENT / npm error syscall open / npm error path <repo>/package.json / npm error errno -2 / npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '<repo>/package.json' / npm error enoent This is related to npm not being able to find a file. / npm error enoent / npm error A complete log of this run can be found in: <path>" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .swift source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 313 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.
  • D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Swift suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and this analysis resolves a call's owner only where the receiver's type is written down in the source. Reported as guidance rather than measured
  • 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'.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Swift source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `Benchmark("…")` in a file importing package-benchmark, or package-benchmark in Package.swift, 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.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — swift (153,820 lines), objectivec (20,503 lines), c (11,240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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
  • X16 Unfloored truncation loop — X16 reached only 0% of this repository's production lines — swift (153,820 lines), objectivec (20,503 lines), c (11,240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • 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
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — X24 reached only 0% of this repository's production lines — swift (153,820 lines), objectivec (20,503 lines), c (11,240 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — 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
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X30 Support guard that admits what it rejects — 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 — 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
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 58 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · High secret · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D35 · Change Coupling · Boundary-crossing change coupling · ×3
  • Boundary-crossing change coupling: GuestAPI+Environment.swift ↔ VPhoneGuestEnvironment.swift VPhoneDaemon/Daemon/GuestAPI+Environment.swift:1 — `VPhoneDaemon/Daemon/GuestAPI+Environment.swift` (context VPhoneDaemon) and `VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift` (context VPhoneKit) sit in DIFFERENT parts of the tree yet 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 16 shared commits counted here, the most recent 3 are `23337dc8` experiment: bridge iOS 16 startup to SpringBoard run loop; `3a82d57f` Remove PosterProbe; `c868da9d` Duo: fix stale guest dylib deploys and make the fold libraries instal… — run `git show` on any of them.
  • Boundary-crossing change coupling: FirmwareGuestSystemPatchSet.swift ↔ VPhoneGuestEnvironment.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift` (context VPhoneExecutable) and `VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestEnvironment.swift` (context VPhoneKit) sit in DIFFERENT parts of the tree yet change together 59% of the time (10 of the 17 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `23337dc8` experiment: bridge iOS 16 startup to SpringBoard run loop; `83b4cd46` Make libprefsfix and libsigninfix selectable patches; `96ecc23e` fix: feed virtual gravity into SpringBoard orientation — run `git show` on any of them.
  • Boundary-crossing change coupling: GuestAPI.swift ↔ VPhoneGuestControlSystem.swift VPhoneDaemon/Daemon/GuestAPI.swift:1 — `VPhoneDaemon/Daemon/GuestAPI.swift` (context VPhoneDaemon) and `VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlSystem.swift` (context VPhoneExecutable) sit in DIFFERENT parts of the tree yet change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `de764d2f` Use active point geometry for guest input; `3715b5bf` Keep the guest's clock on the Mac's; `40440b13` Unlock a guest at startup when its machine asks for it — run `git show` on any of them.
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
Serious — 1407 finding(s)
D15 · Churn × Complexity Hotspots · Hotspot · ×90
  • Hotspot: VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift changed 148 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 344 in VPhoneCustomFirmwareInstaller.applyGuestPatches at line 1358. 14 of those changes were fix/bug commits, and the other 134 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift`: 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: VPhoneDaemon/Daemon/GuestAPI.swift VPhoneDaemon/Daemon/GuestAPI.swift:182 — VPhoneDaemon/Daemon/GuestAPI.swift changed 91 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 104 in GuestAPI.executeCore at line 182. 3 of those changes were fix/bug commits, and the other 88 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneDaemon/Daemon/GuestAPI.swift`: 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: VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:79 — VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift changed 60 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in VPhoneVirtualMachineAppDelegate.startVirtualMachine at line 79. 2 of those changes were fix/bug commits, and the other 58 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift`: 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: VPhoneDaemon/Daemon/GuestAPI+Device.swift VPhoneDaemon/Daemon/GuestAPI+Device.swift:62 — VPhoneDaemon/Daemon/GuestAPI+Device.swift changed 52 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 59 in GuestAPI.executeDevice at line 62. 4 of those changes were fix/bug commits, and the other 48 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneDaemon/Daemon/GuestAPI+Device.swift`: 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: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift:52 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift changed 41 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 64 in FirmwarePipeline.buildComponentList at line 52. 2 of those changes were fix/bug commits, and the other 39 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift`: 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: VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:327 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift changed 72 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in VPhoneGuestControl.probe at line 327. 1 of those changes was a fix/bug commit, and the other 71 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift`: 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: VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift:34 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in VPhoneFirmwarePreparer.prepare at line 34. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift`: 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: VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift:388 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in VPhoneLaunchpadCreationPipeline.perform 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift`: 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: VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift:184 — VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 54 in VPhoneHostAutomationServer.respond at line 184. 1 of those changes was a fix/bug commit, and the other 22 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift`: 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: VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:526 — VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift changed 38 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in VPhoneLaunchpadControlCommands.startCreation at line 526. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift`: 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: VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift:40 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift changed 47 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in VPhoneVirtualMachineWindowController.showWindow at line 40. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift`: 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: VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:73 — VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in VPhoneVirtualMachine.init at line 73. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift`: 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: VPhoneDaemon/Daemon/GuestHyperTextHandler.swift VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:26 — VPhoneDaemon/Daemon/GuestHyperTextHandler.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in GuestHyperTextHandler.channelRead at line 26. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneDaemon/Daemon/GuestHyperTextHandler.swift`: 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: VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift:164 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in VPhoneVirtualMachineCreateCommand.validate at line 164. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift`: 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: VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift:263 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift changed 39 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in VPhoneFirmwarePrepareCommand.run at line 263. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift`: 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: VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift:76 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in VPhoneLaunchpadMachinesView.body at line 76. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift`: 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: VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift:233 — VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in VPhoneLaunchpadControlRequest.parse at line 233. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift`: 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: VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift:346 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in VPhoneVirtualMachineConfigCommand.networkEdit at line 346. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift`: 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: VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift:347 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in VPhoneLaunchpadMachineInspector.patchesPage at line 347. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift`: 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: VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:562 — VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in VPhoneVirtualMachineView.scrollNatively at line 562. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift`: 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: VPhoneDaemon/Daemon/GuestAPI+Environment.swift VPhoneDaemon/Daemon/GuestAPI+Environment.swift:61 — VPhoneDaemon/Daemon/GuestAPI+Environment.swift changed 28 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in GuestAPI.installEnvironment at line 61. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneDaemon/Daemon/GuestAPI+Environment.swift`: 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: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift:179 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in CryptexFilesystemPatcher.mergeFilesystems at line 179. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift`: 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: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:156 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in DeviceTreePatcher.guestEdits 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift`: 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: VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:143 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in VPhonePCCGPURecovery.stageFromSystemDisk at line 143. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift`: 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: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:364 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift changed 19 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in DeviceTreePatcher.applyPatches at line 364. 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-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 17:00:54 +08:00' --until='2026-11-13 17:00:54 +08:00' --full-history --no-merges -- VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift`: 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.
  • + 65 more in this group — see findings.md.
D10 · Test Quality · No assertions · ×38
  • No assertions: VPhoneKit/VPhoneArchiveKitTests/BundleTransferTests.swift:61 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/Bundle/TemplateSetupBootTests.swift:399 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/Network/VPhoneTunnelGatewayTests.swift:84 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/Support/MacNameTests.swift:15 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/VirtualMachine/BootROMTests.swift:41 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/VirtualMachine/DisplayGeometryTests.swift:24 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/VirtualMachine/NewVirtualMachineManifestTests.swift:17 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneKit/VPhoneCoreKitTests/VirtualMachine/SEPROMTests.swift:42 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: nop VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift:20 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: ret VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift:24 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: retaa VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift:28 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: retab VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift:32 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/FirmwarePatcherTests.swift:608 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/IBootDisplayScaleTests.swift:29 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:127 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:140 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:151 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:162 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:175 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:186 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:205 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:218 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/PatchComparisonTests.swift:232 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/VerboseCustomFirmwareDebug.swift:6 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • No assertions: VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareBoardAudioTests.swift:53 — This method's body runs code, and no assertion call was recognised in it. Recognised by name: Assert*, *Should*/ShouldBe*, Verify, Expect, Throws, Record, Received/DidNotReceive, MustHaveHappened/MustNotHaveHappened, EnsureSuccessStatusCode and *AndEnsure*, in the test body and in the helpers it calls in the test and test-support code (a helper there that throws when its check fails counts as an assertion) — so verification routed through a callback object whose members hold the assertions, or through a harness in production code that fails by throwing, is not visible to this check and is not counted here. Read it as 'no assertion this check knows how to see', and if that is right, add one.
  • + 13 more in this group — see findings.md.
D3 · God Classes · MethodTooLong · ×29
  • MethodTooLong: VPhoneCustomFirmwareInstaller.applyGuestPatches VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358 — MethodTooLong — applyGuestPatches runs 1124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1024 over it, 11.24× 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: VPhoneCustomFirmwareInstaller.run VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:142 — MethodTooLong — run runs 379 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 279 over it, 3.79× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: CoreMethod.spec VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:52 — MethodTooLong — spec runs 330 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 230 over it, 3.30× 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: FirmwarePipeline.buildComponentList VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift:52 — MethodTooLong — buildComponentList runs 315 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 215 over it, 3.15× 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: VPhoneVirtualMachineAppDelegate.startVirtualMachine VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:79 — MethodTooLong — startVirtualMachine runs 286 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 186 over it, 2.86× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GuestAPI.executeCore VPhoneDaemon/Daemon/GuestAPI.swift:182 — MethodTooLong — executeCore 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: DeviceMethod.spec VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift:45 — MethodTooLong — spec runs 213 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 113 over it, 2.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VPhoneFirmwarePreparer.prepare VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift:34 — MethodTooLong — prepare runs 204 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 104 over it, 2.04× 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: VPhoneVirtualMachine.init VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:73 — MethodTooLong — init runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: KDKRecovery.synthesizeSymbols VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift:59 — MethodTooLong — synthesizeSymbols runs 165 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 65 over it, 1.65× 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: DyldSharedCacheArm64eX1BootstrapPatcher.lower VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:114 — MethodTooLong — lower runs 156 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 56 over it, 1.56× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: VPhoneMenuController.buildDeviceMenu VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuDevice.swift:11 — MethodTooLong — buildDeviceMenu runs 154 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 54 over it, 1.54× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GuestAPI.executeDevice VPhoneDaemon/Daemon/GuestAPI+Device.swift:62 — MethodTooLong — executeDevice runs 146 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 46 over it, 1.46× 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: VPhoneLaunchpadPreview.run VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift:26 — MethodTooLong — run 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: GuestIrisinInstaller.performInstall VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:250 — MethodTooLong — performInstall runs 134 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× 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: DyldSharedCacheSettingsRowsPatcher.discover VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheSettingsRowsPatcher.swift:23 — MethodTooLong — discover 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: VPhoneVirtualMachineWindowController.showWindow VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift:40 — MethodTooLong — showWindow runs 131 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 31 over it, 1.31× 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: DyldSharedCacheArm64eX1BootstrapPatcher.planImage VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:355 — MethodTooLong — planImage runs 127 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× 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: VPhoneCustomFirmwareInstaller.patchPreboot VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4085 — MethodTooLong — patchPreboot runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DyldSharedCacheHypervisorVirtualMachinePatcher.patch VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:266 — MethodTooLong — patch runs 124 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× 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: AppDetailMethod.spec VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:20 — MethodTooLong — spec 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: TXMDevPatcher.patchExecutableRemap VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:18 — MethodTooLong — patchExecutableRemap 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: VPhoneHostAutomationServer.respond VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift:184 — MethodTooLong — respond runs 112 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 12 over it, 1.12× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: DyldSharedCacheMaxSlidePatcher.patch VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift:228 — MethodTooLong — patch runs 111 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 11 over it, 1.11× 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: DyldSharedCacheMachPortsPatcher.prepare VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMachPortsPatcher.swift:15 — MethodTooLong — prepare runs 110 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 4 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×27
  • FileTooLong: Firmware/VPhoneCustomFirmwareInstaller.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift — FileTooLong — 3263 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: VPhoneCustomFirmwareInstaller (25-5064). The bar is 500 significant lines; this is 2763 over it, 6.53× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: VirtualAudio/CustomFirmwareVirtualAudio.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift — FileTooLong — 1492 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: CustomFirmwareVirtualAudio (188-2700). The bar is 500 significant lines; this is 992 over it, 2.98× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: PatchSets/FirmwareGuestSystemPatchSet.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift — FileTooLong — 1141 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: FirmwareGuestSystemPatchSet (15-1417). The bar is 500 significant lines; this is 641 over it, 2.28× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: GuestCommunication/VPhoneGuestControl.swift VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift — FileTooLong — 942 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: VPhoneGuestControl (10-1244). The bar is 500 significant lines; this is 442 over it, 1.88× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Machines/VPhoneLaunchpadMachineLibrary.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift — FileTooLong — 874 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: VPhoneLaunchpadMachineLibrary (13-1470). The bar is 500 significant lines; this is 374 over it, 1.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Control/VPhoneLaunchpadControlCommands.swift VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift — FileTooLong — 796 significant lines (blank, comment-only and punctuation-only lines excluded), about 92% of them inside a single declaration: VPhoneLaunchpadControlCommands (8-1115). The bar is 500 significant lines; this is 296 over it, 1.59× 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: Machines/VPhoneLaunchpadNewMachineView.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift — FileTooLong — 782 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: VPhoneLaunchpadNewMachineView (10-950). The bar is 500 significant lines; this is 282 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: VirtualMachine/VPhoneVirtualMachineView.swift VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift — FileTooLong — 739 significant lines (blank, comment-only and punctuation-only lines excluded), about 97% of them inside a single declaration: VPhoneVirtualMachineView (7-1339). The bar is 500 significant lines; this is 239 over it, 1.48× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Bundle/VPhoneTemplateSetupBoot.swift VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift — FileTooLong — 721 significant lines (blank, comment-only and punctuation-only lines excluded), about 74% of them inside a single declaration: VPhoneTemplateSetupBoot (353-1210). The bar is 500 significant lines; this is 221 over it, 1.44× 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: Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift — FileTooLong — 702 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 202 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: Machines/VPhoneLaunchpadCreationPipeline.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift — FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 159 over it, 1.32× 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: Bundle/VPhoneMachineTemplates.swift VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift — FileTooLong — 657 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 157 over it, 1.31× 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: REDACTED REDACTED — FileTooLong — 626 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 126 over it, 1.25× 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: CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift — FileTooLong — 625 significant lines (blank, comment-only and punctuation-only lines excluded), about 78% of them inside a single declaration: CustomFirmwarePostRestoreDeviceTree (37-844). The bar is 500 significant lines; this is 125 over it, 1.25× 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: ExecutablePatches/CustomFirmwareArm64eX1.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift — FileTooLong — 622 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: CustomFirmwareArm64eX1 (8-713). The bar is 500 significant lines; this is 122 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: Transfer/VPhoneOTAArchive.swift VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift — FileTooLong — 606 significant lines (blank, comment-only and punctuation-only lines excluded), about 98% of them inside a single declaration: VPhoneOTAArchive (25-876). The bar is 500 significant lines; this is 106 over it, 1.21× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Process/VPhoneConfinedDirectory.swift VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift — FileTooLong — 576 significant lines (blank, comment-only and punctuation-only lines excluded), about 72% of them inside a single declaration: VPhoneConfinedDirectory (99-788). The bar is 500 significant lines; this is 76 over it, 1.15× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Firmware/VPhoneFirmwareCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift — FileTooLong — 572 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 72 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: VirtualMachine/VPhoneVirtualMachineTemplateCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineTemplateCommand.swift — FileTooLong — 569 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 69 over it, 1.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Network/VPhoneTCPForwarder.swift VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift — FileTooLong — 567 significant lines (blank, comment-only and punctuation-only lines excluded), about 79% of them inside a single declaration: VPhoneTCPForwarder (54-866). The bar is 500 significant lines; this is 67 over it, 1.13× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: VirtualMachine/VPhoneVirtualMachineCreator.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreator.swift — FileTooLong — 559 significant lines (blank, comment-only and punctuation-only lines excluded), about 83% of them inside a single declaration: VPhoneVirtualMachineCreator (78-835). The bar is 500 significant lines; this is 59 over it, 1.12× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Daemon/GuestAPI+Device.swift VPhoneDaemon/Daemon/GuestAPI+Device.swift — FileTooLong — 554 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 54 over it, 1.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: UI/VPhoneVirtualMachineAppDelegate.swift VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift — FileTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: VPhoneVirtualMachineAppDelegate (6-716). The bar is 500 significant lines; this is 33 over it, 1.07× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: Support/VPhoneNetworking.swift VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift — FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded), about 65% of them inside a single declaration: VPhoneNetworking (309-890). The bar is 500 significant lines; this is 28 over it, 1.06× 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: Bundle/VPhoneDiskRebase.swift VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift — FileTooLong — 516 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 16 over it, 1.03× 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.
  • + 2 more in this group — see findings.md.
D3 · God Classes · ClassTooLong · ×25
  • ClassTooLong: VPhoneCustomFirmwareInstaller VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:25 — ClassTooLong — 3241 significant lines (blank, comment-only and punctuation-only lines excluded), 84 methods. The bar is 400 significant lines; this is 2841 over it, 8.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: CustomFirmwareVirtualAudio VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:188 — ClassTooLong — 1488 significant lines (blank, comment-only and punctuation-only lines excluded), 49 methods. The bar is 400 significant lines; this is 1088 over it, 3.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: FirmwareGuestSystemPatchSet VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestSystemPatchSet.swift:15 — ClassTooLong — 1139 significant lines (blank, comment-only and punctuation-only lines excluded), 0 methods. The bar is 400 significant lines; this is 739 over it, 2.85× 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: VPhoneLaunchpadMachineLibrary VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:11 — ClassTooLong — 831 significant lines (blank, comment-only and punctuation-only lines excluded), 83 methods. The bar is 400 significant lines; this is 431 over it, 2.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneGuestControl VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:8 — ClassTooLong — 745 significant lines (blank, comment-only and punctuation-only lines excluded), 117 methods. The bar is 400 significant lines; this is 345 over it, 1.86× 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: VPhoneLaunchpadControlCommands VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:7 — ClassTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded), 51 methods. The bar is 400 significant lines; this is 333 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneVirtualMachineView VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:7 — ClassTooLong — 715 significant lines (blank, comment-only and punctuation-only lines excluded), 64 methods. The bar is 400 significant lines; this is 315 over it, 1.79× 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: VPhoneLaunchpadNewMachineView VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift:10 — ClassTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded), 19 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: VPhoneOTAArchive VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:25 — ClassTooLong — 596 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 196 over it, 1.49× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneTemplateSetupBoot VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift:353 — ClassTooLong — 537 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The bar is 400 significant lines; this is 137 over it, 1.34× 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: VPhoneVirtualMachineAppDelegate VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:6 — ClassTooLong — 529 significant lines (blank, comment-only and punctuation-only lines excluded), 15 methods. The bar is 400 significant lines; this is 129 over it, 1.32× 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: CustomFirmwareArm64eX1 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:8 — ClassTooLong — 527 significant lines (blank, comment-only and punctuation-only lines excluded), 21 methods. The bar is 400 significant lines; this is 127 over it, 1.32× 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: CustomFirmwarePostRestoreDeviceTree VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:37 — ClassTooLong — 489 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. The bar is 400 significant lines; this is 89 over it, 1.22× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneVirtualMachineWindowController VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift:6 — ClassTooLong — 477 significant lines (blank, comment-only and punctuation-only lines excluded), 27 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: TXMDevPatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:17 — ClassTooLong — 472 significant lines (blank, comment-only and punctuation-only lines excluded), 34 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: VPhoneFirmwarePreparer VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift:13 — ClassTooLong — 467 significant lines (blank, comment-only and punctuation-only lines excluded), 14 methods. The bar is 400 significant lines; this is 67 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneVirtualMachineCreator VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreator.swift:78 — ClassTooLong — 466 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 66 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneTCPForwarder VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:54 — ClassTooLong — 449 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The bar is 400 significant lines; this is 49 over it, 1.12× 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: GuestAPI VPhoneDaemon/Daemon/GuestAPI.swift:13 — ClassTooLong — 432 significant lines (blank, comment-only and punctuation-only lines excluded), 173 methods. The bar is 400 significant lines; this is 32 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneHostAutomationServer VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift:58 — ClassTooLong — 430 significant lines (blank, comment-only and punctuation-only lines excluded), 23 methods. The bar is 400 significant lines; this is 30 over it, 1.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneLaunchpadPreview VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadPreview.swift:9 — ClassTooLong — 420 significant lines (blank, comment-only and punctuation-only lines excluded), 9 methods. The bar is 400 significant lines; this is 20 over it, 1.05× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VPhoneIPSWCache VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:10 — ClassTooLong — 417 significant lines (blank, comment-only and punctuation-only lines excluded), 18 methods. The bar is 400 significant lines; this is 17 over it, 1.04× 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: VPhoneConfinedDirectory VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:99 — ClassTooLong — 416 significant lines (blank, comment-only and punctuation-only lines excluded), 41 methods. The bar is 400 significant lines; this is 16 over it, 1.04× 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: VPhoneLaunchpadCoreBundle VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift:7 — ClassTooLong — 412 significant lines (blank, comment-only and punctuation-only lines excluded), 30 methods. The bar is 400 significant lines; this is 12 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: DyldSharedCacheArm64eX1BootstrapPatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:7 — ClassTooLong — 405 significant lines (blank, comment-only and punctuation-only lines excluded), 6 methods. The bar is 400 significant lines; this is 5 over it, 1.01× 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.
D4 · Code Duplication · Edited copy of a member (6 corresponding lines) · ×21
  • Edited copy of a member (6 corresponding lines) Research/Guest/SettingsRows/ReviewedProviderPatch.swift:95 — Research/Guest/SettingsRows/ReviewedProviderPatch.swift:95-100 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:196-203 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:328 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:328-333 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift:100-108 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:77 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:77-82 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:496-502 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift:166 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift:166-171 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskHolder.swift:58-63 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:329 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:329-334 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:77-87 — 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:294 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:294-299 | VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift: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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:167 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:167-172 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchBsdInitAuth.swift:175-180 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4053 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4053-4058 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4465-4470 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/CrashLogs/VPhoneCrashLogsModel.swift:167 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/CrashLogs/VPhoneCrashLogsModel.swift:167-172 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Services/VPhoneServicesModel.swift:328-333 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserView.swift:77 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserView.swift:77-83 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Processes/VPhoneProcessSignal.swift:76-81 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBattery.swift:65 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBattery.swift:65-71 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBattery.swift:73-78 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift:269 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift:269-277 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneMachineTemplateTrimmer.swift:172-177 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:392 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:392-401 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:404-409 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:455 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:455-460 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:497-502 — 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) VPhoneKit/VPhoneCoreKit/Support/VPhoneGuestFileName.swift:15 — VPhoneKit/VPhoneCoreKit/Support/VPhoneGuestFileName.swift:15-24 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:282-287 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:264 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:264-269 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegionSize.swift:236-242 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift:211 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift:211-216 | VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignBytes.swift:11-16 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:469 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:469-474 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:515-520 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:416 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:416-421 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift:946-951 — 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:255 — VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:255-260 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUDPForwarder.swift:103-108 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:86 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:86-91 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:108-113 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×21
  • Duplicated block (7 lines × 2) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:216 — VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:216-222 | VPhoneDaemon/Daemon/GuestAPI+Environment.swift:150-156 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:223` calls `vp_spawn_file_actions_addopen`, `vp_spawn_file_actions_adddup2` and `VPhoneDaemon/Daemon/GuestAPI+Environment.swift:157` 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) VPhoneDaemon/Daemon/GuestAPI+Attitude.swift:17 — VPhoneDaemon/Daemon/GuestAPI+Attitude.swift:17-23 | VPhoneDaemon/Daemon/GuestAPI+Gyroscope.swift:19-25 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPI+Attitude.swift:17` it does not close everything it opens, so those exact lines 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) VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:67 — VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:67-73 | VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:84-90 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:67` it begins part-way through the construct above it, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:267 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:267-273 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3647-3653 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:20 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:20-26 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTVSetup.swift:16-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:776 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:776-782 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:242-248 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:776` it does not close everything it opens, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:478 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:478-484 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1121-1127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:478` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:476 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:476-482 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:862-868 — both copies are in the same file, so extract the 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:165 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:165-171 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:174-180 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:138 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:138-144 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:148-154 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:138` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:364 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:364-372 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:781-787 — both copies are in the same file, so extract the 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:77 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:77-83 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPreset.swift:142-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:77` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/DeviceInfo/VPhoneDeviceInfoView.swift:46 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/DeviceInfo/VPhoneDeviceInfoView.swift:46-52 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Processes/VPhoneProcessesView.swift:62-68 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/DeviceInfo/VPhoneDeviceInfoView.swift:46` it does not close everything it opens, so those 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, `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/DeviceInfo/VPhoneDeviceInfoView.swift:54` calls `Button`, `copyJSON`, `help` and `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Processes/VPhoneProcessesView.swift:70` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:219 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:219-225 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:246-252 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:219` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:78 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:78-84 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:100-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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:78` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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 (7 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2662 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2662-2668 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2672-2678 — both copies are in the same file, so extract the 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:131 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:131-137 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:180-186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (7 lines × 2) Research/VPhoneVirtualMachineRefactored.swift:388 — Research/VPhoneVirtualMachineRefactored.swift:388-394 | VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:555-561 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:134 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:134-140 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioGraphConfigurations.swift:274-280 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift:463 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift:463-469 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:1072-1078 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) VPhoneDaemon/Daemon/GuestAPIHomeViewDistanceMethods.swift:10 — VPhoneDaemon/Daemon/GuestAPIHomeViewDistanceMethods.swift:10-16 | VPhoneDaemon/Daemon/GuestAPIHomeViewDistanceMethods.swift:18-24 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPIHomeViewDistanceMethods.swift:10` it begins part-way through the construct above it, so those 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 (4 corresponding lines) · ×20
  • Edited copy of a member (4 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:169 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:169-173 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift:95-98 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:369 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:369-372 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:377-380 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:230 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:230-233 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:336-339 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift:349 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift:349-352 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:376-381 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeResearchBoardConversion.swift:210 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeResearchBoardConversion.swift:210-213 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeResearchBoardConversion.swift:298-301 — 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift:1004 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift:1004-1008 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplates.swift:595-598 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:361 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:361-366 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:136-139 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOBuildPlatform.swift:58 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOBuildPlatform.swift:58-61 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOFatSlice.swift:47-50 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:17 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:17-20 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:99-102 — 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) VPhoneDaemon/Daemon/GuestAPI.swift:629 — VPhoneDaemon/Daemon/GuestAPI.swift:629-632 | VPhoneDaemon/Daemon/GuestKeychain.swift:136-139 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:235 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:235-238 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SPTM/SPTMSecondaryCPUPatcher.swift:162-165 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:59 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:59-62 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:27-30 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:216 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:216-219 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:32-35 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:46 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:46-49 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneSEPROM.swift:46-49 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift:16 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift:16-19 | VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:211-219 — 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) VPhoneDaemon/Daemon/GuestDisplayMetrics.swift:39 — VPhoneDaemon/Daemon/GuestDisplayMetrics.swift:39-43 | VPhoneDaemon/Daemon/GuestPointGeometry.swift:41-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.
  • Edited copy of a member (4 corresponding lines) VPhoneDaemon/Daemon/GuestLockScreenIdle.swift:61 — VPhoneDaemon/Daemon/GuestLockScreenIdle.swift:61-64 | VPhoneDaemon/Daemon/GuestVirtualAudioProduct.swift:65-68 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (4 corresponding lines) VPhoneDaemon/Daemon/GuestPortForwardHandler.swift:117 — VPhoneDaemon/Daemon/GuestPortForwardHandler.swift:117-120 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneAPIProxy.swift:375-378 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:113 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:113-116 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:37-40 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestPreferencesView.swift:266 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestPreferencesView.swift:266-269 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Console/VPhoneConsoleModel.swift:264-267 — 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 (6 lines × 2) · ×20
  • Duplicated block (6 lines × 2) VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:314 — VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:314-319 | VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:328-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:314` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:334` calls `optional` and `VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:320` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift:140 — VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift:140-145 | VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift:159-164 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift:289 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift:289-294 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:274-279 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift:289` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:57 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:57-62 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:74-83 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:74` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/VPhoneCSSCCode.swift:76 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/VPhoneCSSCCode.swift:76-81 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/VPhoneCSSCCode.swift: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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:223 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:223-228 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:538-543 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1826 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1826-1832 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2755-2760 — both copies are in the same file, so extract the 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:431 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:431-436 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:480-485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:431` it does not close everything it opens, so those exact lines 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) VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:65 — VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:65-70 | VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:77-82 — both copies are in the same file, so extract the 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) VPhoneKit/VPhoneCoreKit/Network/VPhonePortForwarder.swift:200 — VPhoneKit/VPhoneCoreKit/Network/VPhonePortForwarder.swift:200-205 | VPhoneKit/VPhoneCoreKit/Network/VPhonePortForwarder.swift:268-273 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:206 — VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:206-211 | VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:411-416 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:206` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:212` calls `NSNull` and `VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:417` 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:447 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:447-452 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:685-690 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:447` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:121 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:121-126 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchMacMount.swift:124-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3055 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3055-3060 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3073-3078 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3055` it does not close everything it opens, so those exact lines 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:267 — VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:267-272 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUDPForwarder.swift:115-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:80 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:80-85 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneSEPROM.swift:80-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift:28 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift:28-33 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift:92-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift:28` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:108 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:108-113 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchMacMount.swift:106-111 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:108` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:114` calls `contains` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchMacMount.swift:112` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:176 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:176-181 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:189-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1299 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1299-1304 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:443-448 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1299` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×20
  • Duplicated block (5 lines × 2) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:101 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:101-105 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:284-288 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:101` it does not close everything it opens, so those exact lines 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) Research/VPhoneVirtualMachineRefactored.swift:310 — Research/VPhoneVirtualMachineRefactored.swift:310-314 | VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:389-393 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:119 — VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:119-123 | VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:95-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:119` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:57 — VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:57-61 | VPhoneDaemon/Daemon/GuestAPIDeviceMethods.swift:54-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:57` it begins part-way through the construct above it, so those exact lines 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) VPhoneDaemon/Daemon/GuestAPISystemAppsMethods.swift:13 — VPhoneDaemon/Daemon/GuestAPISystemAppsMethods.swift:13-17 | VPhoneDaemon/Daemon/GuestAPISystemAppsMethods.swift:22-26 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPISystemAppsMethods.swift:13` it begins part-way through the construct above it, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:267 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:267-271 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsam.swift:192-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:84 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:84-88 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:304-308 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:84` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:476 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:476-483 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:838-842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:476` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:262 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:262-266 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:277-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1090 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1090-1094 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1103-1107 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1090` it does not close everything it opens, so those 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:394 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:394-398 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:411-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:394` it begins part-way through the construct above it, so those exact lines 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/VPhoneGuestPanelsWindowController.swift:121 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/VPhoneGuestPanelsWindowController.swift:121-126 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/VPhoneGuestPanelsWindowController.swift:139-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/VPhoneGuestPanelsWindowController.swift:121` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:274 — VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:274-278 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUDPForwarder.swift:122-126 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:274` it does not close everything it opens, so those exact lines 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) VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCache.swift:148 — VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCache.swift:148-154 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift:181-185 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCache.swift:148` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestDisplayMetrics.swift:45 — VPhoneDaemon/Daemon/GuestDisplayMetrics.swift:45-49 | VPhoneDaemon/Daemon/GuestPointGeometry.swift:46-50 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:331 — VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:331-335 | VPhoneDaemon/Daemon/GuestWebSocketHandler.swift: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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneDaemon/Daemon/GuestWebSocketHandler.swift:88` calls `send` and `VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:339` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 2) VPhoneDaemon/Daemon/GuestAPIInputMethods.swift:120 — VPhoneDaemon/Daemon/GuestAPIInputMethods.swift:120-124 | VPhoneDaemon/Daemon/GuestAPIInputMethods.swift:127-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 `VPhoneDaemon/Daemon/GuestAPIInputMethods.swift:120` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:152 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:152-156 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchPostValidation.swift:60-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift:167 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift:167-171 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskHolder.swift:59-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (5 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:64 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:64-70 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchParavirtUserClients.swift:79-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×17
  • Edited copy of a member (7 corresponding lines) VPhoneDaemon/Daemon/GuestDisplayMetrics.swift:51 — VPhoneDaemon/Daemon/GuestDisplayMetrics.swift:51-57 | VPhoneDaemon/Daemon/GuestPointGeometry.swift:52-58 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:343 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:343-349 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:313-321 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:154 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:154-161 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchExcGuard.swift:168-174 — 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) VPhoneDaemon/Daemon/GuestPointerScroll.swift:63 — VPhoneDaemon/Daemon/GuestPointerScroll.swift:63-71 | VPhoneDaemon/Daemon/GuestPointerScroll.swift:76-82 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/HomePod/VPhoneHomePodDisplayView.swift:175 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/HomePod/VPhoneHomePodDisplayView.swift:175-181 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/TVRemote/VPhoneTVRemoteView.swift:231-238 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:54 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:54-60 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneSEPROM.swift:54-60 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneBootROMOption.swift:48 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneBootROMOption.swift:48-54 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneBootROMOption.swift:81-87 — 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:456 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:456-462 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:892-898 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:127 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:127-134 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:283-289 — 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) VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift:47 — VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift:47-55 | VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift:108-114 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) VPhoneDaemon/Daemon/GuestScreenUnlock.swift:185 — VPhoneDaemon/Daemon/GuestScreenUnlock.swift:185-192 | VPhoneDaemon/Daemon/GuestScreenUnlock.swift:222-228 — 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) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:245 — VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:245-257 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneAttitudeDial.swift:98-104 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:253 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:253-263 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift:288-294 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:82 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:82-88 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift:124-130 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:90 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:90-96 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2678-2684 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift:10 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift:10-16 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/ManifestHashPatcher.swift:172-178 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:127 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:127-133 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift:77-84 — 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.
D3 · God Classes · TooManyMethods · ×16
  • TooManyMethods: KernelCustomFirmwarePatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift:16 — TooManyMethods — 217 methods, declared across 46 files: Drivers/KernelCustomFirmwarePatchParavirtTask3.swift (19), CodeSigning/KernelCustomFirmwarePatchCredLabel.swift (13), Storage/KernelCustomFirmwarePatchDiskImages2.swift (12), Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift (10), +42 more file(s). The bar is 30 methods; this is 187 over it, 7.23× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneMenuController VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuController.swift:7 — TooManyMethods — 143 methods, declared across 14 files: Menu/VPhoneMenuDevice.swift (39), Menu/VPhoneMenuBattery.swift (15), Menu/VPhoneMenuBootstrap.swift (15), Menu/VPhoneMenuApps.swift (13), +10 more file(s). The bar is 30 methods; this is 113 over it, 4.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneGuestControl VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:8 — TooManyMethods — 117 methods, declared across 11 files: GuestCommunication/VPhoneGuestControl.swift (73), GuestCommunication/VPhoneGuestControlApps.swift (10), GuestCommunication/VPhoneGuestControlSystem.swift (9), GuestCommunication/VPhoneGuestControlKeychain.swift (6), +7 more file(s). The bar is 30 methods; this is 87 over it, 3.90× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneCustomFirmwareInstaller VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:25 — TooManyMethods — 84 methods. The bar is 30 methods; this is 54 over it, 2.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: VPhoneLaunchpadMachineLibrary VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:11 — TooManyMethods — 83 methods, declared across 2 files: Machines/VPhoneLaunchpadMachineLibrary.swift (77), Machines/VPhoneLaunchpadMachineActions.swift (6). The bar is 30 methods; this is 53 over it, 2.77× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: CryptexFilesystemPatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift:28 — TooManyMethods — 73 methods, declared across 9 files: CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift (17), CryptexFilesystem/CryptexFilesystemPatcherDiskImage.swift (12), CryptexFilesystem/CryptexFilesystemPatcherManifest.swift (12), CryptexFilesystem/CryptexFilesystemPatcherSealing.swift (11), +5 more file(s). The bar is 30 methods; this is 43 over it, 2.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneVirtualMachineView VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:7 — TooManyMethods — 64 methods. The bar is 30 methods; this is 34 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.
  • TooManyMethods: DeviceTreePatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:18 — TooManyMethods — 51 methods, declared across 4 files: DeviceTree/DeviceTreeGuestDevicePatches.swift (26), DeviceTree/DeviceTreePatcher.swift (18), DeviceTree/DeviceTreeResearchBoardConversion.swift (5), DeviceTree/DeviceTreeVirtualUSBDriverKit.swift (2). The bar is 30 methods; this is 21 over it, 1.70× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneLaunchpadControlCommands VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:7 — 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: KernelPatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcher.swift:13 — TooManyMethods — 41 methods, declared across 12 files: Security/KernelPatchDebugger.swift (8), APFS/KernelPatchApfsMount.swift (7), Security/KernelPatchSandbox.swift (7), Security/KernelPatchPostValidation.swift (4), +8 more file(s). The bar is 30 methods; this is 11 over it, 1.37× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneConfinedDirectory VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:99 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: IBootPatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:18 — TooManyMethods — 38 methods, declared across 8 files: BasePatches/IBootPatchRootfsBypass.swift (11), IBoot/IBootPatcher.swift (9), BasePatches/IBootPatchDisplayScale.swift (7), BasePatches/IBootPatchBootArgs.swift (4), +4 more file(s). The bar is 30 methods; this is 8 over it, 1.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneTemplateSetupBoot VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift:353 — TooManyMethods — 35 methods. The bar is 30 methods; this is 5 over it, 1.17× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: FirmwarePipeline VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipeline.swift:32 — TooManyMethods — 34 methods, declared across 4 files: Pipeline/FirmwarePipeline.swift (12), Pipeline/FirmwarePipelineDiscovery.swift (12), Pipeline/FirmwarePipelineOriginals.swift (6), Pipeline/FirmwarePipelineComponents.swift (4). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: TXMDevPatcher VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:17 — TooManyMethods — 34 methods, declared across 3 files: TXM/TXMDevPatcher.swift (14), TXM/TXMExecutableRemap.swift (14), TXM/TXMMissingProfile.swift (6). The bar is 30 methods; this is 4 over it, 1.13× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. 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: VPhoneTCPForwarder VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:54 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D6 · Cohesion (LCOM4) · Low cohesion · ×15
  • Low cohesion: Data (LCOM4 16) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift:223 — Data's methods fall into 16 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 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneMenuController (LCOM4 11) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuController.swift:7 — VPhoneMenuController's methods fall into 11 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 11 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: KernelCustomFirmwarePatcherBase (LCOM4 10) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:14 — KernelCustomFirmwarePatcherBase's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneVirtualMachineRefactored (LCOM4 7) Research/VPhoneVirtualMachineRefactored.swift:6 — VPhoneVirtualMachineRefactored's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneKeychainWindowController (LCOM4 7) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainWindowController.swift:4 — VPhoneKeychainWindowController's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneDeviceInfoModel (LCOM4 7) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/DeviceInfo/VPhoneDeviceInfoModel.swift:4 — VPhoneDeviceInfoModel's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneGuestControl (LCOM4 6) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:8 — VPhoneGuestControl's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneVirtualMachineView (LCOM4 6) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:7 — VPhoneVirtualMachineView's methods fall into 6 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 6 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneLaunchpadHelperService (LCOM4 5) VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:5 — VPhoneLaunchpadHelperService's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: SegmentByteStream (LCOM4 5) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:399 — SegmentByteStream's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneTemplateSetupVirtualMachine (LCOM4 5) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneTemplateSetup.swift:63 — VPhoneTemplateSetupVirtualMachine's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneLaunchpadAppDelegate (LCOM4 4) VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadApp.swift:90 — VPhoneLaunchpadAppDelegate's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: ByteRelay (LCOM4 4) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneAPIProxy.swift:329 — ByteRelay's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneVirtualMachine (LCOM4 4) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:7 — VPhoneVirtualMachine's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VPhoneConsoleModel (LCOM4 4) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Console/VPhoneConsoleModel.swift:13 — VPhoneConsoleModel's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×14
  • Duplicated block (8 lines × 2) VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:58 — VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:58-65 | VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:75-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:58` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:83` calls `required` and `VPhoneDaemon/Daemon/GuestAPIAppDetailMethods.swift:66` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:433 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:433-440 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:527-534 — both copies are in the same file, so extract the 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:70 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:70-77 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:99-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:70` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:253 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:253-260 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:475-482 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:253` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3908 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3908-3915 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3960-3967 — both copies are in the same file, so extract the 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, `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3959` calls `copyFile` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3907` 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4857 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4857-4864 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4901-4908 — both copies are in the same file, so extract the 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 (8 lines × 2) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:169 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:169-176 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:212-219 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:169` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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, `VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:220` calls `FileState` and `VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:178` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:448 — VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:448-455 | VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:476-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:448` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:676 — VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:676-683 | VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:716-723 — both copies are in the same file, so extract the 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) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swift:101 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swift:101-108 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplatesView.swift:76-83 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadSnapshotsView.swift:101` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (8 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiTrustcache.swift:91 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiTrustcache.swift:91-98 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiTrustcache.swift:99-106 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiTrustcache.swift:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1231 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1231-1238 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1352-1359 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1231` it does not close everything it opens, so those 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1223` calls `locateEpilogue` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1351` 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3805 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3805-3812 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3835-3842 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3805` it begins part-way through the construct above it, so those exact lines 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:70 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootROM.swift:70-77 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneSEPROM.swift:70-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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.
D35 · Change Coupling · Change coupling · ×12
  • Change coupling: KernelCustomFirmwarePatcher.swift ↔ FirmwareKernelCustomFirmwarePatchSet.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareKernelCustomFirmwarePatchSet.swift` change together 85% of the time (11 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `39f6e672` Render OpenGL ES in guests; `ac83d371` cfw: jb: Accept the 5-scalar aks_unlock_bag on the 26.4 kernel (iOS 2…; `ab4c7c81` Emulate scalar CSSC in the kernel and abort failed X1 boot patches — run `git show` on any of them.
  • Change coupling: CustomFirmwarePostRestoreDeviceTree.swift ↔ VPhoneRestoreCommand.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift` change together 82% of the time (14 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 14 shared commits counted here, the most recent 3 are `90e0c6cb` Enable DriverKit for virtual USB input on iPhone and iPad; `773c1088` feat: restore opt-in iOS 16 scanout, touch and fresh-lab desktop; `ec014d7c` Duo: match Apple's simulator for CoreMotion, displays and the book angle — run `git show` on any of them.
  • Change coupling: VPhoneMenuDevice.swift ↔ VPhoneVirtualMachineAppDelegate.swift VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuDevice.swift:1 — `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuDevice.swift` and `VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift` change together 61% of the time (11 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `2c49d5cd` Let the mouse be the iPad's pointer again, as a saved choice; `07bb9351` Add localized environment immersion actions to the visionOS Device menu; `8804d3f5` Toggle the guest's software keyboard without restarting — run `git show` on any of them.
  • Change coupling: CryptexFilesystemPatcherGuestPayload.swift ↔ FirmwareRestoreImagePatchSet.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareRestoreImagePatchSet.swift` 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `29d6110a` Validate userspace debugging on iPhone, watch and HomePod guests; `2eb85ae7` Re-sign debugserver in the restore image; `2fdc2323` Sign launchd.plist so Minimal boots a stock launchd_cache_loader — run `git show` on any of them.
  • Change coupling: FirmwarePatchSetCatalog.swift ↔ VPhoneCustomFirmwarePatchCommand.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchCommand.swift` change together 55% of the time (11 of the 20 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `90e0c6cb` Enable DriverKit for virtual USB input on iPhone and iPad; `773c1088` feat: restore opt-in iOS 16 scanout, touch and fresh-lab desktop; `ec014d7c` Duo: match Apple's simulator for CoreMotion, displays and the book angle — run `git show` on any of them.
  • Change coupling: VPhoneLaunchpadControlCommands.swift ↔ VPhoneLaunchpadHelperProtocol.swift VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:1 — `VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift` and `VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadHelperProtocol.swift` 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `b7d0c632` Create Launchpad machines on the release's own cloudOS; `b77021fb` Create, install and patch minimal VMs; `04a13e47` Add the Launchpad Update Kernel action for cfw update-kernel — run `git show` on any of them.
  • Change coupling: VPhoneLaunchpadCoreBundleView.swift ↔ VPhoneLaunchpadMachinesView.swift VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift:1 — `VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundleView.swift` and `VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift` 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `f3cac9db` Say when a CFW install did not finish, and give Core Bundle installs …; `4e8d7bd7` Polish Launchpad: multi-select machines, sheet flow, and New Machine; `b21910e0` Apply the formatter to the daemon, the VM, the IPSW cache and the hos… — run `git show` on any of them.
  • Change coupling: FirmwareDeviceTreePatchSet.swift ↔ VPhoneCustomFirmwarePatchCommand.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchCommand.swift` change together 50% of the time (7 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `90e0c6cb` Enable DriverKit for virtual USB input on iPhone and iPad; `79cc81c0` HomePod audio; `a44273ee` Pair a virtual Apple Watch with a virtual iPhone — run `git show` on any of them.
  • Change coupling: FirmwarePatchSetCatalog.swift ↔ VPhoneCustomFirmwareMachOVerbsCommand.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwarePatchSetCatalog.swift` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift` change together 50% of the time (7 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `693e42f7` Cover standalone accessibility X1 images and audit remaining libraries; `f2a4e071` Lower X1 instructions in standalone debug libraries; `27add652` Fix standalone HomePop accessibility X1 crashes on iOS 27.1 — run `git show` on any of them.
  • Change coupling: VPhoneFirmwareCommand.swift ↔ VPhoneVirtualMachineCreateCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift:1 — `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift` change together 50% of the time (7 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `a3176db5` cli: Resolve --iphone-version and --iphone-build in vm create; `9a9d688b` HomePod Sound Glow; `81873692` iPhone XS Max guests on the research board's iOS 18 kernels — run `git show` on any of them.
  • Change coupling: FirmwareDeviceTreePatchSet.swift ↔ VPhoneRestoreCommand.swift VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift:1 — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift` change together 50% of the time (7 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 different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these 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 `90e0c6cb` Enable DriverKit for virtual USB input on iPhone and iPad; `79cc81c0` HomePod audio; `a44273ee` Pair a virtual Apple Watch with a virtual iPhone — run `git show` on any of them.
  • Change coupling: VPhoneLaunchpadMachineLibrary.swift ↔ VPhoneLaunchpadMachineSheets.swift VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:1 — `VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift` and `VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swift` change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets). 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 `9341c9b9` Add Machine menu with shortcuts, view patches read-only, export directly; `d898718e` Clone with a new identity and keep disk snapshots in Launchpad; `40440b13` Unlock a guest at startup when its machine asks for it — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×12
  • Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:141 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:141-152 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:193-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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:141` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:170 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:170-179 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:427-436 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:170` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:103 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:103-112 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUPrimitiveRestart.swift:61-70 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift: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 (10 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:429 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:429-438 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:558-567 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:429` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2162 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2162-2171 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2465-2474 — both copies are in the same file, so extract the 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:492 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:492-501 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:592-601 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:492` it does not close everything it opens, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsGraft.swift:29 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsGraft.swift:29-38 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:211-220 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:110 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:110-119 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:163-172 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:867 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:867-876 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4201-4210 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1604 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1604-1613 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1750-1759 — both copies are in the same file, so extract the 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/MachOParser.swift:90 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/MachOParser.swift:90-99 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/MachOParser.swift:120-129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/MachOParser.swift:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:43 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:43-52 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:85-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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:43` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×11
  • Edited copy of a member (9 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDebugModel.swift:121 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDebugModel.swift:121-129 | VPhoneKit/VPhoneExternalAccessKit/VPhoneAPIClient.swift:12-27 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:214 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:214-222 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:259-269 — 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) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift:237 — VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift:237-245 | VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift:128-136 — 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:274 — VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:274-282 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUDPForwarder.swift: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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareDownloadCommand.swift:116 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareDownloadCommand.swift:116-125 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneMachineTemplateTrimmer.swift:194-202 — 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) VPhoneDaemon/Daemon/GuestPortForwardHandler.swift:149 — VPhoneDaemon/Daemon/GuestPortForwardHandler.swift:149-162 | VPhoneDaemon/Daemon/GuestShellSessionHandler.swift:412-420 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:265 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:265-276 | VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCGPUDriver.swift:90-98 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserModel.swift:107 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserModel.swift:107-115 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserModel.swift:129-141 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:701 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:701-709 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:227-235 — 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) VPhoneKit/VPhoneCoreKit/Process/VPhoneManagedProcess.swift:162 — VPhoneKit/VPhoneCoreKit/Process/VPhoneManagedProcess.swift:162-170 | VPhoneKit/VPhoneCoreKit/Process/VPhoneManagedProcess.swift:178-189 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift:25 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift:25-36 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareRestoreImagePatchSet.swift:71-79 — 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 (8 corresponding lines) · ×11
  • Edited copy of a member (8 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDounmount.swift:83 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDounmount.swift:83-90 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDounmount.swift:93-100 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDiskImages2.swift:231 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDiskImages2.swift:231-244 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDiskImages2.swift:247-254 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:459 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:459-466 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2344-2353 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:61 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:61-68 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:72-79 — 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) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlCryptex.swift:145 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlCryptex.swift:145-152 | VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:107-114 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:318 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:318-325 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:227-234 — 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) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:681 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:681-688 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1162-1176 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineLeasesCommand.swift:156 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineLeasesCommand.swift:156-163 | VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:1003-1011 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:430 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:430-437 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:439-446 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:637 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:637-644 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:840-850 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:162 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:162-169 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/FirmwareManifest.swift:514-521 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (5 corresponding lines) · ×11
  • Edited copy of a member (5 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:328 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:328-332 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:342-347 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:465 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:465-470 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchFpfsScopedOpen.swift:98-102 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:120 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:120-124 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:282-287 — 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) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:831 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:831-835 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:839-843 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:370 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:370-374 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:149-153 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:464 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:464-469 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:332-336 — 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) VPhoneDaemon/Daemon/GuestPointerScroll.swift:107 — VPhoneDaemon/Daemon/GuestPointerScroll.swift:107-113 | VPhoneDaemon/Daemon/GuestScreenshotSizing.swift:192-196 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:48 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:48-52 | VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignBytes.swift:32-36 — 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) Research/VPhoneVirtualMachineRefactored.swift:331 — Research/VPhoneVirtualMachineRefactored.swift:331-335 | VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:413-417 — 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) VPhoneDaemon/Daemon/GuestIconServicesCache.swift:47 — VPhoneDaemon/Daemon/GuestIconServicesCache.swift:47-51 | VPhoneDaemon/Daemon/GuestMobileGestaltCache.swift:141-145 — 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) VPhoneDaemon/Daemon/GuestSystemAppPolicy.swift:199 — VPhoneDaemon/Daemon/GuestSystemAppPolicy.swift:199-204 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheUndoLog.swift:263-267 — 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 (10 corresponding lines) · ×10
  • Edited copy of a member (10 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:477 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:477-486 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:623-632 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCollectionBuilder.swift:283 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCollectionBuilder.swift:283-292 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneMachineTemplateTrimmer.swift:181-192 — 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) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1088 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1088-1097 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1101-1110 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1110 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1110-1119 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplateKey.swift:472-482 — 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:689 — VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:689-700 | VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:702-711 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2356 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2356-2365 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2368-2377 — 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) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:894 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:894-903 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1123-1132 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneLocalization.swift:19 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneLocalization.swift:19-28 | VPhoneKit/VPhoneCoreKit/Firmware/VPhoneInstallPackage.swift:23-32 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift:154 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherManifest.swift:154-163 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/ManifestHashPatcher.swift:67-76 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchPresetStore.swift:425 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchPresetStore.swift:425-436 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchSetStore.swift:61-70 — 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 (11 corresponding lines) · ×9
  • Edited copy of a member (11 corresponding lines) VPhoneDaemon/Daemon/GuestShellSessionHandler.swift:400 — VPhoneDaemon/Daemon/GuestShellSessionHandler.swift:400-410 | VPhoneDaemon/Daemon/GuestWebSocketHandler.swift:60-72 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:247 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:247-257 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:293-305 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift:129 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift:129-139 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneBundleOperations.swift:159-169 — 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) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:486 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:486-498 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:517-527 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchSelection.swift:44 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchSelection.swift:44-54 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchSelection.swift:62-72 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneAlert.swift:22 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneAlert.swift:22-34 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneAlert.swift:36-46 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:155 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:155-165 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:178-188 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:108 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:108-124 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Fold/VPhoneFoldModel.swift:105-115 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift:27 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift:27-37 | VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift:15-25 — 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 (3 corresponding lines) · ×9
  • Edited copy of a member (3 corresponding lines) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:289 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:289-291 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachineManifest.swift:478-485 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneDaemon/Daemon/GuestIconServicesCache.swift:53 — VPhoneDaemon/Daemon/GuestIconServicesCache.swift:53-55 | VPhoneDaemon/Daemon/GuestMobileGestaltCache.swift:147-149 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift:93 — VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift:93-97 | VPhoneKit/VPhoneCoreKit/Firmware/VPhoneRemoteZip.swift:300-302 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneDaemon/Daemon/GuestAPI.swift:32 — VPhoneDaemon/Daemon/GuestAPI.swift:32-34 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCacheRecipes.swift:191-193 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneDaemon/Daemon/GuestAPI+Cryptex.swift:85 — VPhoneDaemon/Daemon/GuestAPI+Cryptex.swift:85-87 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlCryptex.swift:32-34 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareSourceSelection.swift:10 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareSourceSelection.swift:10-12 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineSelection.swift:9-11 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSnapshot.swift:69 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSnapshot.swift:69-71 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadTemplates.swift:260-262 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift:148 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneLaunchLayout.swift:148-150 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskHolder.swift:54-56 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (3 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:65 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:65-67 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift:40-42 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×8
  • Duplicated block (9 lines × 2) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:213 — VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:213-221 | VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:417-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 `VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:213` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:212` calls `NSNull` and `VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:416` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:819 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:819-827 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:313-321 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:148 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:148-156 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUPrimitiveRestart.swift:99-107 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift:124 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift:124-133 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift:154-162 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:718 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:718-726 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:793-801 — both copies are in the same file, so extract the 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) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+InitialPackages.swift:74 — VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+InitialPackages.swift:74-82 | VPhoneDaemon/Daemon/GuestScriptSession.swift:126-134 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:373 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:373-381 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:434-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:373` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:848 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:848-856 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:982-990 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×8
  • Duplicated block (6 lines × 3) VPhoneDaemon/Daemon/GuestAPIAttitudeMethods.swift:11 — VPhoneDaemon/Daemon/GuestAPIAttitudeMethods.swift:11-16 | VPhoneDaemon/Daemon/GuestAPIAttitudeMethods.swift:18-23 | VPhoneDaemon/Daemon/GuestAPIAttitudeMethods.swift:25-30 — 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 `VPhoneDaemon/Daemon/GuestAPIAttitudeMethods.swift:11` it begins part-way through the construct above it, so those exact lines 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) VPhoneDaemon/Daemon/GuestAPIGyroscopeMethods.swift:11 — VPhoneDaemon/Daemon/GuestAPIGyroscopeMethods.swift:11-16 | VPhoneDaemon/Daemon/GuestAPIGyroscopeMethods.swift:18-23 | VPhoneDaemon/Daemon/GuestAPIGyroscopeMethods.swift:25-30 — 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 `VPhoneDaemon/Daemon/GuestAPIGyroscopeMethods.swift:11` it begins part-way through the construct above it, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:140 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:140-145 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:137-142 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:147-152 — 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. 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 (6 lines × 3) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileWindowController.swift:36 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileWindowController.swift:36-41 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainWindowController.swift:29-34 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Shell/VPhoneShellWindowController.swift:24-29 — 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (6 lines × 3) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:918 — VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:918-923 | VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:942-947 | VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:964-969 — 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 (6 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:18 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:18-23 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareLocationdCohorting.swift:15-20 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTVSetup.swift:14-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:18` it does not close everything it opens, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:521 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:521-526 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:362-367 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:704-709 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
  • Duplicated block (6 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:40 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:40-45 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:56-61 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:82-87 — 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:40` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Edited copy of a member (13 corresponding lines) · ×7
  • Edited copy of a member (13 corresponding lines) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:650 — VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:650-662 | VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift:197-209 — 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneOTAUpdate.swift:10 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneOTAUpdate.swift:10-28 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneOTAUpdate.swift:30-42 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:77 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:77-91 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPreset.swift:142-154 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:348 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:348-360 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:411-423 — 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) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplateKey.swift:44 — VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplateKey.swift:44-56 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:29-45 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:475 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:475-493 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:374-386 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:54 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:54-66 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:37-49 — 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 (17 corresponding lines) · ×6
  • Edited copy of a member (17 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:386 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:386-402 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:450-469 — 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) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:204 — VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:204-221 | VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:409-425 — 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) VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:451 — VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:451-467 | VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:478-497 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsam.swift:185 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsam.swift:185-201 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:175-192 — 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) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneRemoteZip.swift:157 — VPhoneKit/VPhoneCoreKit/Firmware/VPhoneRemoteZip.swift:157-173 | VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift:372-391 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift:199 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift:199-219 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheCameraPatcher.swift:224-240 — 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 copies of one member (3 members, 3+ corresponding lines) · ×6
  • Edited copies of one member (3 members, 3+ corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:23 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:23-25 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:24-26 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:107-114 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:27 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:27-29 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:28-30 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:116-123 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:31 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:31-33 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:32-34 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:125-130 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:15 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:15-17 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:16-18 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:93-98 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:19 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:19-21 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:20-22 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:100-105 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 3+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchPresetStore.swift:340 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchPresetStore.swift:340-342 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSetupBoot.swift:503-505 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadPatchCatalog.swift:366-368 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×5
  • Edited copy of a member (14 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:31 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:31-71 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:75-95 — 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) VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCache.swift:145 — VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCache.swift:145-160 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachine.swift:178-191 — 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) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineSnapshotCommand.swift:129 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineSnapshotCommand.swift:129-145 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineSnapshotCommand.swift:161-174 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:62 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:62-75 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2686-2699 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:139 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:139-152 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/FirmwareManifest.swift:497-511 — 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 (15 corresponding lines) · ×5
  • Edited copy of a member (15 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:850 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:850-864 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:938-954 — 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneUserspaceNetworkResponder.swift:311 — VPhoneKit/VPhoneCoreKit/Network/VPhoneUserspaceNetworkResponder.swift:311-333 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUserspaceNetworkResponder.swift:385-399 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift:114 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift:114-128 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneGuestDevice.swift:187-202 — 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) VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:392 — VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:392-406 | VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift:45-61 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:32 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchDeclaration.swift:32-46 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPreset.swift:58-72 — 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 copies of one member (3 members, 6+ corresponding lines) · ×5
  • Edited copies of one member (3 members, 6+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:261 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:261-266 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:276-281 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:288-294 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:142 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:142-147 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:102-110 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:157-165 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:462 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:462-467 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:504-509 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift:315-321 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:187 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:187-192 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:252-257 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchThreadSetState.swift:94-99 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 6+ corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardModel.swift:64 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardModel.swift:64-69 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestPreferencesModel.swift:126-131 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/CrashLogs/VPhoneCrashLogsModel.swift:176-181 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:64 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:64-75 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2688-2699 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:64` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:488 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:488-499 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1131-1142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:114 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:114-125 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchSandboxExtended.swift:137-148 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchSandboxExtended.swift:150` calls `log` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:128` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:531 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:531-542 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:696-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:531` it does not close everything it opens, so those exact lines 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) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:77 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:77-88 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:78-89 — before extracting anything, compare `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift` and `Research/Guest/SettingsRows/ReviewedProviderPatch.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:77` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those 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) · ×5
  • Duplicated block (11 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:56 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:56-66 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:39-49 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (11 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:214 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:214-224 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:336-346 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:214` it begins part-way through the construct above it, so those 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardView.swift:18 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardView.swift:18-28 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestPreferencesView.swift:20-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardView.swift:18` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:1197 — VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:1197-1207 | VPhoneLaunchpad/VPhoneLaunchpadCLI/main.swift:137-147 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:1197` it does not close everything it opens, so those exact lines 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:284 — VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:284-294 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUDPForwarder.swift:132-142 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×5
  • Swallowed exception (caught, then discarded) VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift:182 — `catch` 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) VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHostSetup.swift:248 — `catch` 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:148 — `catch` 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/HomePod/VPhoneHomePodDisplayView.swift:218 — `catch` 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:478 — `catch` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×4
  • Members sharing a duplicated core (4 members, 50+ identical tokens) VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift:11 — VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift:11-27 | VPhoneDaemon/Daemon/GuestAPI+HomeViewDistance.swift:9-24 | VPhoneDaemon/Daemon/GuestAPI+VisionOSImmersion.swift:9-49 | VPhoneDaemon/Daemon/GuestHomePodDisplay.swift:15-25 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1181 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1181-1276 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1306-1416 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1487-1554 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1875-1947 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:33 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:33-126 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:134-198 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:204-273 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:282-368 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:14 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:14-53 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchPortToMap.swift:14-67 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:38-96 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchParavirtUserClients.swift:54-139 — 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 (18 corresponding lines) · ×4
  • Edited copy of a member (18 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2499 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2499-2522 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:126-143 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:18 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBluetoothVirtualController.swift:18-38 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareJetsamDisableAllowed.swift:24-41 — 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) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:184 — VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:184-202 | VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift:80-97 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:290 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:290-307 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:311-328 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×4
  • Edited copy of a member (21 corresponding lines) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchTarget.swift:88 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchTarget.swift:88-108 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhoneVersionRequirement.swift:104-124 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:143 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:143-163 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:168-189 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:340 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:340-360 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:679-702 — 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) VPhoneKit/VPhoneCoreKit/Network/VPhoneUserspaceNetwork.swift:239 — VPhoneKit/VPhoneCoreKit/Network/VPhoneUserspaceNetwork.swift:239-259 | VPhoneKit/VPhoneCoreKit/Network/VPhoneUserspaceNetwork.swift:261-285 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (12 corresponding lines) · ×4
  • Edited copy of a member (12 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlAttitude.swift:23 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlAttitude.swift:23-34 | VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControlGyroscope.swift:25-37 — 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPreset.swift:184 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPreset.swift:184-195 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchSelection.swift:101-113 — 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) VPhoneDaemon/Daemon/GuestAPI+Device.swift:653 — VPhoneDaemon/Daemon/GuestAPI+Device.swift:653-664 | VPhoneDaemon/Daemon/GuestAPI+Device.swift:668-679 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchBsdInitAuth.swift:130 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchBsdInitAuth.swift:130-141 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchBsdInitAuth.swift:184-199 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×4
  • Duplicated block (16 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:830 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:830-845 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:964-979 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:830` it does not close everything it opens, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:152 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:152-167 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:265-280 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift: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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (16 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:100 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:100-115 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchPostValidation.swift:16-31 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (16 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchDisplayRefresh.swift:41 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchDisplayRefresh.swift:41-56 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:56-71 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 (5 lines × 3) · ×4
  • Duplicated block (5 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift:290 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift:290-294 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift:95-99 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:275-279 — 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation+Anchoring.swift:290` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 3) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchHomeViewEnvironmentCommand.swift:19 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchHomeViewEnvironmentCommand.swift:19-23 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchQuartzCoreUnrotatedFramebufferCommand.swift:19-23 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchSettingsSoftwareUpdateCommand.swift:19-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchHomeViewEnvironmentCommand.swift:19` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:51 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:51-55 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:52-56 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:165-169 — before extracting anything, compare `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift` and `Research/Guest/SettingsRows/ReviewedProviderPatch.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:51` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:164` calls `InvalidImage`, `try`, `Int` and `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:51` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:445 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:445-449 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:809-813 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:160-164 — 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 `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:445` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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, `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:450` calls `first` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:165` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: VPhoneVirtualMachineKit — VPhoneVirtualMachineKit: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: VPhoneCoreKit — VPhoneCoreKit: abstractness 0.01, instability 0.00, distance 0.99 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: VPhoneSign — VPhoneSign: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: VPhonePatchKit — VPhonePatchKit: abstractness 0.08, instability 0.00, distance 0.92 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · Image.init (cyclomatic 21) · ×3
  • Image.init (cyclomatic 21) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:35 — Image.init 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.
  • Image.init (cyclomatic 21) Research/Guest/SettingsRows/ReviewedProviderPatch.swift:36 — Image.init 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.
  • Image.init (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:132 — Image.init 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.
D2 · Cognitive Complexity · Image.init (cognitive 39) · ×3
  • Image.init (cognitive 39) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:35 — Image.init has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (9 pts), boolean chains 6 (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.
  • Image.init (cognitive 39) Research/Guest/SettingsRows/ReviewedProviderPatch.swift:36 — Image.init has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (9 pts), boolean chains 6 (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.
  • Image.init (cognitive 39) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:132 — Image.init has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (9 pts), boolean chains 6 (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.
D35 · Change Coupling · Change-coupling hub · ×3
  • Change-coupling hub: VPhoneLaunchpadHelperService.swift → VPhoneLaunchpadControlCommands.swift, VPhoneLaunchpadHelperClient.swift, VPhoneLaunchpadControl.swift VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift — `VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift` changes together with 3 other files — `VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift`, `VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift`, `VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
  • Change-coupling hub: VPhoneCustomFirmwareInstaller.swift → CryptexFilesystemPatcherGuestPayload.swift, FirmwareDeviceTreePatchSet.swift, VPhoneCustomFirmwareMachOVerbsCommand.swift, VPhoneCustomFirmwarePatchCommand.swift VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift — `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift` changes together with 4 other files — `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift`, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareDeviceTreePatchSet.swift`, `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareMachOVerbsCommand.swift`, `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchCommand.swift` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
  • Change-coupling hub: VPhoneLaunchpadHelperFirmwareRequest.swift → VPhoneLaunchpadControlCommands.swift, VPhoneLaunchpadHelperClient.swift, VPhoneLaunchpadControl.swift, VPhoneLaunchpadHelperProtocol.swift VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperFirmwareRequest.swift — `VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperFirmwareRequest.swift` changes together with 4 other files — `VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift`, `VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift`, `VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift`, `VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadHelperProtocol.swift` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:131 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:131-149 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:154-172 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:176-194 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:636-654 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:680-698 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:65 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:65-85 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:51-71 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:48-68 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:54-77 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:50-70 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:262 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:262-284 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:306-325 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:347-369 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:391-413 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:466-488 — 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 (23 corresponding lines) · ×3
  • Edited copy of a member (23 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:217 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:217-239 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:200-229 — 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) VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:834 — VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:834-857 | VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:859-881 — 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) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:447 — VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:447-469 | VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:473-503 — 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 (20 corresponding lines) · ×3
  • Edited copy of a member (20 corresponding lines) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:154 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:154-173 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:193-212 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuApps.swift:76 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuApps.swift:76-95 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuApps.swift:133-154 — 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) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachineManifest.swift:596 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachineManifest.swift:596-615 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachineManifest.swift:620-639 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 4+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 4+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:479 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:479-482 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchThreadSetState.swift:119-124 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchVmMapDelete.swift:161-166 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:452 — VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:452-455 | VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSWCache.swift:162-165 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLocations.swift:77-80 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 4+ corresponding lines) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:457 — VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:457-460 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineSnapshots.swift:395-398 | VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift:1067-1070 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:339 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:339-352 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:388-401 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (14 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:359 — VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:359-372 | VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:407-420 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:359` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:389 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:389-402 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:456-469 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:389` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×3
  • Duplicated block (13 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:61 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:61-73 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioGraphConfigurations.swift:74-86 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:61` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:457 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:457-469 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:695-707 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:457` it begins part-way through the construct above it, so those exact lines 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1621 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1621-1633 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1770-1782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1621` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×3
  • Duplicated block (8–9 lines × 2) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:230 — VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:230-238 | VPhoneDaemon/Daemon/GuestAPI+Environment.swift:161-168 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8–9 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:71 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:71-79 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachLookupExceptions.swift:87-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareBuildVersion.swift:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8–9 lines × 2) VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperFirmwareRequest.swift:48 — VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperFirmwareRequest.swift:48-56 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperLeasesRequest.swift:22-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperFirmwareRequest.swift:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift:18 — VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift:18-25 | VPhoneDaemon/Daemon/GuestAPI+HomeViewDistance.swift:15-22 | VPhoneDaemon/Daemon/GuestAPI+VisionOSImmersion.swift:25-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 all 3 call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (8 lines × 3) VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:271 — VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:271-278 | VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:281-288 | VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:290-297 — 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 `VPhoneDaemon/Daemon/GuestAPICoreMethods.swift:271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 3) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2290 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2290-2297 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2915-2922 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2928-2935 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×3
  • Duplicated block (7–8 lines × 2) Research/VPhoneVirtualMachineRefactored.swift:339 — Research/VPhoneVirtualMachineRefactored.swift:339-346 | VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:505-511 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Research/VPhoneVirtualMachineRefactored.swift:339` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:514` calls `start` and `Research/VPhoneVirtualMachineRefactored.swift:348` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7–8 lines × 2) VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:66 — VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:66-72 | VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCGPUDriver.swift:110-117 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneKit/VPhoneCoreKit/Firmware/VPhonePCCCryptexctl.swift:66` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7–8 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchFpfsScopedOpen.swift:58 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchFpfsScopedOpen.swift:58-64 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchParavirtUserClients.swift:152-159 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchFpfsScopedOpen.swift: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.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1Audit.scan · ×2
  • CustomFirmwareArm64eX1Audit.scan::inspect (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:49 — CustomFirmwareArm64eX1Audit.scan::inspect has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 3 (6 pts), boolean chains 3, error handling 1, loops 1, match/switch 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (CustomFirmwareArm64eX1Audit.scan::visit) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • CustomFirmwareArm64eX1Audit.scan::visit (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:96 — CustomFirmwareArm64eX1Audit.scan::visit has cognitive complexity 18 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 2 (4 pts), match/switch 1 (4 pts), loops 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (CustomFirmwareArm64eX1Audit.scan::inspect) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Image.resolve (cognitive 17) · ×2
  • Image.resolve (cognitive 17) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:70 — Image.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Image.resolve (cognitive 17) Research/Guest/SettingsRows/ReviewedProviderPatch.swift:71 — Image.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (43 corresponding lines) · ×2
  • Edited copy of a member (43 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:728 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:728-770 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:179-224 — These two members are one piece of code written twice and then edited apart: 43 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (43 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:155 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:155-198 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:205-247 — 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 (39 corresponding lines) · ×2
  • Edited copy of a member (39 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:530 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:530-568 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:695-738 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (39 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchLaunchConstraints.swift:27 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchLaunchConstraints.swift:27-72 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:17-55 — These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2158 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2158-2186 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2461-2485 — 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) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuRecord.swift:70 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuRecord.swift:70-94 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuRecord.swift:96-121 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 10+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:246 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:246-255 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:325-335 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:104-115 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 10+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchHomeViewEnvironmentCommand.swift:14 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchHomeViewEnvironmentCommand.swift:14-23 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchQuartzCoreUnrotatedFramebufferCommand.swift:14-23 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwarePatchSettingsSoftwareUpdateCommand.swift:14-23 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (26 corresponding lines) · ×2
  • Edited copy of a member (26 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppWindowController.swift:31 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppWindowController.swift:31-60 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestToolsWindowController.swift:100-125 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (26 corresponding lines) VPhoneDaemon/Daemon/GuestPortForwardHandler.swift:72 — VPhoneDaemon/Daemon/GuestPortForwardHandler.swift:72-115 | VPhoneDaemon/Daemon/GuestShellSessionHandler.swift:292-317 — 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 (16 corresponding lines) · ×2
  • Edited copy of a member (16 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift:227 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift:227-242 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift:250-270 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:130 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:130-151 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift:363-378 — 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 copies of one member (3 members, 7+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 7+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:383 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:383-389 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchVmMapDelete.swift:170-178 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:334-340 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift:20 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Apps/VPhoneAppBrowserModel.swift:20-27 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Console/VPhoneConsoleEntry.swift:119-125 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Services/VPhoneServicesModel.swift:17-24 — 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 (5 members, 16+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 16+ corresponding lines) VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:250 — VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:250-267 | VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:271-286 | VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:290-305 | VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:309-324 | VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:328-343 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 16+ corresponding lines) VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:83 — VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:83-99 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:101-116 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:118-133 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:135-150 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:152-167 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 4+ corresponding lines) · ×2
  • Edited copies of one member (5 members, 4+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:241 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:241-244 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:323-326 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:99-102 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:323-326 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift:87-93 — These 5 members are one piece of code written 5 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 5 times and the copies will drift further apart.
  • Edited copies of one member (5 members, 4+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:200 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:200-203 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:205-208 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:117-122 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:181-186 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:188-193 — These 5 members are one piece of code written 5 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 5 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:34 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:34-50 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:56-68 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:288-301 — 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:106 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:106-121 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:97-109 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SPTM/SPTMSecondaryCPUPatcher.swift:101-113 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 11+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:335 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:335-349 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:431-441 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Restore/VPhoneRestoreCommand.swift:480-490 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 11+ corresponding lines) VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:39 — VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:39-55 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:57-67 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperService.swift:69-79 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:805 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:805-825 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:939-959 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:805` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
  • Duplicated block (21 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:142 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:142-162 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:236-256 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×2
  • Duplicated block (18–19 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:378 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:378-395 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:486-504 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:378` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18–19 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:42 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:42-60 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchParavirtUserClients.swift:60-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift: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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:66 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:66-81 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift:38-52 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:82` calls `w` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift:53` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (15 lines × 2) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:39 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:39-53 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainBrowserView.swift:28-42 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileBrowserView.swift:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 6) · ×2
  • Duplicated block (5 lines × 6) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:477 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:477-483 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:619-623 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:725-731 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:863-869 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:997-1003 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1120-1126 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 6) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1684 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1684-1688 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1869-1873 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1886-1890 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1901-1905 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1914-1918 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1927-1933 — all 6 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1684` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.applyGuestPatches (cyclomatic 309) · ×1
  • VPhoneCustomFirmwareInstaller.applyGuestPatches (cyclomatic 309) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358 — VPhoneCustomFirmwareInstaller.applyGuestPatches has cyclomatic complexity 309 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: one other method here (VPhoneCustomFirmwareInstaller.applyGuestPatches::on) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.run (cyclomatic 148) · ×1
  • VPhoneCustomFirmwareInstaller.run (cyclomatic 148) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:142 — VPhoneCustomFirmwareInstaller.run has cyclomatic complexity 148 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · KernelCustomFirmwarePatcher.revealCSSCHandler (cyclomatic 105) · ×1
  • KernelCustomFirmwarePatcher.revealCSSCHandler (cyclomatic 105) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchCSSC.swift:21 — KernelCustomFirmwarePatcher.revealCSSCHandler has cyclomatic complexity 105 (threshold 15). Of this number, 91 points are the body's own statements and 14 belong to 4 function items inside it that branch. 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 · GuestAPI.executeCore (cyclomatic 104) · ×1
  • GuestAPI.executeCore (cyclomatic 104) VPhoneDaemon/Daemon/GuestAPI.swift:182 — GuestAPI.executeCore has cyclomatic complexity 104 (threshold 15). To reduce it, separate the cases: extract each independent 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 · KDKRecovery.synthesizeSymbols (cyclomatic 96) · ×1
  • KDKRecovery.synthesizeSymbols (cyclomatic 96) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift:59 — KDKRecovery.synthesizeSymbols has cyclomatic complexity 96 (threshold 15). Of this number, 78 points are the body's own statements and 18 belong to 6 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TXMDevPatcher.patchExecutableRemap (cyclomatic 93) · ×1
  • TXMDevPatcher.patchExecutableRemap (cyclomatic 93) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:18 — TXMDevPatcher.patchExecutableRemap has cyclomatic complexity 93 (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 · CustomFirmwareParavirtGPUCompilerCache.resolve (cyclomatic 85) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.resolve (cyclomatic 85) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:90 — CustomFirmwareParavirtGPUCompilerCache.resolve has cyclomatic complexity 85 (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 · DyldSharedCacheGLESDepthClipPatcher.findSite (cyclomatic 84) · ×1
  • DyldSharedCacheGLESDepthClipPatcher.findSite (cyclomatic 84) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:112 — DyldSharedCacheGLESDepthClipPatcher.findSite has cyclomatic complexity 84 (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 · CustomFirmwareArm64eX1.authenticatedDispatch (cyclomatic 79) · ×1
  • CustomFirmwareArm64eX1.authenticatedDispatch (cyclomatic 79) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:422 — CustomFirmwareArm64eX1.authenticatedDispatch has cyclomatic complexity 79 (threshold 15). Of this number, 70 points are the body's own statements and 9 belong to 2 function items inside it that branch. 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 · DyldSharedCacheSettingsRowsPatcher.discover (cyclomatic 76) · ×1
  • DyldSharedCacheSettingsRowsPatcher.discover (cyclomatic 76) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheSettingsRowsPatcher.swift:23 — DyldSharedCacheSettingsRowsPatcher.discover has cyclomatic complexity 76 (threshold 15). Of this number, 72 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.pvIdentityHelpers (cyclomatic 72) · ×1
  • KernelCustomFirmwarePatcher.pvIdentityHelpers (cyclomatic 72) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:410 — KernelCustomFirmwarePatcher.pvIdentityHelpers has cyclomatic complexity 72 (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 · DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields (cyclomatic 72) · ×1
  • DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields (cyclomatic 72) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:155 — DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields has cyclomatic complexity 72 (threshold 15). Of this number, 64 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CustomFirmwareTVTPRO.discover (cyclomatic 65) · ×1
  • CustomFirmwareTVTPRO.discover (cyclomatic 65) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareTVTPRO.swift:152 — CustomFirmwareTVTPRO.discover has cyclomatic complexity 65 (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 · FirmwarePipeline.buildComponentList (cyclomatic 64) · ×1
  • FirmwarePipeline.buildComponentList (cyclomatic 64) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift:52 — FirmwarePipeline.buildComponentList has cyclomatic complexity 64 (threshold 15). Of this number, 61 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · CustomFirmwareArm64eX1.planCode (cyclomatic 60) · ×1
  • CustomFirmwareArm64eX1.planCode (cyclomatic 60) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:214 — CustomFirmwareArm64eX1.planCode has cyclomatic complexity 60 (threshold 15). Of this number, 54 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.findSite (cyclomatic 60) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.findSite (cyclomatic 60) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:122 — DyldSharedCacheMetalCacheReusePatcher.findSite has cyclomatic complexity 60 (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 · GuestAPI.executeDevice (cyclomatic 59) · ×1
  • GuestAPI.executeDevice (cyclomatic 59) VPhoneDaemon/Daemon/GuestAPI+Device.swift:62 — GuestAPI.executeDevice has cyclomatic complexity 59 (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 · ReviewedProviderPatch.swift.top-level code (cyclomatic 58) · ×1
  • ReviewedProviderPatch.swift.top-level code (cyclomatic 58) Research/Guest/SettingsRows/ReviewedProviderPatch.swift:94 — ReviewedProviderPatch.swift.top-level code has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneVirtualMachineAppDelegate.startVirtualMachine (cyclomatic 56) · ×1
  • VPhoneVirtualMachineAppDelegate.startVirtualMachine (cyclomatic 56) VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:79 — VPhoneVirtualMachineAppDelegate.startVirtualMachine has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneHostAutomationServer.respond (cyclomatic 54) · ×1
  • VPhoneHostAutomationServer.respond (cyclomatic 54) VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift:184 — VPhoneHostAutomationServer.respond has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.patchPreboot (cyclomatic 54) · ×1
  • VPhoneCustomFirmwareInstaller.patchPreboot (cyclomatic 54) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4085 — VPhoneCustomFirmwareInstaller.patchPreboot has cyclomatic complexity 54 (threshold 15). Of this number, 52 points are the body's own statements and 2 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneFirmwarePreparer.prepare (cyclomatic 54) · ×1
  • VPhoneFirmwarePreparer.prepare (cyclomatic 54) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift:34 — VPhoneFirmwarePreparer.prepare has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KDKImageExport.adjustReferences (cyclomatic 54) · ×1
  • KDKImageExport.adjustReferences (cyclomatic 54) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportReferences.swift:15 — KDKImageExport.adjustReferences has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GuestAPI.setDevicePose (cyclomatic 52) · ×1
  • GuestAPI.setDevicePose (cyclomatic 52) VPhoneDaemon/Daemon/GuestAPI+Device.swift:334 — GuestAPI.setDevicePose has cyclomatic complexity 52 (threshold 15). Of this number, 44 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · KDKImageExport.layout (cyclomatic 52) · ×1
  • KDKImageExport.layout (cyclomatic 52) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKImageExport.swift:183 — KDKImageExport.layout has cyclomatic complexity 52 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GameCenterStandalonePatch.swift.top-level code (cyclomatic 51) · ×1
  • GameCenterStandalonePatch.swift.top-level code (cyclomatic 51) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:94 — GameCenterStandalonePatch.swift.top-level code 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 · CustomFirmwareArm64eX1.switchTable (cyclomatic 49) · ×1
  • CustomFirmwareArm64eX1.switchTable (cyclomatic 49) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:492 — CustomFirmwareArm64eX1.switchTable has cyclomatic complexity 49 (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 · CustomFirmwareSettingsRows.gameCenterEdits (cyclomatic 49) · ×1
  • CustomFirmwareSettingsRows.gameCenterEdits (cyclomatic 49) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:281 — CustomFirmwareSettingsRows.gameCenterEdits has cyclomatic complexity 49 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneLaunchpadCreationPipeline.perform (cyclomatic 48) · ×1
  • VPhoneLaunchpadCreationPipeline.perform (cyclomatic 48) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift:388 — VPhoneLaunchpadCreationPipeline.perform has cyclomatic complexity 48 (threshold 15). Of this number, 47 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · KernelCustomFirmwarePatcher.paravirtTaskIdentity (cyclomatic 48) · ×1
  • KernelCustomFirmwarePatcher.paravirtTaskIdentity (cyclomatic 48) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:241 — KernelCustomFirmwarePatcher.paravirtTaskIdentity has cyclomatic complexity 48 (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 · TXMDevPatcher.patchPrecheckForcePass (cyclomatic 48) · ×1
  • TXMDevPatcher.patchPrecheckForcePass (cyclomatic 48) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:303 — TXMDevPatcher.patchPrecheckForcePass has cyclomatic complexity 48 (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 · DyldSharedCacheHomeViewEnvironmentPatcher.findSites (cyclomatic 48) · ×1
  • DyldSharedCacheHomeViewEnvironmentPatcher.findSites (cyclomatic 48) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:131 — DyldSharedCacheHomeViewEnvironmentPatcher.findSites has cyclomatic complexity 48 (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 · KernelCustomFirmwarePatcher.findCsBypassGate (cyclomatic 47) · ×1
  • KernelCustomFirmwarePatcher.findCsBypassGate (cyclomatic 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:80 — KernelCustomFirmwarePatcher.findCsBypassGate has cyclomatic complexity 47 (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 · DyldSharedCacheTextRecognitionANEPatcher.findSite (cyclomatic 47) · ×1
  • DyldSharedCacheTextRecognitionANEPatcher.findSite (cyclomatic 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:139 — DyldSharedCacheTextRecognitionANEPatcher.findSite has cyclomatic complexity 47 (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 · GuestAPI.updateOTASystemApps (cyclomatic 45) · ×1
  • GuestAPI.updateOTASystemApps (cyclomatic 45) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:48 — GuestAPI.updateOTASystemApps has cyclomatic complexity 45 (threshold 15). Of this number, 40 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · TXMDevPatcher.remapLibraryCompatibility (cyclomatic 45) · ×1
  • TXMDevPatcher.remapLibraryCompatibility (cyclomatic 45) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:182 — TXMDevPatcher.remapLibraryCompatibility has cyclomatic complexity 45 (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 · DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness (cyclomatic 45) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness (cyclomatic 45) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:188 — DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness has cyclomatic complexity 45 (threshold 15). Of this number, 30 points are the body's own statements and 15 belong to 2 function items inside it that branch. 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 · CustomFirmwareSettingsRows.providerEdits (cyclomatic 45) · ×1
  • CustomFirmwareSettingsRows.providerEdits (cyclomatic 45) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:205 — CustomFirmwareSettingsRows.providerEdits has cyclomatic complexity 45 (threshold 15). To reduce it, separate the cases: extract each independent 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 · TXMDevPatcher.remapMissingProfileCompatibility (cyclomatic 43) · ×1
  • TXMDevPatcher.remapMissingProfileCompatibility (cyclomatic 43) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift:11 — TXMDevPatcher.remapMissingProfileCompatibility has cyclomatic complexity 43 (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 · CustomFirmwareVisionOSFramePacing.locate (cyclomatic 43) · ×1
  • CustomFirmwareVisionOSFramePacing.locate (cyclomatic 43) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:93 — CustomFirmwareVisionOSFramePacing.locate has cyclomatic complexity 43 (threshold 15). Of this number, 39 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GuestIrisinInstaller.performInstall (cyclomatic 42) · ×1
  • GuestIrisinInstaller.performInstall (cyclomatic 42) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:250 — GuestIrisinInstaller.performInstall has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent 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 · KernelCustomFirmwarePatcher.scanRange (cyclomatic 42) · ×1
  • KernelCustomFirmwarePatcher.scanRange (cyclomatic 42) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:126 — KernelCustomFirmwarePatcher.scanRange has cyclomatic complexity 42 (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 · DyldSharedCacheArm64eX1BootstrapPatcher.planImage (cyclomatic 40) · ×1
  • DyldSharedCacheArm64eX1BootstrapPatcher.planImage (cyclomatic 40) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:355 — DyldSharedCacheArm64eX1BootstrapPatcher.planImage has cyclomatic complexity 40 (threshold 15). Of this number, 37 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · KernelCustomFirmwarePatcher.patchArm64eX1Admission (cyclomatic 39) · ×1
  • KernelCustomFirmwarePatcher.patchArm64eX1Admission (cyclomatic 39) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:7 — KernelCustomFirmwarePatcher.patchArm64eX1Admission 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 · VPhoneLaunchpadControlRequest.parse (cyclomatic 38) · ×1
  • VPhoneLaunchpadControlRequest.parse (cyclomatic 38) VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift:233 — VPhoneLaunchpadControlRequest.parse 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 · KernelCustomFirmwarePatcher.x1ExecPACGate (cyclomatic 38) · ×1
  • KernelCustomFirmwarePatcher.x1ExecPACGate (cyclomatic 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:165 — KernelCustomFirmwarePatcher.x1ExecPACGate has cyclomatic complexity 38 (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 · CustomFirmwareArm64eX1.exceptionEntries (cyclomatic 38) · ×1
  • CustomFirmwareArm64eX1.exceptionEntries (cyclomatic 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:342 — CustomFirmwareArm64eX1.exceptionEntries has cyclomatic complexity 38 (threshold 15). Of this number, 32 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DyldSharedCacheGLESPointDrawPatcher.containsDraw (cyclomatic 38) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.containsDraw (cyclomatic 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:281 — DyldSharedCacheGLESPointDrawPatcher.containsDraw has cyclomatic complexity 38 (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 · DyldSharedCacheIOS16SurfaceAdapter.prepare (cyclomatic 38) · ×1
  • DyldSharedCacheIOS16SurfaceAdapter.prepare (cyclomatic 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOS16SurfaceAdapter.swift:22 — DyldSharedCacheIOS16SurfaceAdapter.prepare has cyclomatic complexity 38 (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 · KernelCustomFirmwarePatcher.pvOwnerOffset (cyclomatic 37) · ×1
  • KernelCustomFirmwarePatcher.pvOwnerOffset (cyclomatic 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:379 — KernelCustomFirmwarePatcher.pvOwnerOffset has cyclomatic complexity 37 (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 · CustomFirmwareRemotePairing.rejectsLocalConnection (cyclomatic 37) · ×1
  • CustomFirmwareRemotePairing.rejectsLocalConnection (cyclomatic 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:142 — CustomFirmwareRemotePairing.rejectsLocalConnection has cyclomatic complexity 37 (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 · DyldSharedCacheGLESPointDrawPatcher.sites (cyclomatic 36) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.sites (cyclomatic 36) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:237 — DyldSharedCacheGLESPointDrawPatcher.sites has cyclomatic complexity 36 (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 · KernelCustomFirmwarePatcher.tproGuardFlagVA (cyclomatic 35) · ×1
  • KernelCustomFirmwarePatcher.tproGuardFlagVA (cyclomatic 35) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchTproOff.swift:86 — KernelCustomFirmwarePatcher.tproGuardFlagVA has cyclomatic complexity 35 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.findForkEntryLink (cyclomatic 34) · ×1
  • KernelCustomFirmwarePatcher.findForkEntryLink (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:220 — KernelCustomFirmwarePatcher.findForkEntryLink has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.x1ExecSharedRegionGate (cyclomatic 34) · ×1
  • KernelCustomFirmwarePatcher.x1ExecSharedRegionGate (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:104 — KernelCustomFirmwarePatcher.x1ExecSharedRegionGate has cyclomatic complexity 34 (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 · KernelPatcher.patchExcGuardBehavior (cyclomatic 34) · ×1
  • KernelPatcher.patchExcGuardBehavior (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchExcGuard.swift:32 — KernelPatcher.patchExcGuardBehavior has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TXMDevPatcher.patchSelector24ForcePass (cyclomatic 34) · ×1
  • TXMDevPatcher.patchSelector24ForcePass (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:420 — TXMDevPatcher.patchSelector24ForcePass has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DyldSharedCacheMachPortsPatcher.prepare (cyclomatic 34) · ×1
  • DyldSharedCacheMachPortsPatcher.prepare (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMachPortsPatcher.swift:15 — DyldSharedCacheMachPortsPatcher.prepare has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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 · KDKRecovery.track (cyclomatic 34) · ×1
  • KDKRecovery.track (cyclomatic 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:52 — KDKRecovery.track has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.findWriteDowngradeGate (cyclomatic 32) · ×1
  • KernelCustomFirmwarePatcher.findWriteDowngradeGate (cyclomatic 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:246 — KernelCustomFirmwarePatcher.findWriteDowngradeGate has cyclomatic complexity 32 (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 · SEPResearchBoardPatcher.dispatchTable (cyclomatic 32) · ×1
  • SEPResearchBoardPatcher.dispatchTable (cyclomatic 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SEP/SEPResearchBoardPatcher.swift:158 — SEPResearchBoardPatcher.dispatchTable has cyclomatic complexity 32 (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 · CustomFirmwareRemotePairing.locate (cyclomatic 32) · ×1
  • CustomFirmwareRemotePairing.locate (cyclomatic 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:45 — CustomFirmwareRemotePairing.locate has cyclomatic complexity 32 (threshold 15). Of this number, 27 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomFirmwareVirtualAudio.epilogueEntry (cyclomatic 32) · ×1
  • CustomFirmwareVirtualAudio.epilogueEntry (cyclomatic 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2606 — CustomFirmwareVirtualAudio.epilogueEntry has cyclomatic complexity 32 (threshold 15). Of this number, 31 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.applyDyldPatches (cyclomatic 31) · ×1
  • VPhoneCustomFirmwareInstaller.applyDyldPatches (cyclomatic 31) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2995 — VPhoneCustomFirmwareInstaller.applyDyldPatches has cyclomatic complexity 31 (threshold 15). Of this number, 21 points are the body's own statements and 10 belong to 2 function items inside it that branch. 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 · CustomFirmwareArm64eX1.entryPoints (cyclomatic 31) · ×1
  • CustomFirmwareArm64eX1.entryPoints (cyclomatic 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:664 — CustomFirmwareArm64eX1.entryPoints 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 · DyldSharedCacheArm64eX1BootstrapPatcher.lower (cyclomatic 31) · ×1
  • DyldSharedCacheArm64eX1BootstrapPatcher.lower (cyclomatic 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:114 — DyldSharedCacheArm64eX1BootstrapPatcher.lower 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 · VPhoneNetworking.merge (cyclomatic 30) · ×1
  • VPhoneNetworking.merge (cyclomatic 30) VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift:510 — VPhoneNetworking.merge 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 · VPhoneLaunchpadControlCommands.startCreation (cyclomatic 30) · ×1
  • VPhoneLaunchpadControlCommands.startCreation (cyclomatic 30) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:526 — VPhoneLaunchpadControlCommands.startCreation has cyclomatic complexity 30 (threshold 15). Of this number, 27 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · MachOSymbolTargets.init (cyclomatic 30) · ×1
  • MachOSymbolTargets.init (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOSymbolTargets.swift:52 — MachOSymbolTargets.init 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 · KernelCustomFirmwarePatcher.matchUpstreamTaskForPidGate (cyclomatic 30) · ×1
  • KernelCustomFirmwarePatcher.matchUpstreamTaskForPidGate (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:68 — KernelCustomFirmwarePatcher.matchUpstreamTaskForPidGate has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SPTMSecondaryCPUPatcher.tunableBranches (cyclomatic 30) · ×1
  • SPTMSecondaryCPUPatcher.tunableBranches (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SPTM/SPTMSecondaryCPUPatcher.swift:120 — SPTMSecondaryCPUPatcher.tunableBranches has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhonePatchCatalogReport.text (cyclomatic 30) · ×1
  • VPhonePatchCatalogReport.text (cyclomatic 30) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchCatalogReport.swift:323 — VPhonePatchCatalogReport.text 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 · VPhoneVirtualMachineCreateCommand.validate (cyclomatic 30) · ×1
  • VPhoneVirtualMachineCreateCommand.validate (cyclomatic 30) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift:164 — VPhoneVirtualMachineCreateCommand.validate 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 · VPhoneVirtualMachine.init (cyclomatic 30) · ×1
  • VPhoneVirtualMachine.init (cyclomatic 30) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:73 — VPhoneVirtualMachine.init has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · KDKImageExport.importOrder (cyclomatic 30) · ×1
  • KDKImageExport.importOrder (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportFixups.swift:32 — KDKImageExport.importOrder 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 · KDKInstruction.writes (cyclomatic 30) · ×1
  • KDKInstruction.writes (cyclomatic 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKInstruction.swift:74 — KDKInstruction.writes has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GuestHyperTextHandler.channelRead (cyclomatic 29) · ×1
  • GuestHyperTextHandler.channelRead (cyclomatic 29) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:26 — GuestHyperTextHandler.channelRead has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: GuestHyperTextHandler.route (cyclomatic 44) 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 · VPhoneOTAArchive.validatePayloadPaths (cyclomatic 29) · ×1
  • VPhoneOTAArchive.validatePayloadPaths (cyclomatic 29) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:604 — VPhoneOTAArchive.validatePayloadPaths has cyclomatic complexity 29 (threshold 15). Of this number, 24 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · KernelCustomFirmwarePatcher.buildForkInheritCave (cyclomatic 29) · ×1
  • KernelCustomFirmwarePatcher.buildForkInheritCave (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:333 — KernelCustomFirmwarePatcher.buildForkInheritCave has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to one function item inside it that branches. 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 · VPhoneArm64eX1Lowering.replacement (cyclomatic 29) · ×1
  • VPhoneArm64eX1Lowering.replacement (cyclomatic 29) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/VPhoneArm64eX1Lowering.swift:9 — VPhoneArm64eX1Lowering.replacement has cyclomatic complexity 29 (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 · VPhoneGuestControl.probe (cyclomatic 29) · ×1
  • VPhoneGuestControl.probe (cyclomatic 29) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:327 — VPhoneGuestControl.probe 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 · CustomFirmwareArm64eX1Installation.update (cyclomatic 29) · ×1
  • CustomFirmwareArm64eX1Installation.update (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Installation.swift:19 — CustomFirmwareArm64eX1Installation.update 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 · KDKRecovery.followJumpTable (cyclomatic 29) · ×1
  • KDKRecovery.followJumpTable (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:157 — KDKRecovery.followJumpTable has cyclomatic complexity 29 (threshold 15). Of this number, 27 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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 · CustomFirmwareVirtualAudio.gatedDeviceStateSite (cyclomatic 29) · ×1
  • CustomFirmwareVirtualAudio.gatedDeviceStateSite (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1958 — CustomFirmwareVirtualAudio.gatedDeviceStateSite has cyclomatic complexity 29 (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 · CustomFirmwareVirtualAudio.terminateSite (cyclomatic 29) · ×1
  • CustomFirmwareVirtualAudio.terminateSite (cyclomatic 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2192 — CustomFirmwareVirtualAudio.terminateSite 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 · IBootPatcher.patchBootxPrecondition (cyclomatic 28) · ×1
  • IBootPatcher.patchBootxPrecondition (cyclomatic 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:31 — IBootPatcher.patchBootxPrecondition 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 · KernelCustomFirmwarePatcher.patchPostValidationAdditional (cyclomatic 28) · ×1
  • KernelCustomFirmwarePatcher.patchPostValidationAdditional (cyclomatic 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchPostValidation.swift:14 — KernelCustomFirmwarePatcher.patchPostValidationAdditional 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 · KernelCustomFirmwarePatcher.x1GradeTail (cyclomatic 28) · ×1
  • KernelCustomFirmwarePatcher.x1GradeTail (cyclomatic 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:147 — KernelCustomFirmwarePatcher.x1GradeTail has cyclomatic complexity 28 (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 · TXMDevPatcher.patchSelector42_29Shellcode (cyclomatic 28) · ×1
  • TXMDevPatcher.patchSelector42_29Shellcode (cyclomatic 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:578 — TXMDevPatcher.patchSelector42_29Shellcode 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 · VPhoneCustomFirmwareInstaller.runKernelUpdate (cyclomatic 28) · ×1
  • VPhoneCustomFirmwareInstaller.runKernelUpdate (cyclomatic 28) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:764 — VPhoneCustomFirmwareInstaller.runKernelUpdate 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 · CustomFirmwareVirtualAudio.locateVolumeGate (cyclomatic 28) · ×1
  • CustomFirmwareVirtualAudio.locateVolumeGate (cyclomatic 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1691 — CustomFirmwareVirtualAudio.locateVolumeGate has cyclomatic complexity 28 (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 · VPhoneOTAArchive.readZIPMembers (cyclomatic 27) · ×1
  • VPhoneOTAArchive.readZIPMembers (cyclomatic 27) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:179 — VPhoneOTAArchive.readZIPMembers 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 · VPhoneOTAArchive.stageUserland (cyclomatic 27) · ×1
  • VPhoneOTAArchive.stageUserland (cyclomatic 27) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:468 — VPhoneOTAArchive.stageUserland 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 · IBootCustomFirmwarePatcher.patchSkipGenerateNonce (cyclomatic 27) · ×1
  • IBootCustomFirmwarePatcher.patchSkipGenerateNonce (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:24 — IBootCustomFirmwarePatcher.patchSkipGenerateNonce 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 · IBootPatcher.patchSizeVerifyByShape (cyclomatic 27) · ×1
  • IBootPatcher.patchSizeVerifyByShape (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift:117 — IBootPatcher.patchSizeVerifyByShape 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 · KernelCustomFirmwarePatcher.tvTPROPagersDefault (cyclomatic 27) · ×1
  • KernelCustomFirmwarePatcher.tvTPROPagersDefault (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchTVTPROPagers.swift:23 — KernelCustomFirmwarePatcher.tvTPROPagersDefault has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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 · KernelPatcher.patchPostValidationCMP (cyclomatic 27) · ×1
  • KernelPatcher.patchPostValidationCMP (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:98 — KernelPatcher.patchPostValidationCMP 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 · VPhoneCustomFirmwareInstaller.applyGuestPatches · ×1
  • VPhoneCustomFirmwareInstaller.applyGuestPatches::on (cyclomatic 27) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1385 — VPhoneCustomFirmwareInstaller.applyGuestPatches::on has cyclomatic complexity 27 (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. This shape REPEATS in the file: one other method here (VPhoneCustomFirmwareInstaller.applyGuestPatches) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · DyldSharedCacheGLESDepthClipPatcher.patch (cyclomatic 27) · ×1
  • DyldSharedCacheGLESDepthClipPatcher.patch (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:41 — DyldSharedCacheGLESDepthClipPatcher.patch has cyclomatic complexity 27 (threshold 15). Of this number, 22 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · DyldSharedCacheGLESPointDrawPatcher.pipelineFields (cyclomatic 27) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.pipelineFields (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:162 — DyldSharedCacheGLESPointDrawPatcher.pipelineFields has cyclomatic complexity 27 (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 · KDKImageExport.chainedFixups (cyclomatic 27) · ×1
  • KDKImageExport.chainedFixups (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportFixups.swift:95 — KDKImageExport.chainedFixups 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 · CustomFirmwareSeputil.references (cyclomatic 27) · ×1
  • CustomFirmwareSeputil.references (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:403 — CustomFirmwareSeputil.references has cyclomatic complexity 27 (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 · CustomFirmwareVirtualAudio.locateSPGate (cyclomatic 27) · ×1
  • CustomFirmwareVirtualAudio.locateSPGate (cyclomatic 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1557 — CustomFirmwareVirtualAudio.locateSPGate has cyclomatic complexity 27 (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 · GuestIrisinInstaller.patchRootHideDaemon (cyclomatic 26) · ×1
  • GuestIrisinInstaller.patchRootHideDaemon (cyclomatic 26) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideDaemons.swift:14 — GuestIrisinInstaller.patchRootHideDaemon has cyclomatic complexity 26 (threshold 15). Of this number, 22 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · VPhoneTemplateSlimmingRequest.resolve (cyclomatic 26) · ×1
  • VPhoneTemplateSlimmingRequest.resolve (cyclomatic 26) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSlimmingRequest.swift:107 — VPhoneTemplateSlimmingRequest.resolve has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.patchThreadSetStateEntitlementFlag (cyclomatic 26) · ×1
  • KernelCustomFirmwarePatcher.patchThreadSetStateEntitlementFlag (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchThreadSetState.swift:22 — KernelCustomFirmwarePatcher.patchThreadSetStateEntitlementFlag has cyclomatic complexity 26 (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 · KernelCustomFirmwarePatcher.collectTaskConversionCandidates (cyclomatic 26) · ×1
  • KernelCustomFirmwarePatcher.collectTaskConversionCandidates (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskConversion.swift:59 — KernelCustomFirmwarePatcher.collectTaskConversionCandidates has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · VPhonePCCGPURecovery.stageFromSystemDisk (cyclomatic 26) · ×1
  • VPhonePCCGPURecovery.stageFromSystemDisk (cyclomatic 26) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:143 — VPhonePCCGPURecovery.stageFromSystemDisk has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneMachOImage.init (cyclomatic 26) · ×1
  • VPhoneMachOImage.init (cyclomatic 26) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift:60 — VPhoneMachOImage.init has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VPhoneGuestShellChannel.readFrames (cyclomatic 26) · ×1
  • VPhoneGuestShellChannel.readFrames (cyclomatic 26) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestShellChannel.swift:215 — VPhoneGuestShellChannel.readFrames has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CustomFirmwareArm64eX1.sameDecode (cyclomatic 26) · ×1
  • CustomFirmwareArm64eX1.sameDecode (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:139 — CustomFirmwareArm64eX1.sameDecode has cyclomatic complexity 26 (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 · CustomFirmwareArm64eX1.lower (cyclomatic 26) · ×1
  • CustomFirmwareArm64eX1.lower (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:159 — CustomFirmwareArm64eX1.lower has cyclomatic complexity 26 (threshold 15). Of this number, 20 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KDKImageExport.finalReferences (cyclomatic 26) · ×1
  • KDKImageExport.finalReferences (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportReferences.swift:153 — KDKImageExport.finalReferences has cyclomatic complexity 26 (threshold 15). Of this number, 23 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KDKRecovery.pointerReferences (cyclomatic 26) · ×1
  • KDKRecovery.pointerReferences (cyclomatic 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecovery.swift:198 — KDKRecovery.pointerReferences has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GuestPointGeometry.geometry (cyclomatic 25) · ×1
  • GuestPointGeometry.geometry (cyclomatic 25) VPhoneDaemon/Daemon/GuestPointGeometry.swift:9 — GuestPointGeometry.geometry has cyclomatic complexity 25 (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 · RestoreRamDiskSealPatcher.copiedTemplateTarget (cyclomatic 25) · ×1
  • RestoreRamDiskSealPatcher.copiedTemplateTarget (cyclomatic 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Restore/RestoreRamDiskSealPatcher.swift:214 — RestoreRamDiskSealPatcher.copiedTemplateTarget has cyclomatic complexity 25 (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 · CustomFirmwareDaemons.visionOSEnvironmentFeatures (cyclomatic 24) · ×1
  • CustomFirmwareDaemons.visionOSEnvironmentFeatures (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift:17 — CustomFirmwareDaemons.visionOSEnvironmentFeatures 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 · KernelCustomFirmwarePatcher.patchCredLabelUpdateExecve (cyclomatic 24) · ×1
  • KernelCustomFirmwarePatcher.patchCredLabelUpdateExecve (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:32 — KernelCustomFirmwarePatcher.patchCredLabelUpdateExecve 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 · KernelCustomFirmwarePatcher.patchParavirtTask3Version (cyclomatic 24) · ×1
  • KernelCustomFirmwarePatcher.patchParavirtTask3Version (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:52 — KernelCustomFirmwarePatcher.patchParavirtTask3Version 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 · KernelCustomFirmwarePatcher.debugEntryBit (cyclomatic 24) · ×1
  • KernelCustomFirmwarePatcher.debugEntryBit (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:184 — KernelCustomFirmwarePatcher.debugEntryBit has cyclomatic complexity 24 (threshold 15). Of this number, 16 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelPatcher.patchApfsVfsopMountCmp (cyclomatic 24) · ×1
  • KernelPatcher.patchApfsVfsopMountCmp (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:33 — KernelPatcher.patchApfsVfsopMountCmp 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 · VPhoneSignPKCS12.decrypt (cyclomatic 24) · ×1
  • VPhoneSignPKCS12.decrypt (cyclomatic 24) VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignPKCS12.swift:119 — VPhoneSignPKCS12.decrypt has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · CustomFirmwareWatchAudioBudget.discover (cyclomatic 24) · ×1
  • CustomFirmwareWatchAudioBudget.discover (cyclomatic 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareWatchAudioBudget.swift:122 — CustomFirmwareWatchAudioBudget.discover 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 · GuestAPI.executeFileTool (cyclomatic 23) · ×1
  • GuestAPI.executeFileTool (cyclomatic 23) VPhoneDaemon/Daemon/GuestAPI+FileTool.swift:37 — GuestAPI.executeFileTool has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · GuestAPI.executeService (cyclomatic 23) · ×1
  • GuestAPI.executeService (cyclomatic 23) VPhoneDaemon/Daemon/GuestAPI+Service.swift:8 — GuestAPI.executeService has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · VPhoneLaunchpadMachineSettingsView.save (cyclomatic 23) · ×1
  • VPhoneLaunchpadMachineSettingsView.save (cyclomatic 23) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swift:356 — VPhoneLaunchpadMachineSettingsView.save 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 · CustomFirmwareTextRecognitionModels.plan (cyclomatic 23) · ×1
  • CustomFirmwareTextRecognitionModels.plan (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTextRecognitionModels.swift:54 — CustomFirmwareTextRecognitionModels.plan 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 · DeviceTreePatcher.applyPatches (cyclomatic 23) · ×1
  • DeviceTreePatcher.applyPatches (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:364 — DeviceTreePatcher.applyPatches 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 · KernelCustomFirmwarePatcher.isBitstrTest (cyclomatic 23) · ×1
  • KernelCustomFirmwarePatcher.isBitstrTest (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:141 — KernelCustomFirmwarePatcher.isBitstrTest has cyclomatic complexity 23 (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 · KernelCustomFirmwarePatcher.matchRegionBlock (cyclomatic 23) · ×1
  • KernelCustomFirmwarePatcher.matchRegionBlock (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegionSize.swift:155 — KernelCustomFirmwarePatcher.matchRegionBlock has cyclomatic complexity 23 (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 · KernelCustomFirmwarePatcher.matchPersonaHelper (cyclomatic 23) · ×1
  • KernelCustomFirmwarePatcher.matchPersonaHelper (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:95 — KernelCustomFirmwarePatcher.matchPersonaHelper 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 · KernelPatcher.patchHandleGetDevByRoleEntitlement (cyclomatic 23) · ×1
  • KernelPatcher.patchHandleGetDevByRoleEntitlement (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:282 — KernelPatcher.patchHandleGetDevByRoleEntitlement 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 · KernelCacheKDK.mix (cyclomatic 23) · ×1
  • KernelCacheKDK.mix (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCacheKDK.swift:71 — KernelCacheKDK.mix has cyclomatic complexity 23 (threshold 15). Of this number, 22 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · TXMDevPatcher.patchDeveloperModeBypass (cyclomatic 23) · ×1
  • TXMDevPatcher.patchDeveloperModeBypass (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:745 — TXMDevPatcher.patchDeveloperModeBypass 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 · VPhoneFirmwareOTACommand.complete (cyclomatic 23) · ×1
  • VPhoneFirmwareOTACommand.complete (cyclomatic 23) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:247 — VPhoneFirmwareOTACommand.complete 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 · VPhonePatchPlan.resolve (cyclomatic 23) · ×1
  • VPhonePatchPlan.resolve (cyclomatic 23) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPlan.swift:145 — VPhonePatchPlan.resolve has cyclomatic complexity 23 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · CustomFirmwareVirtualAudio.isCAExceptionThrowBlock (cyclomatic 23) · ×1
  • CustomFirmwareVirtualAudio.isCAExceptionThrowBlock (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2070 — CustomFirmwareVirtualAudio.isCAExceptionThrowBlock 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 · CustomFirmwareWatchDog.locateSites (cyclomatic 23) · ×1
  • CustomFirmwareWatchDog.locateSites (cyclomatic 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogDiscovery.swift:15 — CustomFirmwareWatchDog.locateSites 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 · VPhoneCrashReportContent.reindent (cyclomatic 23) · ×1
  • VPhoneCrashReportContent.reindent (cyclomatic 23) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/CrashLogs/VPhoneCrashReportContent.swift:104 — VPhoneCrashReportContent.reindent has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · VPhoneArchiveWriter.pack (cyclomatic 22) · ×1
  • VPhoneArchiveWriter.pack (cyclomatic 22) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveWriter.swift:57 — VPhoneArchiveWriter.pack 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 · VPhoneBootCommand.validate (cyclomatic 22) · ×1
  • VPhoneBootCommand.validate (cyclomatic 22) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootCommand.swift:106 — VPhoneBootCommand.validate has cyclomatic complexity 22 (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 · DeviceTreePatcher.guestEdits (cyclomatic 22) · ×1
  • DeviceTreePatcher.guestEdits (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:156 — DeviceTreePatcher.guestEdits has cyclomatic complexity 22 (threshold 15). Of this number, 20 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · KernelCustomFirmwarePatcher.findFilterChecks (cyclomatic 22) · ×1
  • KernelCustomFirmwarePatcher.findFilterChecks (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:106 — KernelCustomFirmwarePatcher.findFilterChecks 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 · KernelCustomFirmwarePatcher.findProcPidinfoGuards (cyclomatic 22) · ×1
  • KernelCustomFirmwarePatcher.findProcPidinfoGuards (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchProcPidinfo.swift:67 — KernelCustomFirmwarePatcher.findProcPidinfoGuards 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 · RestoreRamDiskSealPatcher.findADRPADDReferences (cyclomatic 22) · ×1
  • RestoreRamDiskSealPatcher.findADRPADDReferences (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Restore/RestoreRamDiskSealPatcher.swift:243 — RestoreRamDiskSealPatcher.findADRPADDReferences has cyclomatic complexity 22 (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 · TXMDevPatcher.remapCategory (cyclomatic 22) · ×1
  • TXMDevPatcher.remapCategory (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:237 — TXMDevPatcher.remapCategory 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 · VPhoneFirmwareOTACommand.capture (cyclomatic 22) · ×1
  • VPhoneFirmwareOTACommand.capture (cyclomatic 22) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:115 — VPhoneFirmwareOTACommand.capture has cyclomatic complexity 22 (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 · CustomFirmwareArm64eX1Audit.containsX1 (cyclomatic 22) · ×1
  • CustomFirmwareArm64eX1Audit.containsX1 (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:134 — CustomFirmwareArm64eX1Audit.containsX1 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 · KDKRecovery.foreignMayReturn (cyclomatic 22) · ×1
  • KDKRecovery.foreignMayReturn (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:242 — KDKRecovery.foreignMayReturn 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 · CustomFirmwareWatchAudioBudget.flagStore (cyclomatic 22) · ×1
  • CustomFirmwareWatchAudioBudget.flagStore (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareWatchAudioBudget.swift:216 — CustomFirmwareWatchAudioBudget.flagStore has cyclomatic complexity 22 (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 · CustomFirmwareVirtualAudio.locateMuteSet (cyclomatic 22) · ×1
  • CustomFirmwareVirtualAudio.locateMuteSet (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1306 — CustomFirmwareVirtualAudio.locateMuteSet 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 · CustomFirmwareWatchDog.matchSite (cyclomatic 22) · ×1
  • CustomFirmwareWatchDog.matchSite (cyclomatic 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogDiscovery.swift:101 — CustomFirmwareWatchDog.matchSite 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 · GuestAPI.executeVisionOSImmersion (cyclomatic 21) · ×1
  • GuestAPI.executeVisionOSImmersion (cyclomatic 21) VPhoneDaemon/Daemon/GuestAPI+VisionOSImmersion.swift:9 — GuestAPI.executeVisionOSImmersion 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 · GuestStaticNames.set (cyclomatic 21) · ×1
  • GuestStaticNames.set (cyclomatic 21) VPhoneDaemon/Daemon/GuestStaticNames.swift:57 — GuestStaticNames.set 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 · VPhoneLaunchpadControlCommands.slimming (cyclomatic 21) · ×1
  • VPhoneLaunchpadControlCommands.slimming (cyclomatic 21) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:727 — VPhoneLaunchpadControlCommands.slimming has cyclomatic complexity 21 (threshold 15). Of this number, 18 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: VPhoneLaunchpadControlCommands.perform (cyclomatic 29) 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 · KernelCustomFirmwarePatcher.paravirtGPUPersonality (cyclomatic 21) · ×1
  • KernelCustomFirmwarePatcher.paravirtGPUPersonality (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtGLES.swift:87 — KernelCustomFirmwarePatcher.paravirtGPUPersonality has cyclomatic complexity 21 (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 · VPhoneVirtualMachineLeasesCommand.run (cyclomatic 21) · ×1
  • VPhoneVirtualMachineLeasesCommand.run (cyclomatic 21) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineLeasesCommand.swift:40 — VPhoneVirtualMachineLeasesCommand.run 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 · VPhoneHTTPTransaction.run (cyclomatic 21) · ×1
  • VPhoneHTTPTransaction.run (cyclomatic 21) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1323 — VPhoneHTTPTransaction.run has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: VPhoneGuestControl.sendRequest (cyclomatic 26) 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 · VPhoneVirtualMachineWindowController.showWindow (cyclomatic 21) · ×1
  • VPhoneVirtualMachineWindowController.showWindow (cyclomatic 21) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift:40 — VPhoneVirtualMachineWindowController.showWindow 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 · CustomFirmwareArm64eX1.lowerUniversal (cyclomatic 21) · ×1
  • CustomFirmwareArm64eX1.lowerUniversal (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:572 — CustomFirmwareArm64eX1.lowerUniversal 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 · KDKImageExport.rebuildLinkedit (cyclomatic 21) · ×1
  • KDKImageExport.rebuildLinkedit (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:147 — KDKImageExport.rebuildLinkedit has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · KDKRecovery.ehFrameReferences (cyclomatic 21) · ×1
  • KDKRecovery.ehFrameReferences (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryMetadata.swift:51 — KDKRecovery.ehFrameReferences 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 · CustomFirmwareVirtualAudio.patch (cyclomatic 21) · ×1
  • CustomFirmwareVirtualAudio.patch (cyclomatic 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:427 — CustomFirmwareVirtualAudio.patch 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 · main.swift.top-level code (cyclomatic 21) · ×1
  • main.swift.top-level code (cyclomatic 21) VPhoneLaunchpad/VPhoneLaunchpadCLI/main.swift:97 — main.swift.top-level code 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 · GuestAPI.executeInput (cyclomatic 20) · ×1
  • GuestAPI.executeInput (cyclomatic 20) VPhoneDaemon/Daemon/GuestAPI+Input.swift:9 — GuestAPI.executeInput 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 · VPhoneAPFSSnapshot.rename (cyclomatic 20) · ×1
  • VPhoneAPFSSnapshot.rename (cyclomatic 20) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAPFSSnapshot.swift:206 — VPhoneAPFSSnapshot.rename 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 · VPhoneLaunchpadLogTail.follow (cyclomatic 20) · ×1
  • VPhoneLaunchpadLogTail.follow (cyclomatic 20) VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadTerminal.swift:95 — VPhoneLaunchpadLogTail.follow 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 · AVPBooterPatcher.patchDGSTBypass (cyclomatic 20) · ×1
  • AVPBooterPatcher.patchDGSTBypass (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:74 — AVPBooterPatcher.patchDGSTBypass 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 · DyldSharedCacheCodeSignature.reattest (cyclomatic 20) · ×1
  • DyldSharedCacheCodeSignature.reattest (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift:271 — DyldSharedCacheCodeSignature.reattest 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 · KernelCustomFirmwarePatcher.findUnixSyscallCheckCalls (cyclomatic 20) · ×1
  • KernelCustomFirmwarePatcher.findUnixSyscallCheckCalls (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:185 — KernelCustomFirmwarePatcher.findUnixSyscallCheckCalls has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.findUpstreamCleanupCall (cyclomatic 20) · ×1
  • KernelCustomFirmwarePatcher.findUpstreamCleanupCall (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDounmount.swift:43 — KernelCustomFirmwarePatcher.findUpstreamCleanupCall 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 · KernelCustomFirmwarePatcherBase.findProcSecurityPolicy (cyclomatic 20) · ×1
  • KernelCustomFirmwarePatcherBase.findProcSecurityPolicy (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:228 — KernelCustomFirmwarePatcherBase.findProcSecurityPolicy 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 · KernelPatcherBase.findPanic (cyclomatic 20) · ×1
  • KernelPatcherBase.findPanic (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:269 — KernelPatcherBase.findPanic 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 · FirmwarePipeline.patchComponents (cyclomatic 20) · ×1
  • FirmwarePipeline.patchComponents (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipeline.swift:316 — FirmwarePipeline.patchComponents 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 · TXMDevPatcher.debuggerGateFlagStore (cyclomatic 20) · ×1
  • TXMDevPatcher.debuggerGateFlagStore (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:254 — TXMDevPatcher.debuggerGateFlagStore 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 · VPhoneFirmwareOTACommand.run (cyclomatic 20) · ×1
  • VPhoneFirmwareOTACommand.run (cyclomatic 20) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:43 — VPhoneFirmwareOTACommand.run 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 · VPhoneVirtualMachineConfigCommand.networkEdit (cyclomatic 20) · ×1
  • VPhoneVirtualMachineConfigCommand.networkEdit (cyclomatic 20) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift:346 — VPhoneVirtualMachineConfigCommand.networkEdit 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 · VPhoneCodeSignature.identifier (cyclomatic 20) · ×1
  • VPhoneCodeSignature.identifier (cyclomatic 20) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneCodeSignature.swift:272 — VPhoneCodeSignature.identifier 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 · DyldSharedCacheGLESPointDrawPatcher.patch (cyclomatic 20) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.patch (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:87 — DyldSharedCacheGLESPointDrawPatcher.patch has cyclomatic complexity 20 (threshold 15). Of this number, 13 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · DyldSharedCacheGLESPointDrawPatcher.materializedAddress (cyclomatic 20) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.materializedAddress (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:325 — DyldSharedCacheGLESPointDrawPatcher.materializedAddress 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 · DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress (cyclomatic 20) · ×1
  • DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:104 — DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress 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 · DyldSharedCacheMISTrustAuthPatcher.findLiteralReference (cyclomatic 20) · ×1
  • DyldSharedCacheMISTrustAuthPatcher.findLiteralReference (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:472 — DyldSharedCacheMISTrustAuthPatcher.findLiteralReference 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 · DyldSharedCacheMISTrustAuthPatcher.findSeededError (cyclomatic 20) · ×1
  • DyldSharedCacheMISTrustAuthPatcher.findSeededError (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:582 — DyldSharedCacheMISTrustAuthPatcher.findSeededError 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 · DyldSharedCacheMaxSlidePatcher.patch (cyclomatic 20) · ×1
  • DyldSharedCacheMaxSlidePatcher.patch (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift:228 — DyldSharedCacheMaxSlidePatcher.patch has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between 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 · KDKExtraction.extract (cyclomatic 20) · ×1
  • KDKExtraction.extract (cyclomatic 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExtraction.swift:12 — KDKExtraction.extract 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 · GuestAPI.installEnvironment (cyclomatic 19) · ×1
  • GuestAPI.installEnvironment (cyclomatic 19) VPhoneDaemon/Daemon/GuestAPI+Environment.swift:61 — GuestAPI.installEnvironment 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 · VPhoneTreeFingerprint.capture (cyclomatic 19) · ×1
  • VPhoneTreeFingerprint.capture (cyclomatic 19) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift:59 — VPhoneTreeFingerprint.capture has cyclomatic complexity 19 (threshold 15). Of this number, 16 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · VPhoneOTAArchive.resolve (cyclomatic 19) · ×1
  • VPhoneOTAArchive.resolve (cyclomatic 19) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:794 — VPhoneOTAArchive.resolve 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 · Head.init (cyclomatic 19) · ×1
  • Head.init (cyclomatic 19) VPhoneKit/VPhoneCoreKit/Support/VPhoneAPIRequestGate.swift:144 — Head.init has cyclomatic complexity 19 (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 · VPhoneLaunchpadDiskMeter.measure (cyclomatic 19) · ×1
  • VPhoneLaunchpadDiskMeter.measure (cyclomatic 19) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swift:163 — VPhoneLaunchpadDiskMeter.measure 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 · VPhoneLaunchpadMachineInspector.patchesPage (cyclomatic 19) · ×1
  • VPhoneLaunchpadMachineInspector.patchesPage (cyclomatic 19) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift:347 — VPhoneLaunchpadMachineInspector.patchesPage 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 · CustomFirmwareVirtualAudioMicrophoneChains.patch (cyclomatic 19) · ×1
  • CustomFirmwareVirtualAudioMicrophoneChains.patch (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioMicrophoneChains.swift:75 — CustomFirmwareVirtualAudioMicrophoneChains.patch has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · DyldSharedCacheCodeSignature.readCodeDirectory (cyclomatic 19) · ×1
  • DyldSharedCacheCodeSignature.readCodeDirectory (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift:179 — DyldSharedCacheCodeSignature.readCodeDirectory 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 · KernelCustomFirmwarePatcher.patchAmfiExecveKillPath (cyclomatic 19) · ×1
  • KernelCustomFirmwarePatcher.patchAmfiExecveKillPath (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiExecve.swift:28 — KernelCustomFirmwarePatcher.patchAmfiExecveKillPath 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 · KernelCustomFirmwarePatcher.isSyscallMaskMiss (cyclomatic 19) · ×1
  • KernelCustomFirmwarePatcher.isSyscallMaskMiss (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:230 — KernelCustomFirmwarePatcher.isSyscallMaskMiss has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelPatcherBase.kextTextRange (cyclomatic 19) · ×1
  • KernelPatcherBase.kextTextRange (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:419 — KernelPatcherBase.kextTextRange 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 · VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate (cyclomatic 19) · ×1
  • VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate (cyclomatic 19) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:924 — VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate has cyclomatic complexity 19 (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 · VPhoneApplication.takeKeyEvent (cyclomatic 19) · ×1
  • VPhoneApplication.takeKeyEvent (cyclomatic 19) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneApplication.swift:67 — VPhoneApplication.takeKeyEvent 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 · DyldSharedCacheHypervisorVirtualMachinePatcher.patch (cyclomatic 19) · ×1
  • DyldSharedCacheHypervisorVirtualMachinePatcher.patch (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:266 — DyldSharedCacheHypervisorVirtualMachinePatcher.patch 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 · DyldSharedCacheXPCLWCRPatcher.apply (cyclomatic 19) · ×1
  • DyldSharedCacheXPCLWCRPatcher.apply (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:139 — DyldSharedCacheXPCLWCRPatcher.apply 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 · KDKRecovery.mayReturn (cyclomatic 19) · ×1
  • KDKRecovery.mayReturn (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:198 — KDKRecovery.mayReturn 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 · CustomFirmwareVirtualAudio.isThrowBlock (cyclomatic 19) · ×1
  • CustomFirmwareVirtualAudio.isThrowBlock (cyclomatic 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2382 — CustomFirmwareVirtualAudio.isThrowBlock has cyclomatic complexity 19 (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 · VPhoneHomePodUserDefault.validated (cyclomatic 19) · ×1
  • VPhoneHomePodUserDefault.validated (cyclomatic 19) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDefaultsModel.swift:20 — VPhoneHomePodUserDefault.validated 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 · VPhoneArchiveExtractor.unpack (cyclomatic 18) · ×1
  • VPhoneArchiveExtractor.unpack (cyclomatic 18) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveExtractor.swift:51 — VPhoneArchiveExtractor.unpack 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 · VPhoneTCPForwarder.handle (cyclomatic 18) · ×1
  • VPhoneTCPForwarder.handle (cyclomatic 18) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:304 — VPhoneTCPForwarder.handle 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 · VPhoneNetworking.resolve (cyclomatic 18) · ×1
  • VPhoneNetworking.resolve (cyclomatic 18) VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift:637 — VPhoneNetworking.resolve has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: VPhoneNetworkingError.description (cyclomatic 24) 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 · VPhoneLaunchpadDiskExtents.map (cyclomatic 18) · ×1
  • VPhoneLaunchpadDiskExtents.map (cyclomatic 18) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskExtents.swift:112 — VPhoneLaunchpadDiskExtents.map 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 · VPhoneLaunchpadMachinesView.body (cyclomatic 18) · ×1
  • VPhoneLaunchpadMachinesView.body (cyclomatic 18) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift:76 — VPhoneLaunchpadMachinesView.body 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 · CustomFirmwareVirtualAudioGraphConfigurations.patch (cyclomatic 18) · ×1
  • CustomFirmwareVirtualAudioGraphConfigurations.patch (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioGraphConfigurations.swift:71 — CustomFirmwareVirtualAudioGraphConfigurations.patch 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 · CustomFirmwareVirtualAudioGraphConfigurations.useRawSpeakerChain (cyclomatic 18) · ×1
  • CustomFirmwareVirtualAudioGraphConfigurations.useRawSpeakerChain (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioGraphConfigurations.swift:197 — CustomFirmwareVirtualAudioGraphConfigurations.useRawSpeakerChain 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 · KernelCustomFirmwarePatcher.requestStore (cyclomatic 18) · ×1
  • KernelCustomFirmwarePatcher.requestStore (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:171 — KernelCustomFirmwarePatcher.requestStore has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.updateHomePodSoundBoard (cyclomatic 18) · ×1
  • VPhoneCustomFirmwareInstaller.updateHomePodSoundBoard (cyclomatic 18) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3664 — VPhoneCustomFirmwareInstaller.updateHomePodSoundBoard has cyclomatic complexity 18 (threshold 15). Of this number, 9 points are the body's own statements and 9 belong to 2 function items inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · VPhoneFirmwarePrepareCommand.run (cyclomatic 18) · ×1
  • VPhoneFirmwarePrepareCommand.run (cyclomatic 18) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift:263 — VPhoneFirmwarePrepareCommand.run 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 · VPhoneSignEntitlements.write (cyclomatic 18) · ×1
  • VPhoneSignEntitlements.write (cyclomatic 18) VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignEntitlements.swift:171 — VPhoneSignEntitlements.write has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function item inside it that branches. 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 · VPhoneMachOFile.init (cyclomatic 18) · ×1
  • VPhoneMachOFile.init (cyclomatic 18) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift:445 — VPhoneMachOFile.init 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 · DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields (cyclomatic 18) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:188 — DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest (cyclomatic 18) · ×1
  • DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:165 — DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DyldSharedCacheXPCLWCRPatcher.findConsistencyCheck (cyclomatic 18) · ×1
  • DyldSharedCacheXPCLWCRPatcher.findConsistencyCheck (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:278 — DyldSharedCacheXPCLWCRPatcher.findConsistencyCheck 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 · CustomFirmwareJetsamPatcher.findReturnGate (cyclomatic 18) · ×1
  • CustomFirmwareJetsamPatcher.findReturnGate (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift:236 — CustomFirmwareJetsamPatcher.findReturnGate 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 · CustomFirmwareParavirtGPUCompilerCache.addressPair (cyclomatic 18) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.addressPair (cyclomatic 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:246 — CustomFirmwareParavirtGPUCompilerCache.addressPair has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhoneAttitudeLinearScale.body (cyclomatic 18) · ×1
  • VPhoneAttitudeLinearScale.body (cyclomatic 18) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneAttitudeDial.swift:240 — VPhoneAttitudeLinearScale.body 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 · GuestHyperTextHandler.handle (cyclomatic 17) · ×1
  • GuestHyperTextHandler.handle (cyclomatic 17) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:115 — GuestHyperTextHandler.handle has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: GuestHyperTextHandler.route (cyclomatic 44) 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 · VPhoneTreeFingerprint.differences (cyclomatic 17) · ×1
  • VPhoneTreeFingerprint.differences (cyclomatic 17) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift:139 — VPhoneTreeFingerprint.differences 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 · Walk.compare (cyclomatic 17) · ×1
  • Walk.compare (cyclomatic 17) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:392 — Walk.compare has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · VPhoneFirmwareIndex.releases (cyclomatic 17) · ×1
  • VPhoneFirmwareIndex.releases (cyclomatic 17) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareIndex.swift:106 — VPhoneFirmwareIndex.releases 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 · VPhoneHostFilePermissions.walkChild (cyclomatic 17) · ×1
  • VPhoneHostFilePermissions.walkChild (cyclomatic 17) VPhoneKit/VPhoneCoreKit/Process/VPhoneHostFilePermissions.swift:140 — VPhoneHostFilePermissions.walkChild 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 · CryptexFilesystemPatcher.mergeFilesystems (cyclomatic 17) · ×1
  • CryptexFilesystemPatcher.mergeFilesystems (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift:179 — CryptexFilesystemPatcher.mergeFilesystems 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 · CustomFirmwareDaemons.visionOSLegacyUXMFeatures (cyclomatic 17) · ×1
  • CustomFirmwareDaemons.visionOSLegacyUXMFeatures (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift:78 — CustomFirmwareDaemons.visionOSLegacyUXMFeatures has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · CustomFirmwareVirtualAudioMicrophoneChains.neutralizeGain (cyclomatic 17) · ×1
  • CustomFirmwareVirtualAudioMicrophoneChains.neutralizeGain (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioMicrophoneChains.swift:186 — CustomFirmwareVirtualAudioMicrophoneChains.neutralizeGain 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 · DeviceTreePatcher.applyGuestEdits (cyclomatic 17) · ×1
  • DeviceTreePatcher.applyGuestEdits (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:783 — DeviceTreePatcher.applyGuestEdits 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 · IBootPatcher.patchImage4Callback (cyclomatic 17) · ×1
  • IBootPatcher.patchImage4Callback (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchImage4Callback.swift:14 — IBootPatcher.patchImage4Callback 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 · KernelCustomFirmwarePatcher.pvGlobalLoad (cyclomatic 17) · ×1
  • KernelCustomFirmwarePatcher.pvGlobalLoad (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:349 — KernelCustomFirmwarePatcher.pvGlobalLoad has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.findCsAssociateCall (cyclomatic 17) · ×1
  • KernelCustomFirmwarePatcher.findCsAssociateCall (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:155 — KernelCustomFirmwarePatcher.findCsAssociateCall has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.patchVmMapDeleteImmutableCode (cyclomatic 17) · ×1
  • KernelCustomFirmwarePatcher.patchVmMapDeleteImmutableCode (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchVmMapDelete.swift:23 — KernelCustomFirmwarePatcher.patchVmMapDeleteImmutableCode 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 · KernelCustomFirmwarePatcher.findSysentTable (cyclomatic 17) · ×1
  • KernelCustomFirmwarePatcher.findSysentTable (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchKcall10.swift:141 — KernelCustomFirmwarePatcher.findSysentTable has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.patchThidShouldCrash (cyclomatic 17) · ×1
  • KernelCustomFirmwarePatcher.patchThidShouldCrash (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchThidCrash.swift:14 — KernelCustomFirmwarePatcher.patchThidShouldCrash 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 · KernelPatcher.patchPostValidationNOP (cyclomatic 17) · ×1
  • KernelPatcher.patchPostValidationNOP (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:25 — KernelPatcher.patchPostValidationNOP 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 · KernelPatcher.discoverSandboxTextRange (cyclomatic 17) · ×1
  • KernelPatcher.discoverSandboxTextRange (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:185 — KernelPatcher.discoverSandboxTextRange 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 · KernelCollectionStubCalls.directCalls (cyclomatic 17) · ×1
  • KernelCollectionStubCalls.directCalls (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCollectionStubCalls.swift:73 — KernelCollectionStubCalls.directCalls 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 · FirmwareGuestPatchResolution.glesUpdatePolicy (cyclomatic 17) · ×1
  • FirmwareGuestPatchResolution.glesUpdatePolicy (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestPatchResolution.swift:47 — FirmwareGuestPatchResolution.glesUpdatePolicy has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · TXMDevPatcher.findDebuggerGateFuncStart (cyclomatic 17) · ×1
  • TXMDevPatcher.findDebuggerGateFuncStart (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:219 — TXMDevPatcher.findDebuggerGateFuncStart 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 · TXMDevPatcher.patchDebuggerEntitlementForceTrue (cyclomatic 17) · ×1
  • TXMDevPatcher.patchDebuggerEntitlementForceTrue (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:695 — TXMDevPatcher.patchDebuggerEntitlementForceTrue has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhoneVirtualMachineCreateBulkCommand.run (cyclomatic 17) · ×1
  • VPhoneVirtualMachineCreateBulkCommand.run (cyclomatic 17) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateBulkCommand.swift:51 — VPhoneVirtualMachineCreateBulkCommand.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 · VPhoneVirtualMachineView.scrollNatively (cyclomatic 17) · ×1
  • VPhoneVirtualMachineView.scrollNatively (cyclomatic 17) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:562 — VPhoneVirtualMachineView.scrollNatively 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 · CustomFirmwareArm64eX1Audit.scan · ×1
  • CustomFirmwareArm64eX1Audit.scan::inspect (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:49 — CustomFirmwareArm64eX1Audit.scan::inspect 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 · DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline (cyclomatic 17) · ×1
  • DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:241 — DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DyldSharedCacheIOMFBForceKernPatcher.isConditionalDispatch (cyclomatic 17) · ×1
  • DyldSharedCacheIOMFBForceKernPatcher.isConditionalDispatch (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:364 — DyldSharedCacheIOMFBForceKernPatcher.isConditionalDispatch has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.patch (cyclomatic 17) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.patch (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:70 — DyldSharedCacheMetalCacheReusePatcher.patch 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 · KDKImageExport.symbolTable (cyclomatic 17) · ×1
  • KDKImageExport.symbolTable (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:17 — KDKImageExport.symbolTable has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · KDKMachO.loadCommands (cyclomatic 17) · ×1
  • KDKMachO.loadCommands (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKMachO.swift:220 — KDKMachO.loadCommands 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 · KDKRecovery.metadataReferences (cyclomatic 17) · ×1
  • KDKRecovery.metadataReferences (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryMetadata.swift:5 — KDKRecovery.metadataReferences has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · CustomFirmwareParavirtGPUCompilerCache.loadPair (cyclomatic 17) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.loadPair (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:257 — CustomFirmwareParavirtGPUCompilerCache.loadPair has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CustomFirmwareParavirtGPUCompilerCache.selectorSlots (cyclomatic 17) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.selectorSlots (cyclomatic 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:269 — CustomFirmwareParavirtGPUCompilerCache.selectorSlots has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · GuestAPI.jailbreakInfo (cyclomatic 16) · ×1
  • GuestAPI.jailbreakInfo (cyclomatic 16) VPhoneDaemon/Daemon/GuestAPI.swift:561 — GuestAPI.jailbreakInfo has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, separate the cases: extract each independent 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 · GuestIrisinInstaller.prepareAppData (cyclomatic 16) · ×1
  • GuestIrisinInstaller.prepareAppData (cyclomatic 16) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Payload.swift:43 — GuestIrisinInstaller.prepareAppData 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 · VPhoneConfinedDirectory.removeEntry (cyclomatic 16) · ×1
  • VPhoneConfinedDirectory.removeEntry (cyclomatic 16) VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:745 — VPhoneConfinedDirectory.removeEntry 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 · VPhoneHostScreenProtocol.parse (cyclomatic 16) · ×1
  • VPhoneHostScreenProtocol.parse (cyclomatic 16) VPhoneKit/VPhoneCoreKit/Support/VPhoneHostScreenProtocol.swift:67 — VPhoneHostScreenProtocol.parse has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CustomFirmwareDaemons.filesystemLayout (cyclomatic 16) · ×1
  • CustomFirmwareDaemons.filesystemLayout (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:59 — CustomFirmwareDaemons.filesystemLayout has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · CustomFirmwareMachOCodeSignature.reattest (cyclomatic 16) · ×1
  • CustomFirmwareMachOCodeSignature.reattest (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift:286 — CustomFirmwareMachOCodeSignature.reattest 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 · DyldSharedCacheChunkSet.readInstallName (cyclomatic 16) · ×1
  • DyldSharedCacheChunkSet.readInstallName (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift:509 — DyldSharedCacheChunkSet.readInstallName 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 · IBootPatcher.enumerateHashGetters (cyclomatic 16) · ×1
  • IBootPatcher.enumerateHashGetters (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:111 — IBootPatcher.enumerateHashGetters 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 · IBootPatcher.verificationGates (cyclomatic 16) · ×1
  • IBootPatcher.verificationGates (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift:63 — IBootPatcher.verificationGates has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · IBootPatcher.patchSerialLabels (cyclomatic 16) · ×1
  • IBootPatcher.patchSerialLabels (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchSerialLabels.swift:12 — IBootPatcher.patchSerialLabels 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 · KernelCustomFirmwarePatcher.patchAmfiCdhashInTrustcache (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.patchAmfiCdhashInTrustcache (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiTrustcache.swift:23 — KernelCustomFirmwarePatcher.patchAmfiCdhashInTrustcache 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 · KernelCustomFirmwarePatcher.findSandboxOpsTable (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.findSandboxOpsTable (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:113 — KernelCustomFirmwarePatcher.findSandboxOpsTable 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 · KernelCustomFirmwarePatcher.patchParavirtDisplayRefreshRate (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.patchParavirtDisplayRefreshRate (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchDisplayRefresh.swift:37 — KernelCustomFirmwarePatcher.patchParavirtDisplayRefreshRate has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.findIOTaskHasEntitlement (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.findIOTaskHasEntitlement (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:276 — KernelCustomFirmwarePatcher.findIOTaskHasEntitlement 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 · KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Keystore/KernelCustomFirmwarePatchAksUnlockBag.swift:55 — KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelCustomFirmwarePatcher.findUpstreamRootMountCmp (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.findUpstreamRootMountCmp (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegion.swift:70 — KernelCustomFirmwarePatcher.findUpstreamRootMountCmp 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 · KernelCustomFirmwarePatcher.nopAbiVersionGate (cyclomatic 16) · ×1
  • KernelCustomFirmwarePatcher.nopAbiVersionGate (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDiskImages2.swift:78 — KernelCustomFirmwarePatcher.nopAbiVersionGate has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · KernelPatcher.patchApfsMountUpgradeChecks (cyclomatic 16) · ×1
  • KernelPatcher.patchApfsMountUpgradeChecks (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:134 — KernelPatcher.patchApfsMountUpgradeChecks 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 · KernelPatcher.findSandboxOpsTable (cyclomatic 16) · ×1
  • KernelPatcher.findSandboxOpsTable (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:108 — KernelPatcher.findSandboxOpsTable 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 · RestoreRamDiskSealPatcher.locateHashTypeField (cyclomatic 16) · ×1
  • RestoreRamDiskSealPatcher.locateHashTypeField (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Restore/RestoreRamDiskSealPatcher.swift:155 — RestoreRamDiskSealPatcher.locateHashTypeField has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · SEPResearchBoardPatcher.tableAddress (cyclomatic 16) · ×1
  • SEPResearchBoardPatcher.tableAddress (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SEP/SEPResearchBoardPatcher.swift:189 — SEPResearchBoardPatcher.tableAddress has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.replaceHomePodUserland (cyclomatic 16) · ×1
  • VPhoneCustomFirmwareInstaller.replaceHomePodUserland (cyclomatic 16) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3590 — VPhoneCustomFirmwareInstaller.replaceHomePodUserland has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · VPhoneCustomFirmwareInstaller.updateTVDyld (cyclomatic 16) · ×1
  • VPhoneCustomFirmwareInstaller.updateTVDyld (cyclomatic 16) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4682 — VPhoneCustomFirmwareInstaller.updateTVDyld 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 · VPhoneVirtualMachineCreateCommand.run (cyclomatic 16) · ×1
  • VPhoneVirtualMachineCreateCommand.run (cyclomatic 16) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift:251 — VPhoneVirtualMachineCreateCommand.run 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 · VPhoneGuestShellChannel.handshake (cyclomatic 16) · ×1
  • VPhoneGuestShellChannel.handshake (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestShellChannel.swift:120 — VPhoneGuestShellChannel.handshake 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 · VPhoneCameraServer.setSource (cyclomatic 16) · ×1
  • VPhoneCameraServer.setSource (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneCameraServer.swift:77 — VPhoneCameraServer.setSource 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 · VPhoneExternalDisplayWindowController.connect (cyclomatic 16) · ×1
  • VPhoneExternalDisplayWindowController.connect (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneExternalDisplayWindowController.swift:33 — VPhoneExternalDisplayWindowController.connect 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 · DyldSharedCacheGLESPrimitiveRestartPatcher.findEntry (cyclomatic 16) · ×1
  • DyldSharedCacheGLESPrimitiveRestartPatcher.findEntry (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:128 — DyldSharedCacheGLESPrimitiveRestartPatcher.findEntry has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DyldSharedCacheMetalCacheReusePatcher.plan (cyclomatic 16) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.plan (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:244 — DyldSharedCacheMetalCacheReusePatcher.plan 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 · DyldSharedCacheMetalVertexFormatPatcher.findFormatSite (cyclomatic 16) · ×1
  • DyldSharedCacheMetalVertexFormatPatcher.findFormatSite (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:145 — DyldSharedCacheMetalVertexFormatPatcher.findFormatSite has cyclomatic complexity 16 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites (cyclomatic 16) · ×1
  • DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:122 — DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites 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 · KDKExtraction.pseudoExtensions (cyclomatic 16) · ×1
  • KDKExtraction.pseudoExtensions (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExtraction.swift:162 — KDKExtraction.pseudoExtensions 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 · KDKRecovery.recover (cyclomatic 16) · ×1
  • KDKRecovery.recover (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecovery.swift:157 — KDKRecovery.recover 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 · KDKRecovery.calleeWrites (cyclomatic 16) · ×1
  • KDKRecovery.calleeWrites (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:133 — KDKRecovery.calleeWrites 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 · CustomFirmwareCacheLoaderPatcher.findStringReference (cyclomatic 16) · ×1
  • CustomFirmwareCacheLoaderPatcher.findStringReference (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:108 — CustomFirmwareCacheLoaderPatcher.findStringReference 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 · CustomFirmwareTVTPRO.patchCache (cyclomatic 16) · ×1
  • CustomFirmwareTVTPRO.patchCache (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareTVTPRO.swift:93 — CustomFirmwareTVTPRO.patchCache 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 · CustomFirmwareVirtualAudio.patchSpeakerProtectionGate (cyclomatic 16) · ×1
  • CustomFirmwareVirtualAudio.patchSpeakerProtectionGate (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:785 — CustomFirmwareVirtualAudio.patchSpeakerProtectionGate has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CustomFirmwareVirtualAudio.patchVolumeModePrecondition) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CustomFirmwareVirtualAudio.patchVolumeModePrecondition (cyclomatic 16) · ×1
  • CustomFirmwareVirtualAudio.patchVolumeModePrecondition (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:920 — CustomFirmwareVirtualAudio.patchVolumeModePrecondition has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (CustomFirmwareVirtualAudio.patchSpeakerProtectionGate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D1 · Cyclomatic Complexity · CustomFirmwareVirtualAudio.patchDeviceStateNullGate (cyclomatic 16) · ×1
  • CustomFirmwareVirtualAudio.patchDeviceStateNullGate (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1054 — CustomFirmwareVirtualAudio.patchDeviceStateNullGate 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 · CustomFirmwareVirtualAudio.locate (cyclomatic 16) · ×1
  • CustomFirmwareVirtualAudio.locate (cyclomatic 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1181 — CustomFirmwareVirtualAudio.locate 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 · VPhoneHomeViewDistanceModel.receive (cyclomatic 16) · ×1
  • VPhoneHomeViewDistanceModel.receive (cyclomatic 16) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomeViewDistanceModel.swift:87 — VPhoneHomeViewDistanceModel.receive 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.
D2 · Cognitive Complexity · VPhoneCustomFirmwareInstaller.applyGuestPatches (cognitive 518) · ×1
  • VPhoneCustomFirmwareInstaller.applyGuestPatches (cognitive 518) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1358 — VPhoneCustomFirmwareInstaller.applyGuestPatches has cognitive complexity 518 (threshold 15). Drivers by points: if/else 250 (403 pts), boolean chains 80, loops 18 (31 pts), ternaries 14 (31 pts), error handling 6 (8 pts), match/switch 1 (3 pts) (nesting depth added 187). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (VPhoneCustomFirmwareInstaller.applyGuestPatches::on) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · KDKRecovery.synthesizeSymbols (cognitive 176) · ×1
  • KDKRecovery.synthesizeSymbols (cognitive 176) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift:59 — KDKRecovery.synthesizeSymbols has cognitive complexity 176 (threshold 15). Drivers by points: if/else 38 (86 pts), loops 27 (54 pts), boolean chains 32, ternaries 2 (4 pts) (nesting depth added 77). Of this number, 149 points are the body's own statements and 27 belong to 6 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneCustomFirmwareInstaller.run (cognitive 172) · ×1
  • VPhoneCustomFirmwareInstaller.run (cognitive 172) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:142 — VPhoneCustomFirmwareInstaller.run has cognitive complexity 172 (threshold 15). Drivers by points: if/else 83 (104 pts), boolean chains 55, ternaries 6 (8 pts), error handling 2 (3 pts), match/switch 2 (nesting depth added 24). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and 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 · DyldSharedCacheSettingsRowsPatcher.discover (cognitive 133) · ×1
  • DyldSharedCacheSettingsRowsPatcher.discover (cognitive 133) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheSettingsRowsPatcher.swift:23 — DyldSharedCacheSettingsRowsPatcher.discover has cognitive complexity 133 (threshold 15). Drivers by points: if/else 32 (81 pts), boolean chains 34, loops 9 (18 pts) (nesting depth added 58). Of this number, 129 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ReviewedProviderPatch.swift.top-level code (cognitive 127) · ×1
  • ReviewedProviderPatch.swift.top-level code (cognitive 127) Research/Guest/SettingsRows/ReviewedProviderPatch.swift:94 — ReviewedProviderPatch.swift.top-level code has cognitive complexity 127 (threshold 15). Drivers by points: if/else 20 (72 pts), boolean chains 29, loops 7 (25 pts), error handling 1 (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareParavirtGPUCompilerCache.resolve (cognitive 124) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.resolve (cognitive 124) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:90 — CustomFirmwareParavirtGPUCompilerCache.resolve has cognitive complexity 124 (threshold 15). Drivers by points: if/else 23 (54 pts), boolean chains 53, loops 8 (17 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestAPI.executeCore (cognitive 113) · ×1
  • GuestAPI.executeCore (cognitive 113) VPhoneDaemon/Daemon/GuestAPI.swift:182 — GuestAPI.executeCore has cognitive complexity 113 (threshold 15). Drivers by points: if/else 32 (74 pts), boolean chains 18, ternaries 5 (13 pts), error handling 3 (7 pts), match/switch 1 (nesting depth added 54). 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 · VPhoneVirtualMachineAppDelegate.startVirtualMachine (cognitive 112) · ×1
  • VPhoneVirtualMachineAppDelegate.startVirtualMachine (cognitive 112) VPhoneExecutable/VPhoneVirtualization/UI/VPhoneVirtualMachineAppDelegate.swift:79 — VPhoneVirtualMachineAppDelegate.startVirtualMachine has cognitive complexity 112 (threshold 15). Drivers by points: if/else 43 (90 pts), boolean chains 14, error handling 1 (5 pts), loops 1 (3 pts) (nesting depth added 53). 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 · CustomFirmwareArm64eX1.planCode (cognitive 111) · ×1
  • CustomFirmwareArm64eX1.planCode (cognitive 111) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:214 — CustomFirmwareArm64eX1.planCode has cognitive complexity 111 (threshold 15). Drivers by points: if/else 19 (57 pts), boolean chains 31, loops 8 (16 pts), ternaries 1 (4 pts), match/switch 1 (3 pts) (nesting depth added 51). Of this number, 105 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.revealCSSCHandler (cognitive 109) · ×1
  • KernelCustomFirmwarePatcher.revealCSSCHandler (cognitive 109) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchCSSC.swift:21 — KernelCustomFirmwarePatcher.revealCSSCHandler has cognitive complexity 109 (threshold 15). Drivers by points: boolean chains 82, if/else 18 (23 pts), loops 4 (nesting depth added 5). Of this number, 95 points are the body's own statements and 14 belong to 4 function items inside it that branch. 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 · KDKImageExport.adjustReferences (cognitive 98) · ×1
  • KDKImageExport.adjustReferences (cognitive 98) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportReferences.swift:15 — KDKImageExport.adjustReferences has cognitive complexity 98 (threshold 15). Drivers by points: if/else 25 (62 pts), boolean chains 18, loops 6 (11 pts), ternaries 2 (4 pts), match/switch 1 (3 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TXMDevPatcher.patchExecutableRemap (cognitive 97) · ×1
  • TXMDevPatcher.patchExecutableRemap (cognitive 97) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:18 — TXMDevPatcher.patchExecutableRemap has cognitive complexity 97 (threshold 15). Drivers by points: boolean chains 75, if/else 11 (16 pts), loops 5, ternaries 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheArm64eX1BootstrapPatcher.planImage (cognitive 96) · ×1
  • DyldSharedCacheArm64eX1BootstrapPatcher.planImage (cognitive 96) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:355 — DyldSharedCacheArm64eX1BootstrapPatcher.planImage has cognitive complexity 96 (threshold 15). Drivers by points: if/else 26 (67 pts), loops 4 (17 pts), boolean chains 12 (nesting depth added 54). Of this number, 93 points are the body's own statements and 3 belong to one function item inside it that branches. 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 · KDKImageExport.layout (cognitive 96) · ×1
  • KDKImageExport.layout (cognitive 96) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKImageExport.swift:183 — KDKImageExport.layout has cognitive complexity 96 (threshold 15). Drivers by points: if/else 17 (46 pts), boolean chains 20, loops 6 (14 pts), ternaries 4 (13 pts), match/switch 1 (3 pts) (nesting depth added 48). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneHostAutomationServer.respond (cognitive 90) · ×1
  • VPhoneHostAutomationServer.respond (cognitive 90) VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift:184 — VPhoneHostAutomationServer.respond has cognitive complexity 90 (threshold 15). Drivers by points: if/else 23 (64 pts), boolean chains 16, error handling 2 (4 pts), ternaries 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 46). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1.authenticatedDispatch (cognitive 90) · ×1
  • CustomFirmwareArm64eX1.authenticatedDispatch (cognitive 90) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:422 — CustomFirmwareArm64eX1.authenticatedDispatch has cognitive complexity 90 (threshold 15). Drivers by points: boolean chains 56, if/else 19 (31 pts), loops 3 (nesting depth added 12). Of this number, 81 points are the body's own statements and 9 belong to 2 function items inside it that branch. 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 · GuestAPI.updateOTASystemApps (cognitive 89) · ×1
  • GuestAPI.updateOTASystemApps (cognitive 89) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:48 — GuestAPI.updateOTASystemApps has cognitive complexity 89 (threshold 15). Drivers by points: if/else 23 (65 pts), boolean chains 18, loops 3 (6 pts) (nesting depth added 45). Of this number, 84 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheGLESDepthClipPatcher.findSite (cognitive 87) · ×1
  • DyldSharedCacheGLESDepthClipPatcher.findSite (cognitive 87) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:112 — DyldSharedCacheGLESDepthClipPatcher.findSite has cognitive complexity 87 (threshold 15). Drivers by points: boolean chains 70, if/else 11 (14 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). 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 · GuestAPI.setDevicePose (cognitive 86) · ×1
  • GuestAPI.setDevicePose (cognitive 86) VPhoneDaemon/Daemon/GuestAPI+Device.swift:334 — GuestAPI.setDevicePose has cognitive complexity 86 (threshold 15). Drivers by points: if/else 25 (45 pts), ternaries 12 (25 pts), boolean chains 14, match/switch 1 (2 pts) (nesting depth added 34). Of this number, 76 points are the body's own statements and 10 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareTVTPRO.discover (cognitive 84) · ×1
  • CustomFirmwareTVTPRO.discover (cognitive 84) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareTVTPRO.swift:152 — CustomFirmwareTVTPRO.discover has cognitive complexity 84 (threshold 15). Drivers by points: boolean chains 49, if/else 9 (23 pts), loops 6 (12 pts) (nesting depth added 20). 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 · CustomFirmwareArm64eX1.entryPoints (cognitive 83) · ×1
  • CustomFirmwareArm64eX1.entryPoints (cognitive 83) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:664 — CustomFirmwareArm64eX1.entryPoints has cognitive complexity 83 (threshold 15). Drivers by points: if/else 19 (61 pts), loops 4 (14 pts), boolean chains 8 (nesting depth added 52). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneCustomFirmwareInstaller.patchPreboot (cognitive 81) · ×1
  • VPhoneCustomFirmwareInstaller.patchPreboot (cognitive 81) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4085 — VPhoneCustomFirmwareInstaller.patchPreboot has cognitive complexity 81 (threshold 15). Drivers by points: if/else 30 (55 pts), boolean chains 22, ternaries 1 (3 pts), loops 1 (nesting depth added 27). Of this number, 77 points are the body's own statements and 4 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKRecovery.pointerReferences (cognitive 81) · ×1
  • KDKRecovery.pointerReferences (cognitive 81) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecovery.swift:198 — KDKRecovery.pointerReferences has cognitive complexity 81 (threshold 15). Drivers by points: if/else 14 (51 pts), loops 5 (14 pts), ternaries 2 (12 pts), boolean chains 4 (nesting depth added 56). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneFirmwarePreparer.prepare (cognitive 79) · ×1
  • VPhoneFirmwarePreparer.prepare (cognitive 79) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift:34 — VPhoneFirmwarePreparer.prepare has cognitive complexity 79 (threshold 15). Drivers by points: if/else 34 (44 pts), boolean chains 18, error handling 4 (13 pts), ternaries 1 (3 pts), loops 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 · CustomFirmwareSettingsRows.providerEdits (cognitive 76) · ×1
  • CustomFirmwareSettingsRows.providerEdits (cognitive 76) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:205 — CustomFirmwareSettingsRows.providerEdits has cognitive complexity 76 (threshold 15). Drivers by points: if/else 12 (38 pts), boolean chains 26, loops 6 (12 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.pvIdentityHelpers (cognitive 74) · ×1
  • KernelCustomFirmwarePatcher.pvIdentityHelpers (cognitive 74) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:410 — KernelCustomFirmwarePatcher.pvIdentityHelpers has cognitive complexity 74 (threshold 15). Drivers by points: boolean chains 60, if/else 8 (11 pts), loops 3 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · FirmwarePipeline.buildComponentList (cognitive 74) · ×1
  • FirmwarePipeline.buildComponentList (cognitive 74) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineComponents.swift:52 — FirmwarePipeline.buildComponentList has cognitive complexity 74 (threshold 15). Drivers by points: ternaries 19 (32 pts), boolean chains 26, if/else 11 (13 pts), match/switch 3 (nesting depth added 15). Of this number, 71 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TXMDevPatcher.patchPrecheckForcePass (cognitive 73) · ×1
  • TXMDevPatcher.patchPrecheckForcePass (cognitive 73) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:303 — TXMDevPatcher.patchPrecheckForcePass has cognitive complexity 73 (threshold 15). Drivers by points: if/else 12 (32 pts), boolean chains 30, loops 5 (11 pts) (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields (cognitive 71) · ×1
  • DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields (cognitive 71) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:155 — DyldSharedCacheGLESPrimitiveRestartPatcher.stateFields has cognitive complexity 71 (threshold 15). Drivers by points: boolean chains 62, ternaries 5, if/else 4. Of this number, 63 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · GameCenterStandalonePatch.swift.top-level code (cognitive 71) · ×1
  • GameCenterStandalonePatch.swift.top-level code (cognitive 71) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:94 — GameCenterStandalonePatch.swift.top-level code has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (35 pts), boolean chains 27, loops 6 (9 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 · CustomFirmwareSettingsRows.gameCenterEdits (cognitive 69) · ×1
  • CustomFirmwareSettingsRows.gameCenterEdits (cognitive 69) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:281 — CustomFirmwareSettingsRows.gameCenterEdits has cognitive complexity 69 (threshold 15). Drivers by points: if/else 16 (34 pts), boolean chains 27, loops 5 (8 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 · DyldSharedCacheArm64eX1BootstrapPatcher.lower (cognitive 66) · ×1
  • DyldSharedCacheArm64eX1BootstrapPatcher.lower (cognitive 66) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheArm64eX1BootstrapPatcher.swift:114 — DyldSharedCacheArm64eX1BootstrapPatcher.lower has cognitive complexity 66 (threshold 15). Drivers by points: if/else 18 (47 pts), loops 7 (12 pts), boolean chains 4, error handling 2 (3 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneOTAArchive.readZIPMembers (cognitive 65) · ×1
  • VPhoneOTAArchive.readZIPMembers (cognitive 65) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:179 — VPhoneOTAArchive.readZIPMembers has cognitive complexity 65 (threshold 15). Drivers by points: if/else 17 (52 pts), loops 3 (6 pts), boolean chains 4, match/switch 1 (3 pts) (nesting depth added 40). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchPostValidationAdditional (cognitive 65) · ×1
  • KernelCustomFirmwarePatcher.patchPostValidationAdditional (cognitive 65) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchPostValidation.swift:14 — KernelCustomFirmwarePatcher.patchPostValidationAdditional has cognitive complexity 65 (threshold 15). Drivers by points: if/else 16 (46 pts), loops 5 (12 pts), boolean chains 7 (nesting depth added 37). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelPatcher.patchPostValidationCMP (cognitive 65) · ×1
  • KernelPatcher.patchPostValidationCMP (cognitive 65) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:98 — KernelPatcher.patchPostValidationCMP has cognitive complexity 65 (threshold 15). Drivers by points: if/else 15 (47 pts), loops 5 (12 pts), boolean chains 6 (nesting depth added 39). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKRecovery.track (cognitive 65) · ×1
  • KDKRecovery.track (cognitive 65) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:52 — KDKRecovery.track has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (46 pts), loops 3 (10 pts), boolean chains 9 (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 · VPhoneLaunchpadCreationPipeline.perform (cognitive 63) · ×1
  • VPhoneLaunchpadCreationPipeline.perform (cognitive 63) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift:388 — VPhoneLaunchpadCreationPipeline.perform has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (43 pts), ternaries 3 (7 pts), loops 3 (6 pts), boolean chains 4, error handling 1 (2 pts), match/switch 1 (nesting depth added 30). Of this number, 62 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheMetalCacheReusePatcher.findSite (cognitive 63) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.findSite (cognitive 63) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:122 — DyldSharedCacheMetalCacheReusePatcher.findSite has cognitive complexity 63 (threshold 15). Drivers by points: boolean chains 51, if/else 6 (9 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 4). 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 · GuestIrisinInstaller.performInstall (cognitive 62) · ×1
  • GuestIrisinInstaller.performInstall (cognitive 62) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:250 — GuestIrisinInstaller.performInstall has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (37 pts), boolean chains 9, loops 4 (7 pts), ternaries 4 (6 pts), error handling 2 (3 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestHyperTextHandler.channelRead (cognitive 60) · ×1
  • GuestHyperTextHandler.channelRead (cognitive 60) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:26 — GuestHyperTextHandler.channelRead has cognitive complexity 60 (threshold 15). Drivers by points: if/else 16 (34 pts), error handling 3 (11 pts), ternaries 2 (8 pts), boolean chains 6, match/switch 1 (nesting depth added 32). 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 · KernelPatcherBase.findPanic (cognitive 60) · ×1
  • KernelPatcherBase.findPanic (cognitive 60) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:269 — KernelPatcherBase.findPanic has cognitive complexity 60 (threshold 15). Drivers by points: if/else 14 (52 pts), loops 3 (6 pts), boolean chains 2 (nesting depth added 41). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1.exceptionEntries (cognitive 60) · ×1
  • CustomFirmwareArm64eX1.exceptionEntries (cognitive 60) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:342 — CustomFirmwareArm64eX1.exceptionEntries has cognitive complexity 60 (threshold 15). Drivers by points: if/else 18 (38 pts), boolean chains 14, loops 5 (8 pts) (nesting depth added 23). Of this number, 48 points are the body's own statements and 12 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheHomeViewEnvironmentPatcher.findSites (cognitive 59) · ×1
  • DyldSharedCacheHomeViewEnvironmentPatcher.findSites (cognitive 59) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:131 — DyldSharedCacheHomeViewEnvironmentPatcher.findSites has cognitive complexity 59 (threshold 15). Drivers by points: boolean chains 35, if/else 11 (23 pts), loops 1 (nesting depth added 12). 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 · VPhoneLaunchpadControlRequest.parse (cognitive 57) · ×1
  • VPhoneLaunchpadControlRequest.parse (cognitive 57) VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadControl.swift:233 — VPhoneLaunchpadControlRequest.parse has cognitive complexity 57 (threshold 15). Drivers by points: if/else 26 (43 pts), boolean chains 12, loops 1, ternaries 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 · KernelPatcher.patchExcGuardBehavior (cognitive 57) · ×1
  • KernelPatcher.patchExcGuardBehavior (cognitive 57) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchExcGuard.swift:32 — KernelPatcher.patchExcGuardBehavior has cognitive complexity 57 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 12, loops 4 (6 pts), ternaries 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 · TXMDevPatcher.patchSelector24ForcePass (cognitive 57) · ×1
  • TXMDevPatcher.patchSelector24ForcePass (cognitive 57) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:420 — TXMDevPatcher.patchSelector24ForcePass has cognitive complexity 57 (threshold 15). Drivers by points: if/else 11 (29 pts), boolean chains 17, loops 5 (11 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness (cognitive 57) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness (cognitive 57) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:188 — DyldSharedCacheMetalCacheReusePatcher.verifyFlagLiveness has cognitive complexity 57 (threshold 15). Drivers by points: boolean chains 29, if/else 13 (25 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 13). Of this number, 42 points are the body's own statements and 15 belong to 2 function items inside it that branch. 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 · KernelCustomFirmwarePatcher.findCsBypassGate (cognitive 56) · ×1
  • KernelCustomFirmwarePatcher.findCsBypassGate (cognitive 56) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmFault.swift:80 — KernelCustomFirmwarePatcher.findCsBypassGate has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 33, if/else 9 (18 pts), loops 3 (4 pts), ternaries 1 (nesting depth added 10). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheTextRecognitionANEPatcher.findSite (cognitive 56) · ×1
  • DyldSharedCacheTextRecognitionANEPatcher.findSite (cognitive 56) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:139 — DyldSharedCacheTextRecognitionANEPatcher.findSite has cognitive complexity 56 (threshold 15). Drivers by points: boolean chains 39, if/else 6 (15 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KDKImageExport.chainedFixups (cognitive 55) · ×1
  • KDKImageExport.chainedFixups (cognitive 55) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportFixups.swift:95 — KDKImageExport.chainedFixups has cognitive complexity 55 (threshold 15). Drivers by points: if/else 12 (34 pts), loops 7 (11 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneOTAArchive.validatePayloadPaths (cognitive 54) · ×1
  • VPhoneOTAArchive.validatePayloadPaths (cognitive 54) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:604 — VPhoneOTAArchive.validatePayloadPaths has cognitive complexity 54 (threshold 15). Drivers by points: if/else 14 (36 pts), loops 8 (12 pts), boolean chains 6 (nesting depth added 26). Of this number, 49 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchArm64eX1Admission (cognitive 53) · ×1
  • KernelCustomFirmwarePatcher.patchArm64eX1Admission (cognitive 53) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:7 — KernelCustomFirmwarePatcher.patchArm64eX1Admission has cognitive complexity 53 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 19, loops 6 (8 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 · VPhoneGuestControl.probe (cognitive 53) · ×1
  • VPhoneGuestControl.probe (cognitive 53) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:327 — VPhoneGuestControl.probe has cognitive complexity 53 (threshold 15). Drivers by points: if/else 16 (39 pts), boolean chains 11, error handling 2 (3 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKRecovery.ehFrameReferences (cognitive 52) · ×1
  • KDKRecovery.ehFrameReferences (cognitive 52) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryMetadata.swift:51 — KDKRecovery.ehFrameReferences has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (41 pts), loops 2 (5 pts), match/switch 1 (5 pts), boolean chains 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 · KernelCustomFirmwarePatcher.scanRange (cognitive 51) · ×1
  • KernelCustomFirmwarePatcher.scanRange (cognitive 51) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:126 — KernelCustomFirmwarePatcher.scanRange has cognitive complexity 51 (threshold 15). Drivers by points: boolean chains 30, if/else 10 (20 pts), loops 1 (nesting depth added 10). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.containsDraw (cognitive 50) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.containsDraw (cognitive 50) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:281 — DyldSharedCacheGLESPointDrawPatcher.containsDraw has cognitive complexity 50 (threshold 15). Drivers by points: boolean chains 25, if/else 10 (22 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 13). 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 · CustomFirmwareArm64eX1.switchTable (cognitive 49) · ×1
  • CustomFirmwareArm64eX1.switchTable (cognitive 49) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:492 — CustomFirmwareArm64eX1.switchTable has cognitive complexity 49 (threshold 15). Drivers by points: boolean chains 42, if/else 5 (6 pts), loops 1 (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 · KernelCustomFirmwarePatcher.paravirtTaskIdentity (cognitive 48) · ×1
  • KernelCustomFirmwarePatcher.paravirtTaskIdentity (cognitive 48) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:241 — KernelCustomFirmwarePatcher.paravirtTaskIdentity has cognitive complexity 48 (threshold 15). Drivers by points: boolean chains 42, if/else 4 (5 pts), loops 1 (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 · VPhoneCustomFirmwareInstaller.applyDyldPatches (cognitive 48) · ×1
  • VPhoneCustomFirmwareInstaller.applyDyldPatches (cognitive 48) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2995 — VPhoneCustomFirmwareInstaller.applyDyldPatches has cognitive complexity 48 (threshold 15). Drivers by points: error handling 6 (19 pts), if/else 10 (14 pts), boolean chains 8, loops 2 (4 pts), match/switch 1 (2 pts), ternaries 1 (nesting depth added 20). Of this number, 38 points are the body's own statements and 10 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MachOSymbolTargets.init (cognitive 47) · ×1
  • MachOSymbolTargets.init (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Binary/MachOSymbolTargets.swift:52 — MachOSymbolTargets.init has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (29 pts), boolean chains 13, loops 2 (4 pts), ternaries 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 · IBootCustomFirmwarePatcher.patchSkipGenerateNonce (cognitive 47) · ×1
  • IBootCustomFirmwarePatcher.patchSkipGenerateNonce (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:24 — IBootCustomFirmwarePatcher.patchSkipGenerateNonce has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (32 pts), boolean chains 9, loops 4 (6 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 · IBootPatcher.patchBootxPrecondition (cognitive 47) · ×1
  • IBootPatcher.patchBootxPrecondition (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:31 — IBootPatcher.patchBootxPrecondition has cognitive complexity 47 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 9, loops 3 (6 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 · TXMDevPatcher.remapLibraryCompatibility (cognitive 47) · ×1
  • TXMDevPatcher.remapLibraryCompatibility (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:182 — TXMDevPatcher.remapLibraryCompatibility has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 39, if/else 4 (7 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TXMDevPatcher.remapMissingProfileCompatibility (cognitive 47) · ×1
  • TXMDevPatcher.remapMissingProfileCompatibility (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMMissingProfile.swift:11 — TXMDevPatcher.remapMissingProfileCompatibility has cognitive complexity 47 (threshold 15). Drivers by points: boolean chains 35, if/else 6 (11 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VPhoneGuestShellChannel.readFrames (cognitive 47) · ×1
  • VPhoneGuestShellChannel.readFrames (cognitive 47) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestShellChannel.swift:215 — VPhoneGuestShellChannel.readFrames has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (35 pts), loops 3 (7 pts), match/switch 1 (2 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1Installation.update (cognitive 47) · ×1
  • CustomFirmwareArm64eX1Installation.update (cognitive 47) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Installation.swift:19 — CustomFirmwareArm64eX1Installation.update has cognitive complexity 47 (threshold 15). Drivers by points: if/else 17 (28 pts), boolean chains 8, error handling 3 (7 pts), loops 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadMachineInspector.patchesPage (cognitive 46) · ×1
  • VPhoneLaunchpadMachineInspector.patchesPage (cognitive 46) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineInspector.swift:347 — VPhoneLaunchpadMachineInspector.patchesPage has cognitive complexity 46 (threshold 15). Drivers by points: if/else 13 (30 pts), ternaries 3 (11 pts), boolean chains 5 (nesting depth added 25). 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 · VPhonePatchCatalogReport.text (cognitive 46) · ×1
  • VPhonePatchCatalogReport.text (cognitive 46) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhonePatchCatalogReport.swift:323 — VPhonePatchCatalogReport.text has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (22 pts), ternaries 6 (15 pts), loops 3 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.sites (cognitive 46) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.sites (cognitive 46) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:237 — DyldSharedCacheGLESPointDrawPatcher.sites has cognitive complexity 46 (threshold 15). Drivers by points: boolean chains 26, if/else 9 (19 pts), loops 1 (nesting depth added 10). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VPhoneLaunchpadMachineSettingsView.save (cognitive 45) · ×1
  • VPhoneLaunchpadMachineSettingsView.save (cognitive 45) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineSheets.swift:356 — VPhoneLaunchpadMachineSettingsView.save has cognitive complexity 45 (threshold 15). Drivers by points: ternaries 12 (26 pts), if/else 10 (18 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVisionOSFramePacing.locate (cognitive 44) · ×1
  • CustomFirmwareVisionOSFramePacing.locate (cognitive 44) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:93 — CustomFirmwareVisionOSFramePacing.locate has cognitive complexity 44 (threshold 15). Drivers by points: boolean chains 33, if/else 8 (10 pts), loops 1 (nesting depth added 2). Of this number, 40 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KDKImageExport.finalReferences (cognitive 44) · ×1
  • KDKImageExport.finalReferences (cognitive 44) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportReferences.swift:153 — KDKImageExport.finalReferences has cognitive complexity 44 (threshold 15). Drivers by points: if/else 9 (23 pts), boolean chains 12, ternaries 1 (4 pts), loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 19). Of this number, 41 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareRemotePairing.locate (cognitive 44) · ×1
  • CustomFirmwareRemotePairing.locate (cognitive 44) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:45 — CustomFirmwareRemotePairing.locate has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 15, loops 4 (8 pts) (nesting depth added 13). Of this number, 39 points are the body's own statements and 5 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FirmwarePipeline.patchComponents (cognitive 43) · ×1
  • FirmwarePipeline.patchComponents (cognitive 43) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipeline.swift:316 — FirmwarePipeline.patchComponents has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (30 pts), ternaries 2 (6 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheCodeSignature.reattest (cognitive 42) · ×1
  • DyldSharedCacheCodeSignature.reattest (cognitive 42) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift:271 — DyldSharedCacheCodeSignature.reattest has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 4 (6 pts), ternaries 3 (6 pts), error handling 2 (4 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 · VPhonePatchPlan.resolve (cognitive 42) · ×1
  • VPhonePatchPlan.resolve (cognitive 42) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPlan.swift:145 — VPhonePatchPlan.resolve has cognitive complexity 42 (threshold 15). Drivers by points: loops 15 (22 pts), if/else 8 (20 pts) (nesting depth added 19). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DyldSharedCacheIOS16SurfaceAdapter.prepare (cognitive 42) · ×1
  • DyldSharedCacheIOS16SurfaceAdapter.prepare (cognitive 42) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOS16SurfaceAdapter.swift:22 — DyldSharedCacheIOS16SurfaceAdapter.prepare has cognitive complexity 42 (threshold 15). Drivers by points: boolean chains 24, if/else 9 (14 pts), loops 2, ternaries 2 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KDKImageExport.importOrder (cognitive 42) · ×1
  • KDKImageExport.importOrder (cognitive 42) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportFixups.swift:32 — KDKImageExport.importOrder has cognitive complexity 42 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 14, loops 3 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareTextRecognitionModels.plan (cognitive 41) · ×1
  • CustomFirmwareTextRecognitionModels.plan (cognitive 41) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTextRecognitionModels.swift:54 — CustomFirmwareTextRecognitionModels.plan has cognitive complexity 41 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 6 (13 pts), boolean chains 7 (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 · VPhoneVirtualMachine.init (cognitive 41) · ×1
  • VPhoneVirtualMachine.init (cognitive 41) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachine.swift:73 — VPhoneVirtualMachine.init has cognitive complexity 41 (threshold 15). Drivers by points: if/else 24 (28 pts), boolean chains 5, error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.pvOwnerOffset (cognitive 40) · ×1
  • KernelCustomFirmwarePatcher.pvOwnerOffset (cognitive 40) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:379 — KernelCustomFirmwarePatcher.pvOwnerOffset has cognitive complexity 40 (threshold 15). Drivers by points: boolean chains 31, if/else 2 (5 pts), loops 2 (3 pts), ternaries 1 (nesting depth added 4). 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 · KernelPatcher.patchHandleGetDevByRoleEntitlement (cognitive 40) · ×1
  • KernelPatcher.patchHandleGetDevByRoleEntitlement (cognitive 40) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:282 — KernelPatcher.patchHandleGetDevByRoleEntitlement has cognitive complexity 40 (threshold 15). Drivers by points: if/else 10 (25 pts), boolean chains 9, loops 3 (6 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadControlCommands.startCreation (cognitive 39) · ×1
  • VPhoneLaunchpadControlCommands.startCreation (cognitive 39) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:526 — VPhoneLaunchpadControlCommands.startCreation has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (26 pts), boolean chains 10, ternaries 1 (3 pts) (nesting depth added 8). Of this number, 36 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelPatcher.patchApfsVfsopMountCmp (cognitive 39) · ×1
  • KernelPatcher.patchApfsVfsopMountCmp (cognitive 39) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:33 — KernelPatcher.patchApfsVfsopMountCmp has cognitive complexity 39 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 4 (8 pts), boolean chains 7 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findWriteDowngradeGate (cognitive 38) · ×1
  • KernelCustomFirmwarePatcher.findWriteDowngradeGate (cognitive 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:246 — KernelCustomFirmwarePatcher.findWriteDowngradeGate has cognitive complexity 38 (threshold 15). Drivers by points: boolean chains 22, if/else 7 (14 pts), loops 1, ternaries 1 (nesting depth added 7). 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 · KDKRecovery.foreignMayReturn (cognitive 38) · ×1
  • KDKRecovery.foreignMayReturn (cognitive 38) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:242 — KDKRecovery.foreignMayReturn has cognitive complexity 38 (threshold 15). Drivers by points: if/else 13 (28 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestAPI.executeDevice (cognitive 37) · ×1
  • GuestAPI.executeDevice (cognitive 37) VPhoneDaemon/Daemon/GuestAPI+Device.swift:62 — GuestAPI.executeDevice has cognitive complexity 37 (threshold 15). Drivers by points: if/else 14 (30 pts), match/switch 2 (3 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Walk.compare (cognitive 37) · ×1
  • Walk.compare (cognitive 37) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:392 — Walk.compare has cognitive complexity 37 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 18). Of this number, 29 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadLogTail.follow (cognitive 37) · ×1
  • VPhoneLaunchpadLogTail.follow (cognitive 37) VPhoneLaunchpad/VPhoneLaunchpad/Application/VPhoneLaunchpadTerminal.swift:95 — VPhoneLaunchpadLogTail.follow has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (19 pts), boolean chains 10, loops 2 (4 pts), ternaries 1 (4 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 · KernelCustomFirmwarePatcher.findFilterChecks (cognitive 37) · ×1
  • KernelCustomFirmwarePatcher.findFilterChecks (cognitive 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:106 — KernelCustomFirmwarePatcher.findFilterChecks has cognitive complexity 37 (threshold 15). Drivers by points: if/else 7 (21 pts), boolean chains 12, loops 2 (3 pts), ternaries 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 · KernelCustomFirmwarePatcher.x1ExecPACGate (cognitive 37) · ×1
  • KernelCustomFirmwarePatcher.x1ExecPACGate (cognitive 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:165 — KernelCustomFirmwarePatcher.x1ExecPACGate has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 35, if/else 2. 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 · KernelCustomFirmwarePatcher.collectTaskConversionCandidates (cognitive 37) · ×1
  • KernelCustomFirmwarePatcher.collectTaskConversionCandidates (cognitive 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskConversion.swift:59 — KernelCustomFirmwarePatcher.collectTaskConversionCandidates has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 12, loops 1 (nesting depth added 12). Of this number, 34 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelPatcher.parseKextTextRange (cognitive 37) · ×1
  • KernelPatcher.parseKextTextRange (cognitive 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:249 — KernelPatcher.parseKextTextRange has cognitive complexity 37 (threshold 15). Drivers by points: if/else 10 (31 pts), loops 2 (5 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 · VPhoneVirtualMachineCreateCommand.validate (cognitive 37) · ×1
  • VPhoneVirtualMachineCreateCommand.validate (cognitive 37) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift:164 — VPhoneVirtualMachineCreateCommand.validate has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (25 pts), boolean chains 12 (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 · VPhoneMachOImage.init (cognitive 37) · ×1
  • VPhoneMachOImage.init (cognitive 37) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift:60 — VPhoneMachOImage.init has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (25 pts), boolean chains 6, ternaries 1 (3 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 · KDKRecovery.recover (cognitive 37) · ×1
  • KDKRecovery.recover (cognitive 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecovery.swift:157 — KDKRecovery.recover has cognitive complexity 37 (threshold 15). Drivers by points: if/else 6 (25 pts), boolean chains 6, loops 3 (6 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 · CustomFirmwareRemotePairing.rejectsLocalConnection (cognitive 37) · ×1
  • CustomFirmwareRemotePairing.rejectsLocalConnection (cognitive 37) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/RemotePairing/CustomFirmwareRemotePairing.swift:142 — CustomFirmwareRemotePairing.rejectsLocalConnection has cognitive complexity 37 (threshold 15). Drivers by points: boolean chains 29, if/else 6 (7 pts), ternaries 1 (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 · IBootPatcher.patchSizeVerifyByShape (cognitive 36) · ×1
  • IBootPatcher.patchSizeVerifyByShape (cognitive 36) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift:117 — IBootPatcher.patchSizeVerifyByShape has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 12, loops 3 (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 · TXMDevPatcher.patchSelector42_29Shellcode (cognitive 36) · ×1
  • TXMDevPatcher.patchSelector42_29Shellcode (cognitive 36) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:578 — TXMDevPatcher.patchSelector42_29Shellcode has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (24 pts), boolean chains 11, 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 · KDKInstruction.writes (cognitive 36) · ×1
  • KDKInstruction.writes (cognitive 36) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKInstruction.swift:74 — KDKInstruction.writes has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 20, if/else 9 (16 pts) (nesting depth added 7). 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 · VPhoneLaunchpadDiskExtents.map (cognitive 35) · ×1
  • VPhoneLaunchpadDiskExtents.map (cognitive 35) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskExtents.swift:112 — VPhoneLaunchpadDiskExtents.map has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (27 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findForkEntryLink (cognitive 35) · ×1
  • KernelCustomFirmwarePatcher.findForkEntryLink (cognitive 35) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:220 — KernelCustomFirmwarePatcher.findForkEntryLink has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 24, if/else 7 (9 pts), loops 2 (nesting depth added 2). Of this number, 31 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.x1ExecSharedRegionGate (cognitive 35) · ×1
  • KernelCustomFirmwarePatcher.x1ExecSharedRegionGate (cognitive 35) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:104 — KernelCustomFirmwarePatcher.x1ExecSharedRegionGate has cognitive complexity 35 (threshold 15). Drivers by points: boolean chains 29, if/else 2 (4 pts), loops 1, ternaries 1 (nesting depth added 2). 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 · VPhoneVirtualMachineCreateBulkCommand.run (cognitive 35) · ×1
  • VPhoneVirtualMachineCreateBulkCommand.run (cognitive 35) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateBulkCommand.swift:51 — VPhoneVirtualMachineCreateBulkCommand.run has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (22 pts), loops 4 (5 pts), error handling 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.terminateSite (cognitive 35) · ×1
  • CustomFirmwareVirtualAudio.terminateSite (cognitive 35) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2192 — CustomFirmwareVirtualAudio.terminateSite has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 14, loops 3, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadDiskMeter.measure (cognitive 34) · ×1
  • VPhoneLaunchpadDiskMeter.measure (cognitive 34) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swift:163 — VPhoneLaunchpadDiskMeter.measure has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 2 (7 pts), loops 3 (4 pts), boolean chains 3 (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 · IBootPatcher.enumerateHashGetters (cognitive 34) · ×1
  • IBootPatcher.enumerateHashGetters (cognitive 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:111 — IBootPatcher.enumerateHashGetters has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 3 (6 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 · KernelCustomFirmwarePatcher.tproGuardFlagVA (cognitive 34) · ×1
  • KernelCustomFirmwarePatcher.tproGuardFlagVA (cognitive 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchTproOff.swift:86 — KernelCustomFirmwarePatcher.tproGuardFlagVA has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 30, if/else 4. 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 · KernelPatcherBase.parseKextTextExecRange (cognitive 34) · ×1
  • KernelPatcherBase.parseKextTextExecRange (cognitive 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:472 — KernelPatcherBase.parseKextTextExecRange has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (29 pts), loops 2 (5 pts) (nesting depth added 23). 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 · FirmwarePipeline.findFile (cognitive 34) · ×1
  • FirmwarePipeline.findFile (cognitive 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Pipeline/FirmwarePipelineDiscovery.swift:183 — FirmwarePipeline.findFile has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (9 pts), boolean chains 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SPTMSecondaryCPUPatcher.tunableBranches (cognitive 34) · ×1
  • SPTMSecondaryCPUPatcher.tunableBranches (cognitive 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SPTM/SPTMSecondaryCPUPatcher.swift:120 — SPTMSecondaryCPUPatcher.tunableBranches has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 22, if/else 6 (11 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VPhonePCCGPURecovery.stageFromSystemDisk (cognitive 34) · ×1
  • VPhonePCCGPURecovery.stageFromSystemDisk (cognitive 34) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Host/VPhonePCCGPURecovery.swift:143 — VPhonePCCGPURecovery.stageFromSystemDisk has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (23 pts), boolean chains 6, error handling 3 (4 pts), ternaries 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 · VPhoneMachOFile.init (cognitive 34) · ×1
  • VPhoneMachOFile.init (cognitive 34) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift:445 — VPhoneMachOFile.init has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (26 pts), boolean chains 4, loops 1 (2 pts), match/switch 1, ternaries 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 · DyldSharedCacheMachPortsPatcher.prepare (cognitive 34) · ×1
  • DyldSharedCacheMachPortsPatcher.prepare (cognitive 34) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMachPortsPatcher.swift:15 — DyldSharedCacheMachPortsPatcher.prepare has cognitive complexity 34 (threshold 15). Drivers by points: boolean chains 18, if/else 8 (9 pts), loops 4, ternaries 3 (nesting depth added 1). Of this number, 32 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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 · VPhoneCrashReportContent.reindent (cognitive 34) · ×1
  • VPhoneCrashReportContent.reindent (cognitive 34) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/CrashLogs/VPhoneCrashReportContent.swift:104 — VPhoneCrashReportContent.reindent has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (22 pts), boolean chains 6, loops 2 (4 pts), match/switch 1 (2 pts) (nesting depth added 14). Of this number, 31 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneRemoteZip.parseCentralDirectory (cognitive 33) · ×1
  • VPhoneRemoteZip.parseCentralDirectory (cognitive 33) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneRemoteZip.swift:222 — VPhoneRemoteZip.parseCentralDirectory has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (24 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchThreadSetStateEntitlementFlag (cognitive 33) · ×1
  • KernelCustomFirmwarePatcher.patchThreadSetStateEntitlementFlag (cognitive 33) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchThreadSetState.swift:22 — KernelCustomFirmwarePatcher.patchThreadSetStateEntitlementFlag has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 15, if/else 7 (14 pts), loops 3 (4 pts) (nesting depth added 8). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCollectionStubCalls.directCalls (cognitive 33) · ×1
  • KernelCollectionStubCalls.directCalls (cognitive 33) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCollectionStubCalls.swift:73 — KernelCollectionStubCalls.directCalls has cognitive complexity 33 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 5 (9 pts), boolean chains 5, ternaries 1 (5 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SEPResearchBoardPatcher.dispatchTable (cognitive 33) · ×1
  • SEPResearchBoardPatcher.dispatchTable (cognitive 33) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/SEP/SEPResearchBoardPatcher.swift:158 — SEPResearchBoardPatcher.dispatchTable has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 27, if/else 3 (5 pts), loops 1 (nesting depth added 2). 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 · DyldSharedCacheGLESDepthClipPatcher.patch (cognitive 33) · ×1
  • DyldSharedCacheGLESDepthClipPatcher.patch (cognitive 33) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESDepthClipPatcher.swift:41 — DyldSharedCacheGLESDepthClipPatcher.patch has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 10, loops 1 (2 pts), ternaries 2 (nesting depth added 6). Of this number, 28 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and 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 · KDKRecovery.metadataReferences (cognitive 33) · ×1
  • KDKRecovery.metadataReferences (cognitive 33) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryMetadata.swift:5 — KDKRecovery.metadataReferences has cognitive complexity 33 (threshold 15). Drivers by points: loops 6 (16 pts), if/else 5 (9 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · GuestIrisinInstaller.patchRootHideDaemon (cognitive 32) · ×1
  • GuestIrisinInstaller.patchRootHideDaemon (cognitive 32) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideDaemons.swift:14 — GuestIrisinInstaller.patchRootHideDaemon has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 5, loops 3 (4 pts) (nesting depth added 7). Of this number, 28 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneTemplateSlimmingRequest.resolve (cognitive 32) · ×1
  • VPhoneTemplateSlimmingRequest.resolve (cognitive 32) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSlimmingRequest.swift:107 — VPhoneTemplateSlimmingRequest.resolve has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 6, ternaries 5, error handling 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 · VPhoneNetworking.merge (cognitive 32) · ×1
  • VPhoneNetworking.merge (cognitive 32) VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift:510 — VPhoneNetworking.merge has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (15 pts), ternaries 6 (9 pts), boolean chains 4, loops 2, match/switch 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.matchPersonaHelper (cognitive 32) · ×1
  • KernelCustomFirmwarePatcher.matchPersonaHelper (cognitive 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:95 — KernelCustomFirmwarePatcher.matchPersonaHelper has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 10, loops 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.matchUpstreamTaskForPidGate (cognitive 32) · ×1
  • KernelCustomFirmwarePatcher.matchUpstreamTaskForPidGate (cognitive 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:68 — KernelCustomFirmwarePatcher.matchUpstreamTaskForPidGate has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 17, if/else 11 (14 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCacheKDK.mix (cognitive 32) · ×1
  • KernelCacheKDK.mix (cognitive 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCacheKDK.swift:71 — KernelCacheKDK.mix has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 5 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 9). Of this number, 31 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.epilogueEntry (cognitive 32) · ×1
  • CustomFirmwareVirtualAudio.epilogueEntry (cognitive 32) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2606 — CustomFirmwareVirtualAudio.epilogueEntry has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 25, if/else 5 (6 pts), loops 1 (nesting depth added 1). Of this number, 31 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · main.swift.top-level code (cognitive 32) · ×1
  • main.swift.top-level code (cognitive 32) VPhoneLaunchpad/VPhoneLaunchpadCLI/main.swift:97 — main.swift.top-level code has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 5, loops 2 (3 pts), ternaries 1 (2 pts), error handling 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 · CustomFirmwareDaemons.visionOSEnvironmentFeatures (cognitive 31) · ×1
  • CustomFirmwareDaemons.visionOSEnvironmentFeatures (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift:17 — CustomFirmwareDaemons.visionOSEnvironmentFeatures has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (21 pts), boolean chains 9, 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 · KernelCustomFirmwarePatcher.patchCredLabelUpdateExecve (cognitive 31) · ×1
  • KernelCustomFirmwarePatcher.patchCredLabelUpdateExecve (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchCredLabel.swift:32 — KernelCustomFirmwarePatcher.patchCredLabelUpdateExecve has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (22 pts), loops 3 (4 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcherBase.findProcSecurityPolicy (cognitive 31) · ×1
  • KernelCustomFirmwarePatcherBase.findProcSecurityPolicy (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:228 — KernelCustomFirmwarePatcherBase.findProcSecurityPolicy has cognitive complexity 31 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 5 (10 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TXMDevPatcher.patchDeveloperModeBypass (cognitive 31) · ×1
  • TXMDevPatcher.patchDeveloperModeBypass (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:745 — TXMDevPatcher.patchDeveloperModeBypass has cognitive complexity 31 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 12, loops 3 (5 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneVirtualMachineWindowController.showWindow (cognitive 31) · ×1
  • VPhoneVirtualMachineWindowController.showWindow (cognitive 31) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift:40 — VPhoneVirtualMachineWindowController.showWindow has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 4, ternaries 3 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKRecovery.mayReturn (cognitive 31) · ×1
  • KDKRecovery.mayReturn (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:198 — KDKRecovery.mayReturn has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 4, 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 · CustomFirmwareSeputil.references (cognitive 31) · ×1
  • CustomFirmwareSeputil.references (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Sep/CustomFirmwareSeputil.swift:403 — CustomFirmwareSeputil.references has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 20, if/else 4 (8 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.locateSPGate (cognitive 31) · ×1
  • CustomFirmwareVirtualAudio.locateSPGate (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1557 — CustomFirmwareVirtualAudio.locateSPGate has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 18, if/else 7 (12 pts), loops 1 (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.locateVolumeGate (cognitive 31) · ×1
  • CustomFirmwareVirtualAudio.locateVolumeGate (cognitive 31) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1691 — CustomFirmwareVirtualAudio.locateVolumeGate has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 19, if/else 7 (11 pts), loops 1 (nesting depth added 4). 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 · VPhoneOTAArchive.stageUserland (cognitive 30) · ×1
  • VPhoneOTAArchive.stageUserland (cognitive 30) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:468 — VPhoneOTAArchive.stageUserland has cognitive complexity 30 (threshold 15). Drivers by points: if/else 24 (27 pts), boolean chains 3 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · IBootPatcher.patchImage4Callback (cognitive 30) · ×1
  • IBootPatcher.patchImage4Callback (cognitive 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchImage4Callback.swift:14 — IBootPatcher.patchImage4Callback has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.buildForkInheritCave (cognitive 30) · ×1
  • KernelCustomFirmwarePatcher.buildForkInheritCave (cognitive 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:333 — KernelCustomFirmwarePatcher.buildForkInheritCave has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 13, if/else 8 (10 pts), loops 6, ternaries 1 (nesting depth added 2). Of this number, 27 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findProcPidinfoGuards (cognitive 30) · ×1
  • KernelCustomFirmwarePatcher.findProcPidinfoGuards (cognitive 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchProcPidinfo.swift:67 — KernelCustomFirmwarePatcher.findProcPidinfoGuards has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 11, loops 1, ternaries 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 · VPhoneCustomFirmwareInstaller.runKernelUpdate (cognitive 30) · ×1
  • VPhoneCustomFirmwareInstaller.runKernelUpdate (cognitive 30) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:764 — VPhoneCustomFirmwareInstaller.runKernelUpdate has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (18 pts), boolean chains 11, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · KDKRecovery.followJumpTable (cognitive 30) · ×1
  • KDKRecovery.followJumpTable (cognitive 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:157 — KDKRecovery.followJumpTable has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 15, if/else 11 (13 pts), loops 1, ternaries 1 (nesting depth added 2). Of this number, 28 points are the body's own statements and 2 belong to 2 function items inside it that branch. 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 · CustomFirmwareWatchAudioBudget.discover (cognitive 30) · ×1
  • CustomFirmwareWatchAudioBudget.discover (cognitive 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareWatchAudioBudget.swift:122 — CustomFirmwareWatchAudioBudget.discover has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 14, 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 · CustomFirmwareVirtualAudio.isCAExceptionThrowBlock (cognitive 30) · ×1
  • CustomFirmwareVirtualAudio.isCAExceptionThrowBlock (cognitive 30) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2070 — CustomFirmwareVirtualAudio.isCAExceptionThrowBlock has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 13, 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 · VPhoneArchiveExtractor.unpack (cognitive 29) · ×1
  • VPhoneArchiveExtractor.unpack (cognitive 29) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveExtractor.swift:51 — VPhoneArchiveExtractor.unpack has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (24 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneAPFSSnapshot.rename (cognitive 29) · ×1
  • VPhoneAPFSSnapshot.rename (cognitive 29) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAPFSSnapshot.swift:206 — VPhoneAPFSSnapshot.rename has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (17 pts), loops 5 (9 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 · CryptexFilesystemPatcher.mergeFilesystems (cognitive 29) · ×1
  • CryptexFilesystemPatcher.mergeFilesystems (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift:179 — CryptexFilesystemPatcher.mergeFilesystems has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (27 pts), boolean chains 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 · DeviceTreePatcher.applyGuestEdits (cognitive 29) · ×1
  • DeviceTreePatcher.applyGuestEdits (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:783 — DeviceTreePatcher.applyGuestEdits has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (19 pts), match/switch 2 (4 pts), ternaries 1 (3 pts), boolean chains 2, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchAmfiExecveKillPath (cognitive 29) · ×1
  • KernelCustomFirmwarePatcher.patchAmfiExecveKillPath (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiExecve.swift:28 — KernelCustomFirmwarePatcher.patchAmfiExecveKillPath has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.tvTPROPagersDefault (cognitive 29) · ×1
  • KernelCustomFirmwarePatcher.tvTPROPagersDefault (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchTVTPROPagers.swift:23 — KernelCustomFirmwarePatcher.tvTPROPagersDefault has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 16, if/else 7 (10 pts), ternaries 2, loops 1 (nesting depth added 3). Of this number, 24 points are the body's own statements and 5 belong to 2 function items inside it that branch. 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 · KernelPatcher.patchBsdInitRootvp (cognitive 29) · ×1
  • KernelPatcher.patchBsdInitRootvp (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Startup/KernelPatchBsdInit.swift:53 — KernelPatcher.patchBsdInitRootvp has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneFirmwareOTACommand.complete (cognitive 29) · ×1
  • VPhoneFirmwareOTACommand.complete (cognitive 29) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:247 — VPhoneFirmwareOTACommand.complete has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (23 pts), boolean chains 4, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheHypervisorVirtualMachinePatcher.patch (cognitive 29) · ×1
  • DyldSharedCacheHypervisorVirtualMachinePatcher.patch (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:266 — DyldSharedCacheHypervisorVirtualMachinePatcher.patch has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (19 pts), ternaries 3 (5 pts), error handling 1 (2 pts), loops 2, 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 · DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites (cognitive 29) · ×1
  • DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:122 — DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.findSites has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareWatchDog.locateSites (cognitive 29) · ×1
  • CustomFirmwareWatchDog.locateSites (cognitive 29) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogDiscovery.swift:15 — CustomFirmwareWatchDog.locateSites has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 9, loops 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 · VPhoneTreeFingerprint.capture (cognitive 28) · ×1
  • VPhoneTreeFingerprint.capture (cognitive 28) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift:59 — VPhoneTreeFingerprint.capture has cognitive complexity 28 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 4 (8 pts), boolean chains 4, loops 4 (nesting depth added 10). Of this number, 23 points are the body's own statements and 5 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneTreeFingerprint.differences (cognitive 28) · ×1
  • VPhoneTreeFingerprint.differences (cognitive 28) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneTreeFingerprint.swift:139 — VPhoneTreeFingerprint.differences has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (24 pts), loops 3, boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudioGraphConfigurations.useRawSpeakerChain (cognitive 28) · ×1
  • CustomFirmwareVirtualAudioGraphConfigurations.useRawSpeakerChain (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioGraphConfigurations.swift:197 — CustomFirmwareVirtualAudioGraphConfigurations.useRawSpeakerChain has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeviceTreePatcher.applyPatches (cognitive 28) · ×1
  • DeviceTreePatcher.applyPatches (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:364 — DeviceTreePatcher.applyPatches has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 4, match/switch 2 (4 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 · KernelCustomFirmwarePatcher.findUpstreamCleanupCall (cognitive 28) · ×1
  • KernelCustomFirmwarePatcher.findUpstreamCleanupCall (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDounmount.swift:43 — KernelCustomFirmwarePatcher.findUpstreamCleanupCall has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 7, 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 · KernelPatcher.findSandboxOpsTable (cognitive 28) · ×1
  • KernelPatcher.findSandboxOpsTable (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:108 — KernelPatcher.findSandboxOpsTable has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TXMDevPatcher.findUdfCave (cognitive 28) · ×1
  • TXMDevPatcher.findUdfCave (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:168 — TXMDevPatcher.findUdfCave has cognitive complexity 28 (threshold 15). Drivers by points: if/else 5 (16 pts), ternaries 2 (7 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · VPhoneHTTPTransaction.run (cognitive 28) · ×1
  • VPhoneHTTPTransaction.run (cognitive 28) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1323 — VPhoneHTTPTransaction.run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1.lowerUniversal (cognitive 28) · ×1
  • CustomFirmwareArm64eX1.lowerUniversal (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:572 — CustomFirmwareArm64eX1.lowerUniversal has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 9, ternaries 3 (5 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKExtraction.extract (cognitive 28) · ×1
  • KDKExtraction.extract (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExtraction.swift:12 — KDKExtraction.extract has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), boolean chains 7, loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.gatedDeviceStateSite (cognitive 28) · ×1
  • CustomFirmwareVirtualAudio.gatedDeviceStateSite (cognitive 28) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1958 — CustomFirmwareVirtualAudio.gatedDeviceStateSite has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 23, if/else 5. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VPhoneHomePodDefaultsModel.change (cognitive 28) · ×1
  • VPhoneHomePodDefaultsModel.change (cognitive 28) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDefaultsModel.swift:164 — VPhoneHomePodDefaultsModel.change has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 4 (11 pts), loops 1 (2 pts), boolean chains 1, error handling 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 · VPhoneAttitudeLinearScale.body (cognitive 28) · ×1
  • VPhoneAttitudeLinearScale.body (cognitive 28) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneAttitudeDial.swift:240 — VPhoneAttitudeLinearScale.body has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 14 (22 pts), if/else 3 (5 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestAPI.executeAttitude (cognitive 27) · ×1
  • GuestAPI.executeAttitude (cognitive 27) VPhoneDaemon/Daemon/GuestAPI+Attitude.swift:10 — GuestAPI.executeAttitude has cognitive complexity 27 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (3 pts) (nesting depth added 15). 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 · GuestIrisinInstaller.ensureRootHideMachOLinks (cognitive 27) · ×1
  • GuestIrisinInstaller.ensureRootHideMachOLinks (cognitive 27) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHide.swift:110 — GuestIrisinInstaller.ensureRootHideMachOLinks has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneOTAArchive.resolve (cognitive 27) · ×1
  • VPhoneOTAArchive.resolve (cognitive 27) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:794 — VPhoneOTAArchive.resolve has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 6, ternaries 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudioMicrophoneChains.patch (cognitive 27) · ×1
  • CustomFirmwareVirtualAudioMicrophoneChains.patch (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioMicrophoneChains.swift:75 — CustomFirmwareVirtualAudioMicrophoneChains.patch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15 (23 pts), loops 2 (3 pts), error handling 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchAmfiCdhashInTrustcache (cognitive 27) · ×1
  • KernelCustomFirmwarePatcher.patchAmfiCdhashInTrustcache (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchAmfiTrustcache.swift:23 — KernelCustomFirmwarePatcher.patchAmfiCdhashInTrustcache has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findSandboxOpsTable (cognitive 27) · ×1
  • KernelCustomFirmwarePatcher.findSandboxOpsTable (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:113 — KernelCustomFirmwarePatcher.findSandboxOpsTable has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 4, loops 3 (4 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 · KernelCustomFirmwarePatcher.x1GradeTail (cognitive 27) · ×1
  • KernelCustomFirmwarePatcher.x1GradeTail (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchArm64eX1.swift:147 — KernelCustomFirmwarePatcher.x1GradeTail has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 26, if/else 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 · TXMDevPatcher.remapCategory (cognitive 27) · ×1
  • TXMDevPatcher.remapCategory (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:237 — TXMDevPatcher.remapCategory has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 11, 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 · CustomFirmwareArm64eX1Audit.containsX1 (cognitive 27) · ×1
  • CustomFirmwareArm64eX1Audit.containsX1 (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:134 — CustomFirmwareArm64eX1Audit.containsX1 has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 3 (5 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 · DyldSharedCacheGLESPointDrawPatcher.patch (cognitive 27) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.patch (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:87 — DyldSharedCacheGLESPointDrawPatcher.patch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, ternaries 4 (7 pts), loops 3 (5 pts) (nesting depth added 8). Of this number, 20 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.pipelineFields (cognitive 27) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.pipelineFields (cognitive 27) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:162 — DyldSharedCacheGLESPointDrawPatcher.pipelineFields has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 23, if/else 2 (3 pts), loops 1 (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 · GuestStaticNames.set (cognitive 26) · ×1
  • GuestStaticNames.set (cognitive 26) VPhoneDaemon/Daemon/GuestStaticNames.swift:57 — GuestStaticNames.set has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (9 pts), loops 3 (4 pts), ternaries 1 (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 · CustomFirmwareDaemons.visionOSLegacyUXMFeatures (cognitive 26) · ×1
  • CustomFirmwareDaemons.visionOSLegacyUXMFeatures (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift:78 — CustomFirmwareDaemons.visionOSLegacyUXMFeatures has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 10). Of this number, 19 points are the body's own statements and 7 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudioMicrophoneChains.neutralizeGain (cognitive 26) · ×1
  • CustomFirmwareVirtualAudioMicrophoneChains.neutralizeGain (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioMicrophoneChains.swift:186 — CustomFirmwareVirtualAudioMicrophoneChains.neutralizeGain has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (18 pts), boolean chains 4, loops 2 (3 pts), error handling 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DeviceTreePatcher.guestEdits (cognitive 26) · ×1
  • DeviceTreePatcher.guestEdits (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:156 — DeviceTreePatcher.guestEdits has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 7, loops 4 (5 pts) (nesting depth added 4). Of this number, 24 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and 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 · IBootPatcher.findBootArgsAdrp (cognitive 26) · ×1
  • IBootPatcher.findBootArgsAdrp (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootArgs.swift:104 — IBootPatcher.findBootArgsAdrp has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (20 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findUnixSyscallCheckCalls (cognitive 26) · ×1
  • KernelCustomFirmwarePatcher.findUnixSyscallCheckCalls (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:185 — KernelCustomFirmwarePatcher.findUnixSyscallCheckCalls has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 14, if/else 2 (6 pts), loops 2 (3 pts), ternaries 1 (3 pts) (nesting depth added 7). Of this number, 23 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findSysentTable (cognitive 26) · ×1
  • KernelCustomFirmwarePatcher.findSysentTable (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchKcall10.swift:141 — KernelCustomFirmwarePatcher.findSysentTable has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4 (8 pts), boolean chains 6 (nesting depth added 9). Of this number, 20 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelPatcher.patchPostValidationNOP (cognitive 26) · ×1
  • KernelPatcher.patchPostValidationNOP (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:25 — KernelPatcher.patchPostValidationNOP has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 6, loops 4 (6 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 · VPhoneCustomFirmwareInstaller.applyGuestPatches · ×1
  • VPhoneCustomFirmwareInstaller.applyGuestPatches::on (cognitive 26) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1385 — VPhoneCustomFirmwareInstaller.applyGuestPatches::on has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 22, if/else 4. 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. This shape REPEATS in the file: one other method here (VPhoneCustomFirmwareInstaller.applyGuestPatches) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1.lower (cognitive 26) · ×1
  • CustomFirmwareArm64eX1.lower (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:159 — CustomFirmwareArm64eX1.lower has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 15, if/else 8 (9 pts), loops 2 (nesting depth added 1). Of this number, 20 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheXPCLWCRPatcher.apply (cognitive 26) · ×1
  • DyldSharedCacheXPCLWCRPatcher.apply (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:139 — DyldSharedCacheXPCLWCRPatcher.apply has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (16 pts), loops 4 (5 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheXPCLWCRPatcher.findConsistencyCheck (cognitive 26) · ×1
  • DyldSharedCacheXPCLWCRPatcher.findConsistencyCheck (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:278 — DyldSharedCacheXPCLWCRPatcher.findConsistencyCheck has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKImageExport.rebuildLinkedit (cognitive 26) · ×1
  • KDKImageExport.rebuildLinkedit (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:147 — KDKImageExport.rebuildLinkedit has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 6 (7 pts), boolean chains 4 (nesting depth added 6). Of this number, 25 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.locateMuteSet (cognitive 26) · ×1
  • CustomFirmwareVirtualAudio.locateMuteSet (cognitive 26) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1306 — CustomFirmwareVirtualAudio.locateMuteSet has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 9, loops 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestAPI.restoreSystemApp (cognitive 25) · ×1
  • GuestAPI.restoreSystemApp (cognitive 25) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:434 — GuestAPI.restoreSystemApp has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1, error handling 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 · VPhoneArchiveWriter.pack (cognitive 25) · ×1
  • VPhoneArchiveWriter.pack (cognitive 25) VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveWriter.swift:57 — VPhoneArchiveWriter.pack has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, match/switch 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneFirmwareIndex.releases (cognitive 25) · ×1
  • VPhoneFirmwareIndex.releases (cognitive 25) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareIndex.swift:106 — VPhoneFirmwareIndex.releases has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 9, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadControlCommands.slimming (cognitive 25) · ×1
  • VPhoneLaunchpadControlCommands.slimming (cognitive 25) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:727 — VPhoneLaunchpadControlCommands.slimming has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15 (20 pts), boolean chains 4, match/switch 1 (nesting depth added 5). Of this number, 22 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareMachOCodeSignature.reattest (cognitive 25) · ×1
  • CustomFirmwareMachOCodeSignature.reattest (cognitive 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift:286 — CustomFirmwareMachOCodeSignature.reattest has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (20 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.debugEntryBit (cognitive 25) · ×1
  • KernelCustomFirmwarePatcher.debugEntryBit (cognitive 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:184 — KernelCustomFirmwarePatcher.debugEntryBit has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 18, if/else 3 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). Of this number, 17 points are the body's own statements and 8 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchConvertPortToMap (cognitive 25) · ×1
  • KernelCustomFirmwarePatcher.patchConvertPortToMap (cognitive 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchPortToMap.swift:14 — KernelCustomFirmwarePatcher.patchConvertPortToMap has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (3 pts), boolean chains 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 · RestoreRamDiskSealPatcher.copiedTemplateTarget (cognitive 25) · ×1
  • RestoreRamDiskSealPatcher.copiedTemplateTarget (cognitive 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Restore/RestoreRamDiskSealPatcher.swift:214 — RestoreRamDiskSealPatcher.copiedTemplateTarget has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 21, if/else 2 (3 pts), loops 1 (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 · CustomFirmwareArm64eX1.sameDecode (cognitive 25) · ×1
  • CustomFirmwareArm64eX1.sameDecode (cognitive 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1.swift:139 — CustomFirmwareArm64eX1.sameDecode has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 23, if/else 2. 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 · CustomFirmwareVirtualAudio.patch (cognitive 25) · ×1
  • CustomFirmwareVirtualAudio.patch (cognitive 25) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:427 — CustomFirmwareVirtualAudio.patch has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 8, ternaries 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestHyperTextHandler.handle (cognitive 24) · ×1
  • GuestHyperTextHandler.handle (cognitive 24) VPhoneDaemon/Daemon/GuestHyperTextHandler.swift:115 — GuestHyperTextHandler.handle has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 1 (3 pts), ternaries 1 (3 pts), match/switch 1 (2 pts), 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 · GuestPointGeometry.geometry (cognitive 24) · ×1
  • GuestPointGeometry.geometry (cognitive 24) VPhoneDaemon/Daemon/GuestPointGeometry.swift:9 — GuestPointGeometry.geometry has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 20, if/else 3, error handling 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 · CustomFirmwareVirtualAudioGraphConfigurations.patch (cognitive 24) · ×1
  • CustomFirmwareVirtualAudioGraphConfigurations.patch (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareVirtualAudioGraphConfigurations.swift:71 — CustomFirmwareVirtualAudioGraphConfigurations.patch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (18 pts), loops 3 (4 pts), match/switch 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IBootPatcher.patchSerialLabels (cognitive 24) · ×1
  • IBootPatcher.patchSerialLabels (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchSerialLabels.swift:12 — IBootPatcher.patchSerialLabels has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 4 (7 pts), boolean chains 1, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchParavirtTask3Version (cognitive 24) · ×1
  • KernelCustomFirmwarePatcher.patchParavirtTask3Version (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:52 — KernelCustomFirmwarePatcher.patchParavirtTask3Version has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 16, if/else 6 (7 pts), loops 1 (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 · KernelPatcher.patchApfsSealBroken (cognitive 24) · ×1
  • KernelPatcher.patchApfsSealBroken (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSeal.swift:18 — KernelPatcher.patchApfsSealBroken has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RestoreRamDiskSealPatcher.findADRPADDReferences (cognitive 24) · ×1
  • RestoreRamDiskSealPatcher.findADRPADDReferences (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Restore/RestoreRamDiskSealPatcher.swift:243 — RestoreRamDiskSealPatcher.findADRPADDReferences has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 15, if/else 5 (8 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · TXMDevPatcher.findDebuggerGateFuncStart (cognitive 24) · ×1
  • TXMDevPatcher.findDebuggerGateFuncStart (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:219 — TXMDevPatcher.findDebuggerGateFuncStart has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 10, 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 · VPhoneCustomFirmwareInstaller.updateHomePodSoundBoard (cognitive 24) · ×1
  • VPhoneCustomFirmwareInstaller.updateHomePodSoundBoard (cognitive 24) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:3664 — VPhoneCustomFirmwareInstaller.updateHomePodSoundBoard has cognitive complexity 24 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 5 (nesting depth added 4). Of this number, 13 points are the body's own statements and 11 belong to 2 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and 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 · VPhoneMachineList.options (cognitive 24) · ×1
  • VPhoneMachineList.options (cognitive 24) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateBulkCommand.swift:223 — VPhoneMachineList.options has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 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 · VPhoneExternalDisplayWindowController.connect (cognitive 24) · ×1
  • VPhoneExternalDisplayWindowController.connect (cognitive 24) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneExternalDisplayWindowController.swift:33 — VPhoneExternalDisplayWindowController.connect has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 7, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheMISTrustAuthPatcher.findLiteralReference (cognitive 24) · ×1
  • DyldSharedCacheMISTrustAuthPatcher.findLiteralReference (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:472 — DyldSharedCacheMISTrustAuthPatcher.findLiteralReference has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (8 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheMaxSlidePatcher.patch (cognitive 24) · ×1
  • DyldSharedCacheMaxSlidePatcher.patch (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMaxSlidePatcher.swift:228 — DyldSharedCacheMaxSlidePatcher.patch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 16 (19 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 4). Of this number, 23 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and 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 · KDKExtraction.pseudoExtensions (cognitive 24) · ×1
  • KDKExtraction.pseudoExtensions (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExtraction.swift:162 — KDKExtraction.pseudoExtensions has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6, loops 3 (6 pts), ternaries 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 · KDKImageExport.remap (cognitive 24) · ×1
  • KDKImageExport.remap (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKImageExport.swift:129 — KDKImageExport.remap has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 4 (11 pts), boolean chains 6, if/else 2 (4 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.isThrowBlock (cognitive 24) · ×1
  • CustomFirmwareVirtualAudio.isThrowBlock (cognitive 24) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2382 — CustomFirmwareVirtualAudio.isThrowBlock has cognitive complexity 24 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (11 pts), loops 1 (nesting depth added 6). 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 · GuestAPI.executeGyroscope (cognitive 23) · ×1
  • GuestAPI.executeGyroscope (cognitive 23) VPhoneDaemon/Daemon/GuestAPI+Gyroscope.swift:10 — GuestAPI.executeGyroscope has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 4, loops 1 (3 pts) (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 · GuestAPI.removeSystemApp (cognitive 23) · ×1
  • GuestAPI.removeSystemApp (cognitive 23) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:225 — GuestAPI.removeSystemApp has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (14 pts), error handling 3 (5 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestAPI.executeVisionOSImmersion (cognitive 23) · ×1
  • GuestAPI.executeVisionOSImmersion (cognitive 23) VPhoneDaemon/Daemon/GuestAPI+VisionOSImmersion.swift:9 — GuestAPI.executeVisionOSImmersion has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 11 (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 · CustomFirmwareDaemons.visionOSNonfatalServices (cognitive 23) · ×1
  • CustomFirmwareDaemons.visionOSNonfatalServices (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemonsLaunchd.swift:135 — CustomFirmwareDaemons.visionOSNonfatalServices has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (7 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 · DyldSharedCacheChunkSet.readInstallName (cognitive 23) · ×1
  • DyldSharedCacheChunkSet.readInstallName (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift:509 — DyldSharedCacheChunkSet.readInstallName has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcherBase.findCodeCave (cognitive 23) · ×1
  • KernelCustomFirmwarePatcherBase.findCodeCave (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:140 — KernelCustomFirmwarePatcherBase.findCodeCave has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (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 · KernelPatcher.findDebuggerByFullScan (cognitive 23) · ×1
  • KernelPatcher.findDebuggerByFullScan (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift:145 — KernelPatcher.findDebuggerByFullScan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 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 · KernelPatcherBase.kextTextRange (cognitive 23) · ×1
  • KernelPatcherBase.kextTextRange (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:419 — KernelPatcherBase.kextTextRange has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 7, 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 · VPhoneFirmwareOTACommand.capture (cognitive 23) · ×1
  • VPhoneFirmwareOTACommand.capture (cognitive 23) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:115 — VPhoneFirmwareOTACommand.capture has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (9 pts), loops 1 (nesting depth added 2). 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 · VPhoneVirtualMachineInfoCommand.run (cognitive 23) · ×1
  • VPhoneVirtualMachineInfoCommand.run (cognitive 23) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift:153 — VPhoneVirtualMachineInfoCommand.run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneArm64eX1Lowering.replacement (cognitive 23) · ×1
  • VPhoneArm64eX1Lowering.replacement (cognitive 23) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/VPhoneArm64eX1Lowering.swift:9 — VPhoneArm64eX1Lowering.replacement has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (7 pts), ternaries 1 (2 pts), match/switch 1 (nesting depth added 4). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · KDKImageExport.symbolTable (cognitive 23) · ×1
  • KDKImageExport.symbolTable (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:17 — KDKImageExport.symbolTable has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 5 (6 pts), ternaries 3 (4 pts), boolean chains 3 (nesting depth added 7). Of this number, 17 points are the body's own statements and 6 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareWatchAudioBudget.flagStore (cognitive 23) · ×1
  • CustomFirmwareWatchAudioBudget.flagStore (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareWatchAudioBudget.swift:216 — CustomFirmwareWatchAudioBudget.flagStore has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 18, if/else 2 (4 pts), loops 1 (nesting depth added 2). 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 · CustomFirmwareJetsamPatcher.findReturnGate (cognitive 23) · ×1
  • CustomFirmwareJetsamPatcher.findReturnGate (cognitive 23) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Jetsam/CustomFirmwareJetsamDiscovery.swift:236 — CustomFirmwareJetsamPatcher.findReturnGate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 3, ternaries 1 (2 pts), loops 1, 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 · GuestAPI.installEnvironment (cognitive 22) · ×1
  • GuestAPI.installEnvironment (cognitive 22) VPhoneDaemon/Daemon/GuestAPI+Environment.swift:61 — GuestAPI.installEnvironment has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 8, loops 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestIrisinInstaller.prepareAppData (cognitive 22) · ×1
  • GuestIrisinInstaller.prepareAppData (cognitive 22) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Payload.swift:43 — GuestIrisinInstaller.prepareAppData 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 · VPhoneMachineTemplateKey.slimmingVariant (cognitive 22) · ×1
  • VPhoneMachineTemplateKey.slimmingVariant (cognitive 22) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplateKey.swift:401 — VPhoneMachineTemplateKey.slimmingVariant has cognitive complexity 22 (threshold 15). Drivers by points: loops 5 (15 pts), if/else 1 (6 pts), ternaries 1 (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · VPhoneAPFSSnapshot.scan (cognitive 22) · ×1
  • VPhoneAPFSSnapshot.scan (cognitive 22) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAPFSSnapshot.swift:123 — VPhoneAPFSSnapshot.scan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneBootCommand.validate (cognitive 22) · ×1
  • VPhoneBootCommand.validate (cognitive 22) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneBootCommand.swift:106 — VPhoneBootCommand.validate has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 12, if/else 9 (10 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 · AVPBooterPatcher.patchDGSTBypass (cognitive 22) · ×1
  • AVPBooterPatcher.patchDGSTBypass (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:74 — AVPBooterPatcher.patchDGSTBypass has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 8, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · IBootPatcher.patchPanicBypass (cognitive 22) · ×1
  • IBootPatcher.patchPanicBypass (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchPanicBypass.swift:14 — IBootPatcher.patchPanicBypass has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.paravirtGPUPersonality (cognitive 22) · ×1
  • KernelCustomFirmwarePatcher.paravirtGPUPersonality (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtGLES.swift:87 — KernelCustomFirmwarePatcher.paravirtGPUPersonality has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (7 pts), loops 3 (4 pts) (nesting depth added 2). 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 · KernelCustomFirmwarePatcher.isBitstrTest (cognitive 22) · ×1
  • KernelCustomFirmwarePatcher.isBitstrTest (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:141 — KernelCustomFirmwarePatcher.isBitstrTest has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 21, if/else 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 · KernelCustomFirmwarePatcher.matchRegionBlock (cognitive 22) · ×1
  • KernelCustomFirmwarePatcher.matchRegionBlock (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegionSize.swift:155 — KernelCustomFirmwarePatcher.matchRegionBlock has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 7. 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 · DyldSharedCacheMISTrustAuthPatcher.findSeededError (cognitive 22) · ×1
  • DyldSharedCacheMISTrustAuthPatcher.findSeededError (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:582 — DyldSharedCacheMISTrustAuthPatcher.findSeededError has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 15, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheMetalCacheReusePatcher.plan (cognitive 22) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.plan (cognitive 22) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:244 — DyldSharedCacheMetalCacheReusePatcher.plan has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestAPI.jailbreakInfo (cognitive 21) · ×1
  • GuestAPI.jailbreakInfo (cognitive 21) VPhoneDaemon/Daemon/GuestAPI.swift:561 — GuestAPI.jailbreakInfo has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 7 (nesting depth added 6). Of this number, 20 points are the body's own statements and 1 belongs to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneBundleTransfer.archivedLogicalSize (cognitive 21) · ×1
  • VPhoneBundleTransfer.archivedLogicalSize (cognitive 21) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift:129 — VPhoneBundleTransfer.archivedLogicalSize has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 6, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadNewMachineView.firmwareNote (cognitive 21) · ×1
  • VPhoneLaunchpadNewMachineView.firmwareNote (cognitive 21) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadNewMachineView.swift:479 — VPhoneLaunchpadNewMachineView.firmwareNote has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (17 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CustomFirmwareInjectDylib.scanLoadCommands (cognitive 21) · ×1
  • CustomFirmwareInjectDylib.scanLoadCommands (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:397 — CustomFirmwareInjectDylib.scanLoadCommands has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.requestStore (cognitive 21) · ×1
  • KernelCustomFirmwarePatcher.requestStore (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:171 — KernelCustomFirmwarePatcher.requestStore has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 4 (8 pts), loops 1 (nesting depth added 4). 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 · KernelCustomFirmwarePatcher.isSyscallMaskMiss (cognitive 21) · ×1
  • KernelCustomFirmwarePatcher.isSyscallMaskMiss (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchSyscallFilterOff.swift:230 — KernelCustomFirmwarePatcher.isSyscallMaskMiss has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 14, if/else 2 (4 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). Of this number, 19 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findWxMaskMov (cognitive 21) · ×1
  • KernelCustomFirmwarePatcher.findWxMaskMov (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:330 — KernelCustomFirmwarePatcher.findWxMaskMov has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (13 pts), boolean chains 4, loops 2 (3 pts), ternaries 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 · KernelCustomFirmwarePatcher.patchThidShouldCrash (cognitive 21) · ×1
  • KernelCustomFirmwarePatcher.patchThidShouldCrash (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchThidCrash.swift:14 — KernelCustomFirmwarePatcher.patchThidShouldCrash has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 7, 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 · KernelCustomFirmwarePatcherBase.parseNlist (cognitive 21) · ×1
  • KernelCustomFirmwarePatcherBase.parseNlist (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:99 — KernelCustomFirmwarePatcherBase.parseNlist has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelPatcher.discoverSandboxTextRange (cognitive 21) · ×1
  • KernelPatcher.discoverSandboxTextRange (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:185 — KernelPatcher.discoverSandboxTextRange has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, 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 · TXMDevPatcher.debuggerGateFlagStore (cognitive 21) · ×1
  • TXMDevPatcher.debuggerGateFlagStore (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:254 — TXMDevPatcher.debuggerGateFlagStore has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 13, if/else 4 (6 pts), loops 1, match/switch 1 (nesting depth added 2). 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 · TXMDevPatcher.patchDebuggerEntitlementForceTrue (cognitive 21) · ×1
  • TXMDevPatcher.patchDebuggerEntitlementForceTrue (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:695 — TXMDevPatcher.patchDebuggerEntitlementForceTrue has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (8 pts), loops 2 (3 pts) (nesting depth added 5). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate (cognitive 21) · ×1
  • VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate (cognitive 21) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:924 — VPhoneCustomFirmwareInstaller.patchedKernelcacheForUpdate has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, if/else 6 (7 pts), ternaries 1 (2 pts) (nesting depth added 2). 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 · VPhoneVirtualMachineCreateCommand.run (cognitive 21) · ×1
  • VPhoneVirtualMachineCreateCommand.run (cognitive 21) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift:251 — VPhoneVirtualMachineCreateCommand.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, ternaries 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneVirtualMachineLeasesCommand.run (cognitive 21) · ×1
  • VPhoneVirtualMachineLeasesCommand.run (cognitive 21) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineLeasesCommand.swift:40 — VPhoneVirtualMachineLeasesCommand.run has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 3 (6 pts), match/switch 2 (4 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneCodeSignature.identifier (cognitive 21) · ×1
  • VPhoneCodeSignature.identifier (cognitive 21) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneCodeSignature.swift:272 — VPhoneCodeSignature.identifier has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · VPhoneApplication.takeKeyEvent (cognitive 21) · ×1
  • VPhoneApplication.takeKeyEvent (cognitive 21) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneApplication.swift:67 — VPhoneApplication.takeKeyEvent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 5 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DyldSharedCacheHypervisorVirtualMachinePatcher.machOSections (cognitive 21) · ×1
  • DyldSharedCacheHypervisorVirtualMachinePatcher.machOSections (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift:81 — DyldSharedCacheHypervisorVirtualMachinePatcher.machOSections has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKImageExport.indirectTable (cognitive 21) · ×1
  • KDKImageExport.indirectTable (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExportLinkedit.swift:76 — KDKImageExport.indirectTable has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 4, loops 3 (nesting depth added 6). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to one function item inside it that branches (fallback). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · CustomFirmwareCacheLoaderPatcher.findStringReference (cognitive 21) · ×1
  • CustomFirmwareCacheLoaderPatcher.findStringReference (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader+StringAnchor.swift:108 — CustomFirmwareCacheLoaderPatcher.findStringReference has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (9 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareWatchDog.matchSite (cognitive 21) · ×1
  • CustomFirmwareWatchDog.matchSite (cognitive 21) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDogDiscovery.swift:101 — CustomFirmwareWatchDog.matchSite has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 7, match/switch 1. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VPhoneHomePodUserDefault.validated (cognitive 21) · ×1
  • VPhoneHomePodUserDefault.validated (cognitive 21) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDefaultsModel.swift:20 — VPhoneHomePodUserDefault.validated has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, match/switch 2 (3 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestScreenshotSizing.parse (cognitive 20) · ×1
  • GuestScreenshotSizing.parse (cognitive 20) VPhoneDaemon/Daemon/GuestScreenshotSizing.swift:37 — GuestScreenshotSizing.parse has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, loops 2 (4 pts) (nesting depth added 6). Of this number, 17 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestIrisinInstaller.removeBootstrap (cognitive 20) · ×1
  • GuestIrisinInstaller.removeBootstrap (cognitive 20) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller.swift:141 — GuestIrisinInstaller.removeBootstrap has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (5 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneOTAUpdate.rollback (cognitive 20) · ×1
  • VPhoneOTAUpdate.rollback (cognitive 20) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneOTAUpdate.swift:242 — VPhoneOTAUpdate.rollback has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneSystemTrimSpec.apply (cognitive 20) · ×1
  • VPhoneSystemTrimSpec.apply (cognitive 20) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneSystemTrim.swift:355 — VPhoneSystemTrimSpec.apply has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (4 pts), error handling 1 (3 pts), match/switch 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Head.init (cognitive 20) · ×1
  • Head.init (cognitive 20) VPhoneKit/VPhoneCoreKit/Support/VPhoneAPIRequestGate.swift:144 — Head.init has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (7 pts), loops 1 (nesting depth added 2). 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 · VPhoneNetworking.resolve (cognitive 20) · ×1
  • VPhoneNetworking.resolve (cognitive 20) VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift:637 — VPhoneNetworking.resolve has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VPhoneLaunchpadLocalBundle.prepare (cognitive 20) · ×1
  • VPhoneLaunchpadLocalBundle.prepare (cognitive 20) VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadLocalBundle.swift:37 — VPhoneLaunchpadLocalBundle.prepare has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (18 pts), boolean chains 1, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadCreationPipeline.run (cognitive 20) · ×1
  • VPhoneLaunchpadCreationPipeline.run (cognitive 20) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift:293 — VPhoneLaunchpadCreationPipeline.run has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), boolean chains 6, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadMachinesView.body (cognitive 20) · ×1
  • VPhoneLaunchpadMachinesView.body (cognitive 20) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift:76 — VPhoneLaunchpadMachinesView.body has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, boolean chains 4, loops 1, 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.
D2 · Cognitive Complexity · DyldSharedCacheUndoLog.restore (cognitive 20) · ×1
  • DyldSharedCacheUndoLog.restore (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheUndoLog.swift:432 — DyldSharedCacheUndoLog.restore has cognitive complexity 20 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 2 (3 pts), boolean chains 2, ternaries 2 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findIOTaskHasEntitlement (cognitive 20) · ×1
  • KernelCustomFirmwarePatcher.findIOTaskHasEntitlement (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:276 — KernelCustomFirmwarePatcher.findIOTaskHasEntitlement has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 2 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findUpstreamRootMountCmp (cognitive 20) · ×1
  • KernelCustomFirmwarePatcher.findUpstreamRootMountCmp (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegion.swift:70 — KernelCustomFirmwarePatcher.findUpstreamRootMountCmp has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 8, 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 · KernelPatcher.patchApfsRootSnapshot (cognitive 20) · ×1
  • KernelPatcher.patchApfsRootSnapshot (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift:17 — KernelPatcher.patchApfsRootSnapshot has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (12 pts), boolean chains 5, 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 · KernelPatcher.findDebuggerByBLHistogram (cognitive 20) · ×1
  • KernelPatcher.findDebuggerByBLHistogram (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDebugger.swift:114 — KernelPatcher.findDebuggerByBLHistogram has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 2, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCacheKDK.makeVolume (cognitive 20) · ×1
  • KernelCacheKDK.makeVolume (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCacheKDK.swift:173 — KernelCacheKDK.makeVolume has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KDKRecovery.calleeWrites (cognitive 20) · ×1
  • KDKRecovery.calleeWrites (cognitive 20) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKRecoveryFlow.swift:133 — KDKRecovery.calleeWrites has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 9, 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 · GuestDeviceHubControl.handle (cognitive 19) · ×1
  • GuestDeviceHubControl.handle (cognitive 19) VPhoneDaemon/Daemon/GuestDeviceHubControl.swift:35 — GuestDeviceHubControl.handle has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), boolean chains 2, 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 · GuestProcessOutput.drain (cognitive 19) · ×1
  • GuestProcessOutput.drain (cognitive 19) VPhoneDaemon/Daemon/GuestProcessOutput.swift:26 — GuestProcessOutput.drain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadLineSplitter.strippingEscapes (cognitive 19) · ×1
  • VPhoneLaunchpadLineSplitter.strippingEscapes (cognitive 19) VPhoneLaunchpad/VPhoneLaunchpadShared/VPhoneLaunchpadLineReader.swift:55 — VPhoneLaunchpadLineSplitter.strippingEscapes has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, loops 3 (7 pts), if/else 2 (5 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 · VPhoneFirmwareMatrix.testedBuilds (cognitive 19) · ×1
  • VPhoneFirmwareMatrix.testedBuilds (cognitive 19) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:160 — VPhoneFirmwareMatrix.testedBuilds has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 4, loops 2 (3 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheCodeSignature.readCodeDirectory (cognitive 19) · ×1
  • DyldSharedCacheCodeSignature.readCodeDirectory (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift:179 — DyldSharedCacheCodeSignature.readCodeDirectory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 5, loops 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 · DyldSharedCachePatchTransaction.run (cognitive 19) · ×1
  • DyldSharedCachePatchTransaction.run (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCachePatchTransaction.swift:100 — DyldSharedCachePatchTransaction.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 3 (8 pts), error handling 3 (7 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IBootPatcher.enumeratePanicBlocks (cognitive 19) · ×1
  • IBootPatcher.enumeratePanicBlocks (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootxPrecondition.swift:168 — IBootPatcher.enumeratePanicBlocks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 5, 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 · KernelCustomFirmwarePatcher.findVfsContextCurrentByShape (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.findVfsContextCurrentByShape (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:208 — KernelCustomFirmwarePatcher.findVfsContextCurrentByShape has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 2 (3 pts), ternaries 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 · KernelCustomFirmwarePatcher.findVnodeGetattrViaString (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.findVnodeGetattrViaString (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:260 — KernelCustomFirmwarePatcher.findVnodeGetattrViaString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findCsAssociateCall (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.findCsAssociateCall (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:155 — KernelCustomFirmwarePatcher.findCsAssociateCall has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.patchVmMapDeleteImmutableCode (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.patchVmMapDeleteImmutableCode (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchVmMapDelete.swift:23 — KernelCustomFirmwarePatcher.patchVmMapDeleteImmutableCode has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 8, if/else 3 (4 pts), ternaries 2 (4 pts), loops 3 (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 · KernelCustomFirmwarePatcher.extractW1ImmNearCall (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.extractW1ImmNearCall (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSyscallmask.swift:174 — KernelCustomFirmwarePatcher.extractW1ImmNearCall has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (16 pts), boolean chains 2, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.functionsReferencingString (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.functionsReferencingString (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchSecureRoot.swift:75 — KernelCustomFirmwarePatcher.functionsReferencingString has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (8 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findSecureRootReturnSite (cognitive 19) · ×1
  • KernelCustomFirmwarePatcher.findSecureRootReturnSite (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchSecureRoot.swift:109 — KernelCustomFirmwarePatcher.findSecureRootReturnSite has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5, loops 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelPatcher.patchApfsMountUpgradeChecks (cognitive 19) · ×1
  • KernelPatcher.patchApfsMountUpgradeChecks (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:134 — KernelPatcher.patchApfsMountUpgradeChecks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 7, 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 · VPhoneFirmwarePrepareCommand.run (cognitive 19) · ×1
  • VPhoneFirmwarePrepareCommand.run (cognitive 19) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift:263 — VPhoneFirmwarePrepareCommand.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 8, ternaries 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 · VPhoneVirtualMachineTemplateFindCommand.run (cognitive 19) · ×1
  • VPhoneVirtualMachineTemplateFindCommand.run (cognitive 19) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineTemplateCommand.swift:265 — VPhoneVirtualMachineTemplateFindCommand.run has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 3 (5 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · VPhoneSignEntitlements.write (cognitive 19) · ×1
  • VPhoneSignEntitlements.write (cognitive 19) VPhoneExecutable/VPhoneCommand/VPhoneSign/Entitlements/VPhoneSignEntitlements.swift:171 — VPhoneSignEntitlements.write has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (5 pts), ternaries 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 8). Of this number, 15 points are the body's own statements and 4 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneSignPKCS12.init (cognitive 19) · ×1
  • VPhoneSignPKCS12.init (cognitive 19) VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignPKCS12.swift:23 — VPhoneSignPKCS12.init has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), match/switch 1 (3 pts), boolean chains 1, ternaries 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 · VPhoneVirtualMachineView.setMouseCaptured (cognitive 19) · ×1
  • VPhoneVirtualMachineView.setMouseCaptured (cognitive 19) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:29 — VPhoneVirtualMachineView.setMouseCaptured has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.materializedAddress (cognitive 19) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.materializedAddress (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:325 — DyldSharedCacheGLESPointDrawPatcher.materializedAddress has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 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 · DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress (cognitive 19) · ×1
  • DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:104 — DyldSharedCacheHomeViewEnvironmentPatcher.materializedAddress has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 18, if/else 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 · DyldSharedCacheMetalCacheReusePatcher.patch (cognitive 19) · ×1
  • DyldSharedCacheMetalCacheReusePatcher.patch (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:70 — DyldSharedCacheMetalCacheReusePatcher.patch has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 5, ternaries 4, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DyldSharedCacheXPCLWCRPatcher.findPatchedShape (cognitive 19) · ×1
  • DyldSharedCacheXPCLWCRPatcher.findPatchedShape (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:332 — DyldSharedCacheXPCLWCRPatcher.findPatchedShape has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (9 pts), boolean chains 7, 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 · VPhoneMenuController.performBootstrapUninstall (cognitive 19) · ×1
  • VPhoneMenuController.performBootstrapUninstall (cognitive 19) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBootstrap.swift:276 — VPhoneMenuController.performBootstrapUninstall has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (5 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareTVTPRO.validateImageHeader (cognitive 19) · ×1
  • CustomFirmwareTVTPRO.validateImageHeader (cognitive 19) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareTVTPRO.swift:221 — CustomFirmwareTVTPRO.validateImageHeader has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 6, 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 · VPhoneMotionModel.drain (cognitive 19) · ×1
  • VPhoneMotionModel.drain (cognitive 19) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneMotionModel.swift:199 — VPhoneMotionModel.drain has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (12 pts), boolean chains 4, error handling 1 (2 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.swift.top-level code (cognitive 19) · ×1
  • main.swift.top-level code (cognitive 19) VPhoneDaemon/Daemon/main.swift:8 — main.swift.top-level code has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestIrisinInstaller.ensureFirmwareRecord (cognitive 18) · ×1
  • GuestIrisinInstaller.ensureFirmwareRecord (cognitive 18) VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Firmware.swift:21 — GuestIrisinInstaller.ensureFirmwareRecord has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneIPSWCache.downloadSegment (cognitive 18) · ×1
  • VPhoneIPSWCache.downloadSegment (cognitive 18) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:364 — VPhoneIPSWCache.downloadSegment has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 3, match/switch 1 (3 pts), 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 · VPhoneMachineSnapshots.create (cognitive 18) · ×1
  • VPhoneMachineSnapshots.create (cognitive 18) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineSnapshots.swift:154 — VPhoneMachineSnapshots.create has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneTCPForwarder.handle (cognitive 18) · ×1
  • VPhoneTCPForwarder.handle (cognitive 18) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:304 — VPhoneTCPForwarder.handle has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneHostFilePermissions.walkChild (cognitive 18) · ×1
  • VPhoneHostFilePermissions.walkChild (cognitive 18) VPhoneKit/VPhoneCoreKit/Process/VPhoneHostFilePermissions.swift:140 — VPhoneHostFilePermissions.walkChild has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, ternaries 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 · VPhoneLaunchpadMachineLibrary.refresh (cognitive 18) · ×1
  • VPhoneLaunchpadMachineLibrary.refresh (cognitive 18) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:200 — VPhoneLaunchpadMachineLibrary.refresh has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 2 (5 pts), boolean chains 4, error handling 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 · DyldSharedCacheUndoLog.validate (cognitive 18) · ×1
  • DyldSharedCacheUndoLog.validate (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheUndoLog.swift:215 — DyldSharedCacheUndoLog.validate has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 7, 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 · KernelCustomFirmwarePatcherBase.buildSymbolTable (cognitive 18) · ×1
  • KernelCustomFirmwarePatcherBase.buildSymbolTable (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:31 — KernelCustomFirmwarePatcherBase.buildSymbolTable has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (14 pts), boolean chains 2, loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RestoreRamDiskSealPatcher.locateHashTypeField (cognitive 18) · ×1
  • RestoreRamDiskSealPatcher.locateHashTypeField (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Restore/RestoreRamDiskSealPatcher.swift:155 — RestoreRamDiskSealPatcher.locateHashTypeField has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · VPhoneCustomFirmwareInstaller.updateTVDyld (cognitive 18) · ×1
  • VPhoneCustomFirmwareInstaller.updateTVDyld (cognitive 18) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4682 — VPhoneCustomFirmwareInstaller.updateTVDyld has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 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 · VPhoneMachineTemplateTrimmer.withMountedSystemVolume (cognitive 18) · ×1
  • VPhoneMachineTemplateTrimmer.withMountedSystemVolume (cognitive 18) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneMachineTemplateTrimmer.swift:108 — VPhoneMachineTemplateTrimmer.withMountedSystemVolume has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MachOParser.findSymbol (cognitive 18) · ×1
  • MachOParser.findSymbol (cognitive 18) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/MachOParser.swift:188 — MachOParser.findSymbol has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneVirtualMachineKeySender.typeString (cognitive 18) · ×1
  • VPhoneVirtualMachineKeySender.typeString (cognitive 18) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineKeySender.swift:124 — VPhoneVirtualMachineKeySender.typeString has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneVirtualMachineView.scrollNatively (cognitive 18) · ×1
  • VPhoneVirtualMachineView.scrollNatively (cognitive 18) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:562 — VPhoneVirtualMachineView.scrollNatively 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.
D2 · Cognitive Complexity · DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields (cognitive 18) · ×1
  • DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:188 — DyldSharedCacheGLESPointDrawPatcher.indexedDrawFields has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 13, if/else 3 (4 pts), loops 1 (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 · CustomFirmwareTVTPRO.definedSymbols (cognitive 18) · ×1
  • CustomFirmwareTVTPRO.definedSymbols (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareTVTPRO.swift:247 — CustomFirmwareTVTPRO.definedSymbols has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 8, loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareParavirtGPUCompilerCache.selectorSlots (cognitive 18) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.selectorSlots (cognitive 18) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:269 — CustomFirmwareParavirtGPUCompilerCache.selectorSlots has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), loops 2 (nesting depth added 2). 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 · GuestAPI.turn (cognitive 17) · ×1
  • GuestAPI.turn (cognitive 17) VPhoneDaemon/Daemon/GuestAPI+Device.swift:592 — GuestAPI.turn has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 5, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestFirstBootSettle.evaluate (cognitive 17) · ×1
  • GuestFirstBootSettle.evaluate (cognitive 17) VPhoneDaemon/Daemon/GuestFirstBootSettle.swift:101 — GuestFirstBootSettle.evaluate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1, 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 · ImageFile.dataRanges (cognitive 17) · ×1
  • ImageFile.dataRanges (cognitive 17) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:700 — ImageFile.dataRanges has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 1 (4 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ImageFile.physicalRuns (cognitive 17) · ×1
  • ImageFile.physicalRuns (cognitive 17) VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift:729 — ImageFile.physicalRuns has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (11 pts), boolean chains 3, 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 · VPhoneAEA.symmetricKey (cognitive 17) · ×1
  • VPhoneAEA.symmetricKey (cognitive 17) VPhoneKit/VPhoneCoreKit/Firmware/VPhoneAEA.swift:130 — VPhoneAEA.symmetricKey has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (7 pts), error handling 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneTCPForwarder.drainHost (cognitive 17) · ×1
  • VPhoneTCPForwarder.drainHost (cognitive 17) VPhoneKit/VPhoneCoreKit/Network/VPhoneTCPForwarder.swift:639 — VPhoneTCPForwarder.drainHost has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneConfinedDirectory.removeEntry (cognitive 17) · ×1
  • VPhoneConfinedDirectory.removeEntry (cognitive 17) VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:745 — VPhoneConfinedDirectory.removeEntry has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, loops 1, ternaries 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 · CustomFirmwareDaemons.filesystemLayout (cognitive 17) · ×1
  • CustomFirmwareDaemons.filesystemLayout (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:59 — CustomFirmwareDaemons.filesystemLayout has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (7 pts), loops 1, ternaries 1 (nesting depth added 2). 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 · DeviceTreePatcher.presentPhoneProduct (cognitive 17) · ×1
  • DeviceTreePatcher.presentPhoneProduct (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:720 — DeviceTreePatcher.presentPhoneProduct has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 6, loops 1 (nesting depth added 4). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to one function item inside it that branches (fill). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · DeviceTreePatcher.applyResearchBoardConversion (cognitive 17) · ×1
  • DeviceTreePatcher.applyResearchBoardConversion (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeResearchBoardConversion.swift:220 — DeviceTreePatcher.applyResearchBoardConversion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3, boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheSymbolResolver.objcMessageTarget (cognitive 17) · ×1
  • DyldSharedCacheSymbolResolver.objcMessageTarget (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheSymbolResolver.swift:216 — DyldSharedCacheSymbolResolver.objcMessageTarget has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 5, loops 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 · IBootCustomFirmwarePatcher.findRefsNear (cognitive 17) · ×1
  • IBootCustomFirmwarePatcher.findRefsNear (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:155 — IBootCustomFirmwarePatcher.findRefsNear has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · IBootPatcher.patchDisplayScale (cognitive 17) · ×1
  • IBootPatcher.patchDisplayScale (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:33 — IBootPatcher.patchDisplayScale has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (7 pts), loops 2 (3 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IBootPatcher.verificationGates (cognitive 17) · ×1
  • IBootPatcher.verificationGates (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift:63 — IBootPatcher.verificationGates has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 12, if/else 2 (4 pts), loops 1 (nesting depth added 2). 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 · KernelCustomFirmwarePatcher.versionArgument (cognitive 17) · ×1
  • KernelCustomFirmwarePatcher.versionArgument (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:207 — KernelCustomFirmwarePatcher.versionArgument has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 4 (7 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.nopAbiVersionGate (cognitive 17) · ×1
  • KernelCustomFirmwarePatcher.nopAbiVersionGate (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Storage/KernelCustomFirmwarePatchDiskImages2.swift:78 — KernelCustomFirmwarePatcher.nopAbiVersionGate has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), loops 1 (nesting depth added 2). 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 · KernelCustomFirmwarePatcherBase.filesetEntryTextRange (cognitive 17) · ×1
  • KernelCustomFirmwarePatcherBase.filesetEntryTextRange (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcherBase.swift:271 — KernelCustomFirmwarePatcherBase.filesetEntryTextRange has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 2, 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 · KernelPatcher.patchDyldPolicy (cognitive 17) · ×1
  • KernelPatcher.patchDyldPolicy (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchDyldPolicy.swift:15 — KernelPatcher.patchDyldPolicy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneVirtualMachineConfigCommand.networkEdit (cognitive 17) · ×1
  • VPhoneVirtualMachineConfigCommand.networkEdit (cognitive 17) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCommand.swift:346 — VPhoneVirtualMachineConfigCommand.networkEdit has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), match/switch 4, ternaries 2 (4 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 · VPhoneCreatedOutputs.finishBestEffort (cognitive 17) · ×1
  • VPhoneCreatedOutputs.finishBestEffort (cognitive 17) VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreator.swift:898 — VPhoneCreatedOutputs.finishBestEffort has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), error handling 2 (6 pts), if/else 2, boolean chains 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · VPhoneSignPKCS12.decrypt (cognitive 17) · ×1
  • VPhoneSignPKCS12.decrypt (cognitive 17) VPhoneExecutable/VPhoneCommand/VPhoneSign/Identity/VPhoneSignPKCS12.swift:119 — VPhoneSignPKCS12.decrypt has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 3, match/switch 2 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VPhoneMachOImage.signed (cognitive 17) · ×1
  • VPhoneMachOImage.signed (cognitive 17) VPhoneExecutable/VPhoneCommand/VPhoneSign/MachO/VPhoneMachOImage.swift:327 — VPhoneMachOImage.signed has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, loops 1, ternaries 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 · VPhoneGuestShellChannel.handshake (cognitive 17) · ×1
  • VPhoneGuestShellChannel.handshake (cognitive 17) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestShellChannel.swift:120 — VPhoneGuestShellChannel.handshake has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VPhoneVirtualMachineWindowController.updateSubtitle (cognitive 17) · ×1
  • VPhoneVirtualMachineWindowController.updateSubtitle (cognitive 17) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/VPhoneVirtualMachineWindowController.swift:519 — VPhoneVirtualMachineWindowController.updateSubtitle has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 2 (6 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheMetalVertexFormatPatcher.findFormatSite (cognitive 17) · ×1
  • DyldSharedCacheMetalVertexFormatPatcher.findFormatSite (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:145 — DyldSharedCacheMetalVertexFormatPatcher.findFormatSite has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, if/else 4 (6 pts), loops 1 (nesting depth added 2). 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 · DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest (cognitive 17) · ×1
  • DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:165 — DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.isOrientationTest has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 15, if/else 2. 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 · VPhoneMenuController.performBootstrapInstallation (cognitive 17) · ×1
  • VPhoneMenuController.performBootstrapInstallation (cognitive 17) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Menu/VPhoneMenuBootstrap.swift:162 — VPhoneMenuController.performBootstrapInstallation has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), error handling 3, boolean chains 2, loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareParavirtGPUCompilerCache.addressPair (cognitive 17) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.addressPair (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:246 — CustomFirmwareParavirtGPUCompilerCache.addressPair has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 16, if/else 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 · CustomFirmwareParavirtGPUCompilerCache.methodImplementations (cognitive 17) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.methodImplementations (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:300 — CustomFirmwareParavirtGPUCompilerCache.methodImplementations has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (9 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareParavirtGPUPrimitiveRestart.resolve (cognitive 17) · ×1
  • CustomFirmwareParavirtGPUPrimitiveRestart.resolve (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUPrimitiveRestart.swift:98 — CustomFirmwareParavirtGPUPrimitiveRestart.resolve has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, 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 · CustomFirmwareVirtualAudio.patchSpeakerProtectionGate (cognitive 17) · ×1
  • CustomFirmwareVirtualAudio.patchSpeakerProtectionGate (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:785 — CustomFirmwareVirtualAudio.patchSpeakerProtectionGate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (CustomFirmwareVirtualAudio.patchVolumeModePrecondition) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.patchVolumeModePrecondition (cognitive 17) · ×1
  • CustomFirmwareVirtualAudio.patchVolumeModePrecondition (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:920 — CustomFirmwareVirtualAudio.patchVolumeModePrecondition has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition. This shape REPEATS in the file: one other method here (CustomFirmwareVirtualAudio.patchSpeakerProtectionGate) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.patchDeviceStateNullGate (cognitive 17) · ×1
  • CustomFirmwareVirtualAudio.patchDeviceStateNullGate (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1054 — CustomFirmwareVirtualAudio.patchDeviceStateNullGate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 2, ternaries 2, loops 1, match/switch 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareVirtualAudio.locate (cognitive 17) · ×1
  • CustomFirmwareVirtualAudio.locate (cognitive 17) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1181 — CustomFirmwareVirtualAudio.locate has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · GuestAPI.spawnProcess (cognitive 16) · ×1
  • GuestAPI.spawnProcess (cognitive 16) VPhoneDaemon/Daemon/GuestAPI+Process.swift:65 — GuestAPI.spawnProcess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 3, ternaries 1 (3 pts), error handling 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 · GuestAPI.unregisterSystemApp (cognitive 16) · ×1
  • GuestAPI.unregisterSystemApp (cognitive 16) VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:613 — GuestAPI.unregisterSystemApp has cognitive complexity 16 (threshold 15). Drivers by points: if/else 2 (7 pts), loops 2 (3 pts), match/switch 1 (3 pts), error handling 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestScreenshotSizing.apply (cognitive 16) · ×1
  • GuestScreenshotSizing.apply (cognitive 16) VPhoneDaemon/Daemon/GuestScreenshotSizing.swift:77 — GuestScreenshotSizing.apply has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadLauncherProcess.run (cognitive 16) · ×1
  • VPhoneLaunchpadLauncherProcess.run (cognitive 16) VPhoneLaunchpad/VPhoneLaunchpadLauncher/VPhoneLaunchpadLauncherProcess.swift:22 — VPhoneLaunchpadLauncherProcess.run has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 3, 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 · VPhoneDHCPLeaseList.init (cognitive 16) · ×1
  • VPhoneDHCPLeaseList.init (cognitive 16) VPhoneKit/VPhoneCoreKit/Network/VPhoneDHCPLeases.swift:86 — VPhoneDHCPLeaseList.init has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneNetworking.validatePortForwards (cognitive 16) · ×1
  • VPhoneNetworking.validatePortForwards (cognitive 16) VPhoneKit/VPhoneCoreKit/Support/VPhoneNetworking.swift:711 — VPhoneNetworking.validatePortForwards has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 7, if/else 4 (6 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneVirtualMachinePicker.resolve (cognitive 16) · ×1
  • VPhoneVirtualMachinePicker.resolve (cognitive 16) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneVirtualMachinePicker.swift:28 — VPhoneVirtualMachinePicker.resolve has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneLaunchpadDiskExtents.exclusiveBytes (cognitive 16) · ×1
  • VPhoneLaunchpadDiskExtents.exclusiveBytes (cognitive 16) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskExtents.swift:56 — VPhoneLaunchpadDiskExtents.exclusiveBytes has cognitive complexity 16 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 1 (3 pts) (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · VPhoneLaunchpadMachinesView.table (cognitive 16) · ×1
  • VPhoneLaunchpadMachinesView.table (cognitive 16) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachinesView.swift:303 — VPhoneLaunchpadMachinesView.table has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8, ternaries 3 (4 pts), boolean chains 2, loops 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 · CustomFirmwarePostRestoreDeviceTree.rewrite (cognitive 16) · ×1
  • CustomFirmwarePostRestoreDeviceTree.rewrite (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:299 — CustomFirmwarePostRestoreDeviceTree.rewrite has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 1 (2 pts), ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · DyldSharedCachePatchTransaction.snapshots (cognitive 16) · ×1
  • DyldSharedCachePatchTransaction.snapshots (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCachePatchTransaction.swift:54 — DyldSharedCachePatchTransaction.snapshots has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (11 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IBootCustomFirmwarePatcher.findRefsToOffset (cognitive 16) · ×1
  • IBootCustomFirmwarePatcher.findRefsToOffset (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:205 — IBootCustomFirmwarePatcher.findRefsToOffset has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · IBootPatcher.patchBootArgs (cognitive 16) · ×1
  • IBootPatcher.patchBootArgs (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchBootArgs.swift:20 — IBootPatcher.patchBootArgs has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findAll (cognitive 16) · ×1
  • KernelCustomFirmwarePatcher.findAll (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelCustomFirmwarePatcher.swift:65 — KernelCustomFirmwarePatcher.findAll has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.findBlCbzGate (cognitive 16) · ×1
  • KernelCustomFirmwarePatcher.findBlCbzGate (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:59 — KernelCustomFirmwarePatcher.findBlCbzGate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, 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 · KernelCustomFirmwarePatcher.patchParavirtDisplayRefreshRate (cognitive 16) · ×1
  • KernelCustomFirmwarePatcher.patchParavirtDisplayRefreshRate (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchDisplayRefresh.swift:37 — KernelCustomFirmwarePatcher.patchParavirtDisplayRefreshRate has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), loops 1 (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 · KernelCustomFirmwarePatcher.readback (cognitive 16) · ×1
  • KernelCustomFirmwarePatcher.readback (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:191 — KernelCustomFirmwarePatcher.readback has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · KernelCustomFirmwarePatcher.pvGlobalLoad (cognitive 16) · ×1
  • KernelCustomFirmwarePatcher.pvGlobalLoad (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchParavirtTask3.swift:349 — KernelCustomFirmwarePatcher.pvGlobalLoad has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 14, if/else 2. 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 · KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 (cognitive 16) · ×1
  • KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Keystore/KernelCustomFirmwarePatchAksUnlockBag.swift:55 — KernelCustomFirmwarePatcher.patchAksUnlockBagCount5 has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 8, if/else 6 (7 pts), loops 1 (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 · FirmwareGuestPatchResolution.glesUpdatePolicy (cognitive 16) · ×1
  • FirmwareGuestPatchResolution.glesUpdatePolicy (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/PatchSets/FirmwareGuestPatchResolution.swift:47 — FirmwareGuestPatchResolution.glesUpdatePolicy has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 12, if/else 3, ternaries 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 · TXMDevPatcher.findRefsToOffset (cognitive 16) · ×1
  • TXMDevPatcher.findRefsToOffset (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:65 — TXMDevPatcher.findRefsToOffset has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TXMPatcher.findSelector24HashFlagsCall (cognitive 16) · ×1
  • TXMPatcher.findSelector24HashFlagsCall (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:150 — TXMPatcher.findSelector24HashFlagsCall has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneCustomFirmwareInstaller.buildDeviceTree (cognitive 16) · ×1
  • VPhoneCustomFirmwareInstaller.buildDeviceTree (cognitive 16) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4284 — VPhoneCustomFirmwareInstaller.buildDeviceTree has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 2 (4 pts), boolean chains 3, ternaries 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 · VPhonePatchPlan.order (cognitive 16) · ×1
  • VPhonePatchPlan.order (cognitive 16) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/PatchSet/VPhonePatchPlan.swift:280 — VPhonePatchPlan.order has cognitive complexity 16 (threshold 15). Drivers by points: loops 6 (10 pts), if/else 3 (6 pts) (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · VPhoneVirtualMachineView.sendTouchEvent (cognitive 16) · ×1
  • VPhoneVirtualMachineView.sendTouchEvent (cognitive 16) VPhoneExecutable/VPhoneVirtualization/UI/VirtualMachine/VPhoneVirtualMachineView.swift:1203 — VPhoneVirtualMachineView.sendTouchEvent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · CustomFirmwareArm64eX1Audit.validateLoadCommands (cognitive 16) · ×1
  • CustomFirmwareArm64eX1Audit.validateLoadCommands (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareArm64eX1Audit.swift:182 — CustomFirmwareArm64eX1Audit.validateLoadCommands has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 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 · DyldSharedCacheGLESPrimitiveRestartPatcher.patch (cognitive 16) · ×1
  • DyldSharedCacheGLESPrimitiveRestartPatcher.patch (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:73 — DyldSharedCacheGLESPrimitiveRestartPatcher.patch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline (cognitive 16) · ×1
  • DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:241 — DyldSharedCacheGLESPrimitiveRestartPatcher.trampoline has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, if/else 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 · DyldSharedCacheIOMFBForceKernPatcher.isConditionalDispatch (cognitive 16) · ×1
  • DyldSharedCacheIOMFBForceKernPatcher.isConditionalDispatch (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:364 — DyldSharedCacheIOMFBForceKernPatcher.isConditionalDispatch has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, if/else 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 · DyldSharedCacheIOMFBSwapEndPatcher.patch (cognitive 16) · ×1
  • DyldSharedCacheIOMFBSwapEndPatcher.patch (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:159 — DyldSharedCacheIOMFBSwapEndPatcher.patch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), ternaries 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DyldSharedCacheIOMFBSwapEndPatcher.findSizeInstruction (cognitive 16) · ×1
  • DyldSharedCacheIOMFBSwapEndPatcher.findSizeInstruction (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:279 — DyldSharedCacheIOMFBSwapEndPatcher.findSizeInstruction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 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 · DyldSharedCacheMISTrustAuthPatcher.findFailureDerivation (cognitive 16) · ×1
  • DyldSharedCacheMISTrustAuthPatcher.findFailureDerivation (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:639 — DyldSharedCacheMISTrustAuthPatcher.findFailureDerivation has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 9, if/else 3 (6 pts), loops 1 (nesting depth added 3). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D2 · Cognitive Complexity · DyldSharedCacheMetalVertexFormatPatcher.patch (cognitive 16) · ×1
  • DyldSharedCacheMetalVertexFormatPatcher.patch (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:79 — DyldSharedCacheMetalVertexFormatPatcher.patch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 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.
D2 · Cognitive Complexity · KDKMachO.loadCommands (cognitive 16) · ×1
  • KDKMachO.loadCommands (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKMachO.swift:220 — KDKMachO.loadCommands has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareCacheLoaderPatcher.patch (cognitive 16) · ×1
  • CustomFirmwareCacheLoaderPatcher.patch (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:141 — CustomFirmwareCacheLoaderPatcher.patch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), loops 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 · CustomFirmwareCacheLoaderPatcher.findGate (cognitive 16) · ×1
  • CustomFirmwareCacheLoaderPatcher.findGate (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:311 — CustomFirmwareCacheLoaderPatcher.findGate has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). Of this number, 14 points are the body's own statements and 2 belong to one function item inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CustomFirmwareParavirtGPUCompilerCache.loadPair (cognitive 16) · ×1
  • CustomFirmwareParavirtGPUCompilerCache.loadPair (cognitive 16) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:257 — CustomFirmwareParavirtGPUCompilerCache.loadPair has cognitive complexity 16 (threshold 15). Drivers by points: boolean chains 15, if/else 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 · VPhoneHomePodDebugModel.execute (cognitive 16) · ×1
  • VPhoneHomePodDebugModel.execute (cognitive 16) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDebugModel.swift:88 — VPhoneHomePodDebugModel.execute has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (7 pts), error handling 2 (4 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VPhoneTVRemoteInput.enqueue (cognitive 16) · ×1
  • VPhoneTVRemoteInput.enqueue (cognitive 16) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/TVRemote/VPhoneTVRemoteInput.swift:129 — VPhoneTVRemoteInput.enqueue has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, error handling 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (3 members, 10 shared lines) · ×1
  • Near-duplicate member family (3 members, 10 shared lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:68 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:68-84 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:90-106 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheSettingsRowsPatcher.swift:186-205 — These 3 members are variants of one another: a block of 10 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (51 shared lines) · ×1
  • Near-duplicate member pair (51 shared lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1557 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1557-1647 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1691-1796 — These two members are variants of one another: 51 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (41 shared lines) · ×1
  • Near-duplicate member pair (41 shared lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:249 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:249-301 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:472-520 — These two members are variants of one another: 41 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (7 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:90 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:90-99 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:126-222 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:225-241 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:246-300 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:303-323 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:297-304 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:238-246 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:427 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:427-511 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:556-626 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:662-735 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:785-873 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:920-1007 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1054-1150 — These 6 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 6 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 6 times.
D4 · Code Duplication · Edited copy of a member (79 corresponding lines) · ×1
  • Edited copy of a member (79 corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:94 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:94-172 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:281-385 — These two members are one piece of code written twice and then edited apart: 79 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 49+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 49+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:73 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:73-124 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:70-118 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:79-141 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 49 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (76 corresponding lines) · ×1
  • Edited copy of a member (76 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:152 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:152-227 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift:265-349 — 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 (91 corresponding lines) · ×1
  • Edited copy of a member (91 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:98 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchPostValidation.swift:98-188 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchPostValidation.swift:14-119 — These two members are one piece of code written twice and then edited apart: 91 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:214 — VPhoneDaemon/Daemon/Bootstrap/RootHide/GuestIrisinInstaller+RootHideBase.swift:214-261 | VPhoneDaemon/Daemon/GuestAPI+Environment.swift:147-182 — 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) · ×1
  • Edited copy of a member (19 corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:70 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:70-88 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:71-89 — 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 (58 corresponding lines) · ×1
  • Edited copy of a member (58 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:108 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:108-179 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchSandboxExtended.swift:134-191 — These two members are one piece of code written twice and then edited apart: 58 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) VPhoneDaemon/Daemon/GuestAPI+Attitude.swift:10 — VPhoneDaemon/Daemon/GuestAPI+Attitude.swift:10-37 | VPhoneDaemon/Daemon/GuestAPI+Gyroscope.swift:10-40 — 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 (48 corresponding lines) · ×1
  • Edited copy of a member (48 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileWindowController.swift:23 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Files/VPhoneFileWindowController.swift:23-72 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Keychain/VPhoneKeychainWindowController.swift:18-65 — These two members are one piece of code written twice and then edited apart: 48 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (38 corresponding lines) · ×1
  • Edited copy of a member (38 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardView.swift:7 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestClipboardView.swift:7-45 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/GuestTools/VPhoneGuestPreferencesView.swift:8-45 — These two members are one piece of code written twice and then edited apart: 38 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (31 corresponding lines) · ×1
  • Edited copy of a member (31 corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Processes/VPhoneProcessesView.swift:152 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Processes/VPhoneProcessesView.swift:152-182 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Processes/VPhoneProcessesView.swift:185-216 — 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 (30 corresponding lines) · ×1
  • Edited copy of a member (30 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareLocationdCohorting.swift:15 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareLocationdCohorting.swift:15-44 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareTVSetup.swift:14-44 — These two members are one piece of code written twice and then edited apart: 30 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 26+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 26+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:119 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:119-144 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:89-130 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:57-85 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 26 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:772 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:772-795 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:237-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 copy of a member (42 corresponding lines) · ×1
  • Edited copy of a member (42 corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegion.swift:15 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchSharedRegion.swift:15-62 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:23-64 — 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 copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:656 — VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:656-684 | VPhoneKit/VPhoneCoreKit/Process/VPhoneConfinedDirectory.swift:689-725 — 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, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:917 — VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:917-939 | VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:941-961 | VPhoneLaunchpad/VPhoneLaunchpad/Control/VPhoneLaunchpadControlCommands.swift:963-982 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 17+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4881 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4881-4897 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4899-4923 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:4928-4944 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 18+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 18+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:642 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:642-659 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:762-782 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:900-917 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1034-1051 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:167 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:167-183 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:123-151 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift:131-146 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:558 — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:558-579 | VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift:587-612 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 13+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 13+ corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:326 — VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:326-338 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:341-353 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:356-368 | VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneControlsModel.swift:401-415 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 13 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 15+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:114 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:114-135 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:260-276 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:103-117 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUPrimitiveRestart.swift:61-75 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:530-553 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:225-241 — These 6 members are one piece of code written 6 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 6 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) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:130 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:130-137 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:140-147 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:179-186 — 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, 12+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 12+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:340 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:340-359 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:255-279 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift:271-282 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift:373-387 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 14+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 14+ corresponding lines) VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1427 — VPhoneExecutable/VPhoneVirtualization/UI/GuestCommunication/VPhoneGuestControl.swift:1427-1445 | VPhoneExecutable/VPhoneVirtualization/UI/VPhoneHostAutomationServer.swift:707-722 | VPhoneKit/VPhoneCoreKit/Support/VPhoneGuestFileName.swift:136-149 — 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 (4 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 4+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:72 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:72-75 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:78-81 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:84-87 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:6-10 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 9+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 9+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:139 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:139-147 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:136-144 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:146-154 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:248-257 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (6 members, 6+ corresponding lines) · ×1
  • Edited copies of one member (6 members, 6+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:322 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:322-327 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:179-185 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:197-203 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:205-211 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSpawnPersona.swift:174-181 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:229-236 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 6 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 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) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:34 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CustomFirmwareVisionOSFramePacing.swift:34-42 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/Dyld/CustomFirmwareTVTPRO.swift:35-44 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:45-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 12+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 12+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:24 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareDaemons.swift:24-35 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Manifest/FirmwareManifest.swift:34-45 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Patch/PatcherError.swift:11-22 — 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 (4 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 7+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:32 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:32-38 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:40-46 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift:32-38 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/BinaryBuffer.swift:7-18 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 5+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:321 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:321-333 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:312-316 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:171-177 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:144-149 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:290-295 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 7+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 7+ corresponding lines) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:69 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:69-75 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:115-126 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:198-208 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:213-223 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:488-494 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:510-516 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:606-616 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 5+ corresponding lines) VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:83 — VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:83-87 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:91-95 | VPhoneKit/VPhoneCoreKit/VirtualMachine/VPhoneDisplayOrientation.swift:100-104 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (7 members, 4+ corresponding lines) · ×1
  • Edited copies of one member (7 members, 4+ corresponding lines) VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:64 — VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:64-67 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:105-108 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:252-255 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:355-359 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64Encoder.swift:362-366 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:12-15 | VPhoneExecutable/VPhoneCommand/VPhonePatchKit/ARM64/ARM64EncoderCSSC.swift:22-25 — These 7 members are one piece of code written 7 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 7 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (5 members, 3+ corresponding lines) · ×1
  • Edited copies of one member (5 members, 3+ corresponding lines) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:11 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:11-13 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:12-14 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:87-91 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKImageExport.swift:161-165 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKMachO.swift:194-198 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (36–39 lines × 2) · ×1
  • Duplicated block (36–39 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:128 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:128-163 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchSandboxExtended.swift:153-191 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:128` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchSandboxExtended.swift:150` calls `log` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift:125` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (31–32 lines × 2) · ×1
  • Duplicated block (31–32 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:156 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:156-186 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:206-237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootCustomFirmwarePatcher.swift:156` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (28–30 lines × 2) · ×1
  • Duplicated block (28–30 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1559 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1559-1588 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1700-1727 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1559` it does not close everything it opens, so those 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1557` calls `locateSPGate`, `locatePlaybackHandler` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1699` 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 (21–23 lines × 2) · ×1
  • Duplicated block (21–23 lines × 2) VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift:113 — VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift:113-133 | VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift:151-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneKit/VPhoneCoreKit/Process/VPhoneProcessRunner.swift:113` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (18–22 lines × 2) · ×1
  • Duplicated block (18–22 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:146 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:146-167 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:407-424 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (14–20 lines × 2) · ×1
  • Duplicated block (14–20 lines × 2) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:129 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:129-142 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift:327-346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:129` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16–19 lines × 5) · ×1
  • Duplicated block (16–19 lines × 5) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:266 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:266-284 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:310-325 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:351-369 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:395-413 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:470-488 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareDyldSharedCacheVerbsCommand.swift:266` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:282 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:282-301 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:502-520 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:282` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (14–17 lines × 2) · ×1
  • Duplicated block (14–17 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:363 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:363-376 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:467-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMDevPatcher.swift:363` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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 (15–16 lines × 3) · ×1
  • Duplicated block (15–16 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:39 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:39-54 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:140-154 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:234-248 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (3–16 lines × 3) · ×1
  • Duplicated block (3–16 lines × 3) VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:171 — VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:171-186 | VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:553-568 | VPhoneLaunchpad/VPhoneLaunchpadHelper/VPhoneLaunchpadHelperAuthorization.swift:89-91 — 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 `VPhoneLaunchpad/VPhoneLaunchpad/HostSetup/VPhoneLaunchpadHelperClient.swift:171` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (12–15 lines × 5) · ×1
  • Duplicated block (12–15 lines × 5) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:74 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:74-85 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:60-71 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:57-68 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:63-77 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:59-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 all 5 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:74` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11–15 lines × 2) · ×1
  • Duplicated block (11–15 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:114 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:114-128 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:260-270 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:16 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:16-29 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchPortToMap.swift:16-29 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:40-52 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchParavirtUserClients.swift:57-70 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:16` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchLoadDylinker.swift:30` calls `jbIsInCodeRange` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Sandbox/KernelCustomFirmwarePatchIoucSandbox.swift:53` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:35 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:35-48 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:136-149 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift:284-297 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (13 lines × 5) · ×1
  • Duplicated block (13 lines × 5) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:133 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:133-145 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:156-168 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:178-190 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:638-650 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:682-694 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwarePostRestoreDeviceTree.swift:133` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (10–13 lines × 3) · ×1
  • Duplicated block (10–13 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:69 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHomeViewEnvironmentPatcher.swift:69-78 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheQuartzCoreUnrotatedFramebufferPatcher.swift:91-100 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheSettingsRowsPatcher.swift:187-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 all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1717 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1717-1729 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1749-1761 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1784-1796 — 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 `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1717` it does not close everything it opens, so those 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, `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1781` calls `contains`, `ValidationError` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1716` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2187 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2187-2198 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2206-2217 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2837-2848 — 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 `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:2187` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:148 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:148-157 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:409-418 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:532-542 — 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:148` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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 (3–11 lines × 3) · ×1
  • Duplicated block (3–11 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:102 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:102-109 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:110-120 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:97-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheTextRecognitionANEPatcher.swift:100` calls `DyldSharedCacheWriteSpan`, `snapshots` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalVertexFormatPatcher.swift:120` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–11 lines × 2) · ×1
  • Duplicated block (7–11 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:175 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBForceKernPatcher.swift:175-181 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:137-147 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:137` it does not close everything it opens, so those 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×1
  • Duplicated block (10 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:349 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:349-358 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreeGuestDevicePatches.swift:412-421 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DeviceTree/DeviceTreePatcher.swift:131-140 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:108 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:108-124 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift:102-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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPrimitiveRestartPatcher.swift:108` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (26 lines × 2) · ×1
  • Duplicated block (26 lines × 2) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:447 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:447-472 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:811-836 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:447` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:620 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:620-626 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:727-735 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:865-873 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:999-1007 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:620` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:54 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:54-62 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:97-105 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:37-45 — 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/AVPBooter/AVPBooterPatcher.swift:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–9 lines × 3) · ×1
  • Duplicated block (6–9 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:119 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:119-127 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:265-270 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:229-234 — 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 `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–9 lines × 3) · ×1
  • Duplicated block (7–9 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:241 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:241-249 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift:160-166 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift: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 all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher.swift:241` it does not close everything it opens, so those 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 register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–8 lines × 5) · ×1
  • Duplicated block (6–8 lines × 5) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:119 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:119-126 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:265-270 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:106-111 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUPrimitiveRestart.swift:64-69 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:229-234 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:119` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift:98 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift:98-103 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift:182-189 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/ExperimentalPatches/KernelExperimentalPatchHvVmmRename.swift:98` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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 lines × 6) · ×1
  • Duplicated block (7 lines × 6) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:118 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:118-124 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift:264-270 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift:150-156 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:411-417 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:534-541 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift:228-234 — there are 6 copies across 5 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 6 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/CacheLoader/CustomFirmwareCacheLoader.swift:118` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside 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 (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1182 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1182-1188 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1307-1313 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1488-1494 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1876-1882 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1883` calls `vma`, `UInt64` and `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:1496` 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 (34 lines × 2) · ×1
  • Duplicated block (34 lines × 2) Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:35 — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:35-68 | Research/Guest/SettingsRows/ReviewedProviderPatch.swift:36-69 — before extracting anything, compare `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift` and `Research/Guest/SettingsRows/ReviewedProviderPatch.swift` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 51 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:271 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:271-277 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:492-497 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:271` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, 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 (2–6 lines × 8) · ×1
  • Duplicated block (2–6 lines × 8) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:91 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchDisplayScale.swift:91-94 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:166-171 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:175-180 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:231-233 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:262-267 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:309-311 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMExecutableRemap.swift:298-299 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:239-241 — there are 8 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 8 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (4–6 lines × 3) · ×1
  • Duplicated block (4–6 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:33 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:33-36 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:41-46 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift:33-38 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (5–6 lines × 3) · ×1
  • Duplicated block (5–6 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:120 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/IBootPatcher.swift:120-125 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:100-104 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift:58-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (2–5 lines × 7) · ×1
  • Duplicated block (2–5 lines × 7) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1682 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1682-1683 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1863-1867 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1882-1885 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1895-1899 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1908-1912 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1921-1925 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1936-1940 — all 7 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1863` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1867` calls `directory` and `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1683` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift:18 — VPhoneDaemon/Daemon/GuestAPI+HomePodDebug.swift:18-22 | VPhoneDaemon/Daemon/GuestAPI+HomeViewDistance.swift:15-19 | VPhoneDaemon/Daemon/GuestAPI+VisionOSImmersion.swift:25-29 | VPhoneDaemon/Daemon/GuestHomePodDisplay.swift:19-23 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:266 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:266-271 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:279-284 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:487-492 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/KernelPatcherBase.swift:499-504 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:266` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×1
  • Duplicated block (11 lines × 3) VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1731 — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1731-1741 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1763-1773 | VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1798-1808 — 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 `VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1731` it begins part-way through the construct above it, so those 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 (3–5 lines × 3) · ×1
  • Duplicated block (3–5 lines × 3) VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:161 — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:161-163 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Memory/KernelCustomFirmwarePatchVmProtect.swift:254-258 | VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchTaskForPid.swift:72-76 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (4–5 lines × 3) · ×1
  • Duplicated block (4–5 lines × 3) VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:654 — VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:654-658 | VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:870-873 | VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift:201-205 — 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 `VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:654` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:659` calls `hash`, `Data` and `VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneOTAArchive.swift:873` 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.
X3 · Exception handling · Swallowed exception (empty catch) · ×1
  • Swallowed exception (empty catch) VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneFrameProducer.swift:285 — 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.
Minor — 49 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×23
  • Duplicated predicate VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift:107 — `$0.element.isDecoded && $0.element.size == 4 && $0.element.address == start + UInt64($0.offset * 4)` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMetalCacheReusePatcher.swift. 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 VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift:1231 — `$0.hasPrefix("iPhone") && $0.hasSuffix("_Restore")` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneCustomFirmwareInstaller.swift, VPhoneKit/VPhoneCoreKit/Restore/VPhoneRestoreInfo.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExtraction.swift:164 — `$0.segmentName == "__LINKINFO" && $0.name == "__symbolsets"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKExtraction.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift:164 — `$0.segmentName == "__TEXT_EXEC" && $0.name == "__text"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KDK/KDKLinkSymbols.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/KernelCache/KernelCollectionStubCalls.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift:2113 — `$0.type == .register && $0.writesRegister && ($0.reg == .x(0) || $0.reg == .w(0))` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/VirtualAudio/CustomFirmwareVirtualAudio.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheGLESPointDrawPatcher.swift. 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 VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:655 — `(value >= 48 && value <= 57) || (value >= 65 && value <= 90) || (value >= 97 && value <= 122) || value == 45 || value == 46 || value == 95` appears character-identically in 2 files — VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift, VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift. 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 VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift:127 — `device.family == .iPhone || device.family == .iPad` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareOTACommand.swift, VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwarePreparer.swift. 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 VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift:321 — `error is CancellationError || Task.isCancelled` appears character-identically in 2 files — VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadCreationPipeline.swift, VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadMachineLibrary.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage+DynamicMetadata.swift:116 — `found.lowerBound == range.lowerBound || data[found.lowerBound - 1] == 0` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage+DynamicMetadata.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift:82 — `guestFamily == .iPhone || guestFamily == .iPad` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcher.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift:195 — `insn.mnemonic == "cbz" || insn.mnemonic == "cbnz"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/IBoot/BasePatches/IBootPatchRootfsBypass.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsMount.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift:135 — `insn.mnemonic == "mov" || insn.mnemonic == "movz"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchThreadSetState.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift:277 — `insn.mnemonic == "ret" || insn.mnemonic == "retab"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLockdownModePatcher.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheXPCLWCRPatcher.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift:42 — `insn.mnemonic == "tbnz" || insn.mnemonic == "tbz"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/APFS/KernelPatchApfsSnapshot.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/TXM/TXMPatcher.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchNvram.swift:42 — `insn.mnemonic == "tbz" || insn.mnemonic == "tbnz"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Drivers/KernelCustomFirmwarePatchNvram.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Frida/KernelCustomFirmwarePatchForkInheritInvalidCode.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift:354 — `instruction.mnemonic == "ret" || instruction.mnemonic == "retab"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheIOMFBSwapEndPatcher.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheLSDEmbeddedRegPatcher.swift. 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 VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift:295 — `iphoneVersion != nil || iphoneBuild != nil` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/VPhoneCommand/Firmware/VPhoneFirmwareCommand.swift, VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineCreateCommand.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift:66 — `offset >= 0 && length >= 0 && offset + length <= count` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareMachOCodeSignature.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift:476 — `offset >= 0 && offset + MemoryLayout<T>.size <= count` appears character-identically in 4 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheCodeSignature.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheLocalSymbolTable.swift, VPhoneExecutable/VPhoneCommand/VPhonePatchKit/Binary/BinaryBuffer.swift, VPhoneExecutable/VPhoneCommand/VPhoneSign/Signing/VPhoneSignBytes.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift:459 — `position == 0 || buffer[buffer.startIndex + position - 1] == 0` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/DyldSharedCacheChunkSet.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheHypervisorVirtualMachinePatcher+MachOStringSites.swift. 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 VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift:129 — `seg.name == "__DATA_CONST" || seg.name == "__DATA"` appears character-identically in 2 files — VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/BasePatches/Security/KernelPatchSandbox.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/CodeSigning/KernelCustomFirmwarePatchHookCredLabel.swift. 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 VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveExtractor.swift:102 — `status == ARCHIVE_OK || status == ARCHIVE_WARN` appears character-identically in 3 files — VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveExtractor.swift, VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveReader.swift, VPhoneKit/VPhoneArchiveKit/Archive/VPhoneArchiveWriter.swift. 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 Research/Guest/SettingsRows/GameCenterStandalonePatch.swift:56 — `text.va >= $0.va && text.va - $0.va < $0.size` appears character-identically in 3 files — Research/Guest/SettingsRows/GameCenterStandalonePatch.swift, Research/Guest/SettingsRows/ReviewedProviderPatch.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/SettingsRows/CustomFirmwareSettingsRows.swift. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
X7 · Silent fallback defaults · Silent fallback default in catch · ×5
  • Silent fallback default in catch VPhoneDaemon/Daemon/GuestAPI+SystemApps.swift:548 — `directoryEntries` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:165 — `testedBuilds` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:208 — `releases` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineTemplateCommand.swift:603 — `knownKeys` turns every thrown error into `[]` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
  • Silent fallback default in catch VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Controls/VPhoneHomePodDebugModel.swift:144 — `editorText` turns every thrown error into `"null"` — a data error becomes a silent behavior change with no trail. Log the error or let it propagate (`throws`). 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 at the `catch`, `guard` or `??`, or in the doc comment, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 96 significant file(s) lose their only recent owner: VPhoneExecutable/VPhoneCommand/FirmwarePatcher/DyldSharedCache/Patchers/DyldSharedCacheMISTrustAuthPatcher.swift, VPhoneLaunchpad/VPhoneLaunchpad/CoreBundle/VPhoneLaunchpadCoreBundle.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/CustomFirmwareInjectDylib.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/DiskImage/CustomFirmwareDiskImage.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/WatchDog/CustomFirmwareWatchDog.swift, VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/DeviceInfo/VPhoneDeviceInfoModel.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/MobileActivation/CustomFirmwareMobileActivation.swift, VPhoneExecutable/VPhoneCommand/FirmwarePatcher/Kernel/CustomFirmwarePatches/Process/KernelCustomFirmwarePatchSyscallmask.swift (+88 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 23 significant file(s) lose their only recent owner: VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineTemplates.swift, VPhoneKit/VPhoneCoreKit/Bundle/VPhoneDiskRebase.swift, VPhoneDaemon/Daemon/GuestServiceProfile.swift, VPhoneKit/VPhoneCoreKit/Bundle/VPhoneMachineSnapshots.swift, VPhoneLaunchpad/VPhoneLaunchpad/Machines/VPhoneLaunchpadDiskUsage.swift, VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneHostAudioLatencySync.swift, VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneTemplateSetup.swift, VPhoneKit/VPhoneCoreKit/Bundle/VPhoneTemplateSlimmingRequest.swift (+15 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneAttitudeDial.swift, VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneMotionView.swift, VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Panels/Motion/VPhoneAttitudeDialsWindowController.swift. Pair on, review, or document these before any departure.
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneTouchIDMonitor.swift: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 VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Preview/VPhoneQuickLookController.swift: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.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (123 single-owned of 595 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; 595 of the 714 production source files in this repository met that bar). They are anonymized user #4 (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: VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Packages.swift.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj:1 — 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 `VPhoneLaunchpad/VPhoneLaunchpad.xcodeproj/project.pbxproj` makes this repository a deployable product (line 1).
D21 · Naming Consistency · `addGpuDriver` spells `Gpu` where 21 names in the project spell it `GPU` · ×1
  • `addGpuDriver` spells `Gpu` where 21 names in the project spell it `GPU` VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:186 — 21 of 22 names in project repository spell the token `GPU` (21 of 22; unit: names in project repository containing `GPU`). Peers: GuestIconServicesCache.dropIfOlderThanGPUOnStartup (VPhoneDaemon/Daemon/GuestIconServicesCache.swift:28); CryptexFilesystemPatcher.retargetGPUBundle (VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CryptexFilesystem/CryptexFilesystemPatcherGuestPayload.swift:264); repository.CustomFirmwareParavirtGPUCompilerCache (VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUCompilerCache.swift:17); repository.CustomFirmwareParavirtGPUIndexOffset (VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUIndexOffset.swift:56); repository.CustomFirmwareParavirtGPUPrimitiveRestart (VPhoneExecutable/VPhoneCommand/FirmwarePatcher/CustomFirmware/ExecutablePatches/ParavirtGPU/CustomFirmwareParavirtGPUPrimitiveRestart.swift:39). Rename to `addGPUDriver`. [rule N6]
D21 · Naming Consistency · `includeIpsw` spells `Ipsw` where 23 names in the project spell it `IPSW` · ×1
  • `includeIpsw` spells `Ipsw` where 23 names in the project spell it `IPSW` VPhoneExecutable/VPhoneCommand/VPhoneCommand/VirtualMachine/VPhoneVirtualMachineTransferCommand.swift:61 — 23 of 24 names in project repository spell the token `IPSW` (23 of 24; unit: names in project repository containing `IPSW`). Peers: VPhoneBundleTransfer.export(includeIPSW) (VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift:70); VPhoneBundleTransfer.archivedLogicalSize(includeIPSW) (VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneBundleTransfer.swift:129); repository.VPhoneIPSWCache (VPhoneKit/VPhoneArchiveKit/Transfer/VPhoneIPSWCache.swift:10); VPhoneFirmwareMatrix.sharedIPSWNames (VPhoneKit/VPhoneCoreKit/Firmware/VPhoneFirmwareMatrix.swift:228); repository.VPhoneLaunchpadIPSW (VPhoneLaunchpad/VPhoneLaunchpad/IPSWCache/VPhoneLaunchpadIPSW.swift:10). Rename to `includeIPSW`. [rule N6]
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 4 of 7 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `VPhoneExecutable/VPhoneCommand` (73923 LoC, 607 module-visible types across 47 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 · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 595 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (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; 595 of the 714 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: VPhoneExecutable/VPhoneVirtualization/UI/HostDevices/VPhoneTouchIDMonitor.swift, VPhoneExecutable/VPhoneVirtualization/UI/UserInterface/Browsers/Preview/VPhoneQuickLookController.swift. 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.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 4/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `VPhoneExecutable/VPhoneVirtualization`.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:6 — No static application security testing detected. For this repository's stack, add CodeQL's Swift pack (Swift/Xcode) (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 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation VPhoneWebsite/package.json:11 — `VPhoneWebsite/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
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.)
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
Minor — 36 finding(s)
D10 · Test Quality · Skipped (documented) · ×24
  • Skipped (documented): matchesApplesTree VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/DeviceTreeResearchBoardTests.swift:176 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): referenceCorpusByteParity VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/KDKImageExportTests.swift:57 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): realMixFindsCallSitePatches VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/KernelCollectionStubCallsTests.swift:162 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): matchesVPhone600 VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/SEPResearchBoardTests.swift:72 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): patchesAppleImages VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Core/SPTMSecondaryCPUTests.swift:159 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift:166 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift:230 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift:296 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareJetsamTests.swift:357 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMachOTests.swift:178 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMachOTests.swift:468 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMobileActivationTests.swift:162 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMobileActivationTests.swift:195 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareMobileActivationTests.swift:301 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwarePlistPatchTests.swift:638 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): reviewedClassifier VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareWatchAudioBudgetTests.swift:224 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): cachePatchAndSignature VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareWatchAudioBudgetTests.swift:271 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/CustomFirmware/CustomFirmwareWatchDogTests.swift:167 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/DyldSharedCache/DyldSharedCacheSettingsRowsTests.swift:9 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/Kernel/KernelParavirtTask3Tests.swift:18 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): suppliedTXMPreservesAssociationAndFinalValidation VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/TXM/TXMExecutableRemapTests.swift:461 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): suppliedOlderTXMPreservesNativePolicy VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/TXM/TXMExecutableRemapTests.swift:539 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): suppliedImageRejectsPartialPlansAndRetainsPresentProfileChecks VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/TXM/TXMMissingProfileTests.swift:188 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
  • Skipped (documented): suppliedCMSSignaturePassesTheControlledFinalizerWithoutChangingType VPhoneExecutable/VPhoneCommand/FirmwarePatcherTests/TXM/TXMMissingProfileTests.swift:217 — Skipped with a documented reason — a deferral, not lazy debt: conditionally enabled — runs only when its .enabled(if:) condition holds
D12 · Dependency Hygiene · Outdated · ×12
  • Outdated: applemobiledevicelibrary — `applemobiledevicelibrary` is resolved at 1.0.1790243523, but 1.0.1793883883 is the newest release tagged on https://github.com/Lakr233/AppleMobileDeviceLibrary.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update applemobiledevicelibrary` reaches this one with no change to Package.swift.
  • Outdated: libarchive.xcframework — `libarchive.xcframework` is resolved at 1.0.0, but 1.0.2 is the newest release tagged on https://github.com/Lakr233/libarchive.xcframework.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update libarchive.xcframework` reaches this one with no change to Package.swift.
  • Outdated: libghostty-spm — `libghostty-spm` is resolved at 1.6.20260928, but 1.6.20261003 is the newest release tagged on https://github.com/Lakr233/libghostty-spm.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update libghostty-spm` reaches this one with no change to Package.swift.
  • Outdated: machokit — `machokit` is resolved at 0.54.1, but 0.55.0 is the newest release tagged on https://github.com/p-x9/MachOKit.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update machokit` reaches this one with no change to Package.swift.
  • Outdated: msdisplaylink — `msdisplaylink` is resolved at 2.2.0, but 2.2.1 is the newest release tagged on https://github.com/Lakr233/MSDisplayLink.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update msdisplaylink` reaches this one with no change to Package.swift.
  • Outdated: swift-argument-parser — `swift-argument-parser` is resolved at 1.3.1, but 1.8.2 is the newest release tagged on https://github.com/apple/swift-argument-parser.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-argument-parser` reaches this one with no change to Package.swift.
  • Outdated: swift-asn1 — `swift-asn1` is resolved at 1.7.3, but 1.7.4 is the newest release tagged on https://github.com/apple/swift-asn1.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-asn1` reaches this one with no change to Package.swift.
  • Outdated: swift-binary-parse-support — `swift-binary-parse-support` is resolved at 0.2.1, but 0.3.0 is the newest release tagged on https://github.com/p-x9/swift-binary-parse-support.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-binary-parse-support` reaches this one with no change to Package.swift.
  • Outdated: swift-collections — `swift-collections` is resolved at 1.7.1, but 1.7.6 is the newest release tagged on https://github.com/apple/swift-collections.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-collections` reaches this one with no change to Package.swift.
  • Outdated: swift-fileio-extra — `swift-fileio-extra` is resolved at 0.3.0, but 0.4.0 is the newest release tagged on https://github.com/p-x9/swift-fileio-extra.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-fileio-extra` reaches this one with no change to Package.swift.
  • Outdated: swift-nio — `swift-nio` is resolved at 2.83.0, but 2.105.0 is the newest release tagged on https://github.com/apple/swift-nio.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-nio` reaches this one with no change to Package.swift.
  • Outdated: swift-system — `swift-system` is resolved at 1.8.1, but 1.9.0 is the newest release tagged on https://github.com/apple/swift-system.git within the same major. SwiftPM resolves from git tags, and a `from:` requirement admits every release below the next major — so `swift package update swift-system` reaches this one with no change to Package.swift.

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-f171bc52942e4c86a16806412d2f3b55/history.json --exit-code 0 --source .2artifacts/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-f171bc52942e4c86a16806412d2f3b55/tree.json --exit-code 0 --source .2artifacts/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 .47artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .3artifacts/raw/trivy-fs.json
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 313 file(s) — `Research/Guest/SettingsRows/GameCenterStandalonePatch.swift`, `Research/VPhoneVirtualMachineRefactored.swift`, `VPhoneDaemon/Daemon/APIWire.swift`, `VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Packages.swift`, `VPhoneDaemon/Daemon/Bootstrap/GuestIrisinInstaller+Payload.swift`, … (+308 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 Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1d944-bb22-77ab-87b0-29577a0c027f · 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