{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D21","name":"Naming Consistency","shortDescription":{"text":"Naming Consistency"},"helpUri":"https://codehealth.canine.dev/dimensions/D21"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"]}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"]}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"]}}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"ChatPanelKt.ChatPanel (cyclomatic 63): ChatPanelKt.ChatPanel has cyclomatic complexity 63 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ca84b07056b4b3ae013657e4680ee60fe5a64d4e7ef5f223fd13384df61652f"}},{"ruleId":"D1","level":"warning","message":{"text":"MessageInputTextKt.MessageInputText (cyclomatic 50): MessageInputTextKt.MessageInputText has cyclomatic complexity 50 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageInputText.kt"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"192ad4963595171394bb25fc631c23c449b96b24a0dbfb1ed5c739af7deb9ae1"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadAndTryButtonKt.DownloadAndTryButton (cyclomatic 47): DownloadAndTryButtonKt.DownloadAndTryButton has cyclomatic complexity 47 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/DownloadAndTryButton.kt"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"6cd9844a66fe3f44ab332f534d0aeb1d06c9f7baaa38b1fdef1c71b567ab7875"}},{"ruleId":"D1","level":"warning","message":{"text":"SkillManagerBottomSheetKt.SkillManagerBottomSheet (cyclomatic 45): SkillManagerBottomSheetKt.SkillManagerBottomSheet 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"8203c160e74418e41fa3eb98fc03e96f3dca19f3c46e9e797d115df106820b0a"}},{"ruleId":"D1","level":"warning","message":{"text":"TinyGardenScreenKt.MainUi (cyclomatic 43): TinyGardenScreenKt.MainUi has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"cefe82f311ce224c1d9f6251d0a77350120e32c52199e444fda21467c0977a92"}},{"ruleId":"D1","level":"warning","message":{"text":"AgentChatScreenKt.AgentChatScreen (cyclomatic 33): AgentChatScreenKt.AgentChatScreen has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b01371d5abd670add38fb36e9aa5c61bd64c518be01c5aebd1fc282c5de14a4"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelPageAppBarKt.ModelPageAppBar (cyclomatic 33): ModelPageAppBarKt.ModelPageAppBar has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ModelPageAppBar.kt"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"11819dae92adc8e66d544155de4f4622cecb2894fa108949e08a18540f89216b"}},{"ruleId":"D1","level":"warning","message":{"text":"BenchmarkResultsViewerKt.BenchmarkResultsViewer (cyclomatic 30): BenchmarkResultsViewerKt.BenchmarkResultsViewer 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkResultsViewer.kt"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a8cedded75bd1499e78eccc9cf019623e88bda3c0b18ca6dabbbdc6dd661815"}},{"ruleId":"D1","level":"warning","message":{"text":"ConfigKt.convertValueToTargetType (cyclomatic 29): ConfigKt.convertValueToTargetType has cyclomatic complexity 29 (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 \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"08b6fe51d77a311fefe15f40f4c280c94c891a3ed6968e9abc3b3f5ed8a3389d"}},{"ruleId":"D1","level":"warning","message":{"text":"MobileActionsScreenKt.MainUi (cyclomatic 28): MobileActionsScreenKt.MainUi 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"740cedda01b2df5038d7f9c16d370b65b7f07b9e38e302fa52041fa44221a462"}},{"ruleId":"D1","level":"warning","message":{"text":"GalleryNavGraphKt.GalleryNavHost (cyclomatic 28): GalleryNavGraphKt.GalleryNavHost 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/navigation/GalleryNavGraph.kt"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"21b7a8e17650de41a670af5e9be853c9357b0573d93b38f331f93c1bdceb8d69"}},{"ruleId":"D1","level":"warning","message":{"text":"DownloadWorker.doWork (cyclomatic 28): DownloadWorker.doWork 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/worker/DownloadWorker.kt"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"9815b43e6c62ffe49d905d88a3af9264bc5c4226c6b7f5929c36a719857addbe"}},{"ruleId":"D1","level":"warning","message":{"text":"HomeScreenKt.HomeScreen (cyclomatic 27): HomeScreenKt.HomeScreen 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0983d83ef8d37e62a182853b05d32bb540f08526dd51ad7e6e0d28b54c28aae"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelItemKt.ModelItem (cyclomatic 25): ModelItemKt.ModelItem has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/modelitem/ModelItem.kt"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c26cea7c426c937293cde46d803d9db967ec181bda739c5d6d39281eb9483c7"}},{"ruleId":"D1","level":"warning","message":{"text":"AllowedModel.toModel (cyclomatic 24): AllowedModel.toModel 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/ModelAllowlist.kt"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"e710417251c0cbeeac334eab5aa3eb38df2c0df8505c46597846acd565808a37"}},{"ruleId":"D1","level":"warning","message":{"text":"LlmChatViewModelBase.generateResponse (cyclomatic 23): LlmChatViewModelBase.generateResponse 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b69de5ea98d577e7f81b88a68cbf1c05c3d66e2bf906871cbb5a8b9b963dbec"}},{"ruleId":"D1","level":"warning","message":{"text":"PromptTemplatesPanelKt.PromptTemplatesPanel (cyclomatic 22): PromptTemplatesPanelKt.PromptTemplatesPanel 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a97875fa3100a182b2561757a0d4e234c68354b1e404a3dc3c9ecc88bd323c"}},{"ruleId":"D1","level":"warning","message":{"text":"AddMcpServerFromUrlDialogKt.AddMcpServerFromUrlDialog (cyclomatic 21): AddMcpServerFromUrlDialogKt.AddMcpServerFromUrlDialog 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"383d4b936451940c92bb98252a39eaba5d481e8238ac0a7ec25486781a5f08c0"}},{"ruleId":"D1","level":"warning","message":{"text":"AddOrEditSkillBottomSheetKt.AddOrEditSkillBottomSheet (cyclomatic 21): AddOrEditSkillBottomSheetKt.AddOrEditSkillBottomSheet 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddOrEditSkillBottomSheet.kt"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"116ddc9512ac0af5fbb1cefb99febf22d6db27d25e030d0d39331692898219c9"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelManagerViewModel.loadModelAllowlist (cyclomatic 21): ModelManagerViewModel.loadModelAllowlist 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"014d2a4c422de60fd61a05ca9b9dd4fe2041167ef8565cbb7b1015061992b826"}},{"ruleId":"D1","level":"warning","message":{"text":"ChatViewKt.ChatView (cyclomatic 18): ChatViewKt.ChatView 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"5f74fe9fb71e63f4f3217429d4dbe75c9f79dc4bd83c6df87152b72b2e4b8a63"}},{"ruleId":"D1","level":"warning","message":{"text":"LlmChatModelHelper.initialize (cyclomatic 17): LlmChatModelHelper.initialize has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca3d2112e65e6a754142b8ad2f9a25757adebea06f793e6c5f5b8b90d01dc251"}},{"ruleId":"D1","level":"warning","message":{"text":"ModelListKt.ModelList (cyclomatic 16): ModelListKt.ModelList 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelList.kt"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"facc3135c4d591fbcec821ee76b95b749ce0ec5651c84980956795def4b624de"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageInputTextKt.MessageInputText (cognitive 90): MessageInputTextKt.MessageInputText has cognitive complexity 90 (threshold 15). Drivers by points: if/else 65, match/switch 10, boolean chains 9, loops 4, error handling 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageInputText.kt"},"region":{"startLine":154}}}],"partialFingerprints":{"codehealthFindingId/v1":"37fdaca2d9db0fbbf5645d1ad618b808f7cc5c1c5fb12979c2b239947ec1ee89"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadWorker.doWork (cognitive 87): DownloadWorker.doWork has cognitive complexity 87 (threshold 15). Drivers by points: if/else 64, loops 17, boolean chains 4, error handling 2 (nesting depth added 60). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/worker/DownloadWorker.kt"},"region":{"startLine":94}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a9ace69e5956985dfbf61147443188b64f2cca1b33f47e53e34da76adca88ac"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillManagerBottomSheetKt.SkillManagerBottomSheet (cognitive 79): SkillManagerBottomSheetKt.SkillManagerBottomSheet has cognitive complexity 79 (threshold 15). Drivers by points: if/else 75, boolean chains 2, match/switch 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt"},"region":{"startLine":165}}}],"partialFingerprints":{"codehealthFindingId/v1":"2374cfbb145787d55625525fa5382d1b1b863614187e47aaf1b6e25227c5b882"}},{"ruleId":"D2","level":"warning","message":{"text":"MobileActionsScreenKt.MainUi (cognitive 79): MobileActionsScreenKt.MainUi has cognitive complexity 79 (threshold 15). Drivers by points: if/else 57, loops 18, boolean chains 4 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":281}}}],"partialFingerprints":{"codehealthFindingId/v1":"32ae9e02f2ae98e338e2dd7db2759a02d4669e2580a007360647a2bab11dcc9b"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatPanelKt.ChatPanel (cognitive 77): ChatPanelKt.ChatPanel has cognitive complexity 77 (threshold 15). Drivers by points: if/else 59, boolean chains 12, loops 3, match/switch 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"6379d4639f0be3c0853e05eb40659fdfa866990b96052758ed01a3b6ddd4877a"}},{"ruleId":"D2","level":"warning","message":{"text":"DownloadAndTryButtonKt.DownloadAndTryButton (cognitive 72): DownloadAndTryButtonKt.DownloadAndTryButton has cognitive complexity 72 (threshold 15). Drivers by points: if/else 59, boolean chains 9, match/switch 4 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/DownloadAndTryButton.kt"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"dd033299092cd737e5f02e30e1e3c909181d1d7101de8867a5f6ca7359a91c2a"}},{"ruleId":"D2","level":"warning","message":{"text":"BenchmarkResultsViewerKt.BenchmarkResultsViewer (cognitive 68): BenchmarkResultsViewerKt.BenchmarkResultsViewer has cognitive complexity 68 (threshold 15). Drivers by points: if/else 62, loops 4, boolean chains 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkResultsViewer.kt"},"region":{"startLine":115}}}],"partialFingerprints":{"codehealthFindingId/v1":"567e8f360b138afee322bf1ba5271e82b3974061a66727263859b78ad605b720"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeScreenKt.HomeScreen (cognitive 59): HomeScreenKt.HomeScreen has cognitive complexity 59 (threshold 15). Drivers by points: if/else 57, boolean chains 2 (nesting depth added 33). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt"},"region":{"startLine":161}}}],"partialFingerprints":{"codehealthFindingId/v1":"953b686c883a378eda519f6939d6c3df4b1800ad2a1bfd6f436f56f00057127c"}},{"ruleId":"D2","level":"warning","message":{"text":"GalleryNavGraphKt.GalleryNavHost (cognitive 56): GalleryNavGraphKt.GalleryNavHost has cognitive complexity 56 (threshold 15). Drivers by points: if/else 48, loops 4, boolean chains 3, match/switch 1 (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/navigation/GalleryNavGraph.kt"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"772de014cbf6ccbbda9a4e273e42e2ecf2fd308531167f76cbcd58b0bcfcb288"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelPageAppBarKt.ModelPageAppBar (cognitive 55): ModelPageAppBarKt.ModelPageAppBar has cognitive complexity 55 (threshold 15). Drivers by points: if/else 41, boolean chains 10, error handling 2, loops 2 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ModelPageAppBar.kt"},"region":{"startLine":69}}}],"partialFingerprints":{"codehealthFindingId/v1":"04d99e97ff9a0f6525216c64b1ad183ebdab1c12eb518f10c857c16f8965f7bd"}},{"ruleId":"D2","level":"warning","message":{"text":"TinyGardenScreenKt.MainUi (cognitive 51): TinyGardenScreenKt.MainUi has cognitive complexity 51 (threshold 15). Drivers by points: if/else 41, match/switch 5, boolean chains 2, loops 2, error handling 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt"},"region":{"startLine":219}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d1de54e8bc07209aea9905ef7ef860652e81df56d3a40c76ee4d066f5e5ea8f"}},{"ruleId":"D2","level":"warning","message":{"text":"LlmChatViewModelBase.generateResponse (cognitive 44): LlmChatViewModelBase.generateResponse has cognitive complexity 44 (threshold 15). Drivers by points: if/else 36, boolean chains 5, loops 2, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8a9670ce1155b23206a70e0dd84b6dc91e79434c7d81b375c4cd0d25e238b3a"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentChatScreenKt.AgentChatScreen (cognitive 41): AgentChatScreenKt.AgentChatScreen has cognitive complexity 41 (threshold 15). Drivers by points: if/else 29, boolean chains 4, error handling 3, match/switch 3, loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt"},"region":{"startLine":124}}}],"partialFingerprints":{"codehealthFindingId/v1":"024f537dc2c5ff04732b991ebba86c4db2b671e03870c24f58c8e476ba39faed"}},{"ruleId":"D2","level":"warning","message":{"text":"AllowedModel.toModel (cognitive 38): AllowedModel.toModel has cognitive complexity 38 (threshold 15). Drivers by points: if/else 32, boolean chains 3, loops 3 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/ModelAllowlist.kt"},"region":{"startLine":75}}}],"partialFingerprints":{"codehealthFindingId/v1":"36ab1b000be4ccba8c481cfa2807cc48ab7c4877572072ca5a1be53b630dd23c"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelManagerViewModel.loadModelAllowlist (cognitive 36): ModelManagerViewModel.loadModelAllowlist has cognitive complexity 36 (threshold 15). Drivers by points: if/else 23, loops 7, boolean chains 3, error handling 3 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":928}}}],"partialFingerprints":{"codehealthFindingId/v1":"35a9e20c43603a6a5bd4154b3f91ca12c98f54333db12aaaa50503d2530c1ecc"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentHandler.readCalendarEvents (cognitive 34): IntentHandler.readCalendarEvents has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, loops 3, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/IntentHandler.kt"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"378061bb92f0838e09709ba68ac87d75fb4f40cf6d99bdcbac030f01ca59de74"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelItemKt.ModelItem (cognitive 34): ModelItemKt.ModelItem has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, boolean chains 8, loops 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/modelitem/ModelItem.kt"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b254d83f174040e86c26efd3273c7e8bcc641799d1f6860ffd1bb34e5bcd353"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelNameAndStatusKt.ModelStatusDetails (cognitive 34): ModelNameAndStatusKt.ModelStatusDetails has cognitive complexity 34 (threshold 15). Drivers by points: if/else 30, boolean chains 2, loops 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/modelitem/ModelNameAndStatus.kt"},"region":{"startLine":188}}}],"partialFingerprints":{"codehealthFindingId/v1":"82f316cb74796414ab9d52504b4660f16e19ff8b7edab5af159440674e147090"}},{"ruleId":"D2","level":"warning","message":{"text":"PromptTemplatesPanelKt.PromptTemplatesPanel (cognitive 31): PromptTemplatesPanelKt.PromptTemplatesPanel has cognitive complexity 31 (threshold 15). Drivers by points: if/else 19, loops 5, boolean chains 4, match/switch 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"270e9ea783c097ac8bf32747b742f0d0e968a421847a02105a8031b6000eabee"}},{"ruleId":"D2","level":"warning","message":{"text":"AddOrEditSkillBottomSheetKt.AddOrEditSkillBottomSheet (cognitive 30): AddOrEditSkillBottomSheetKt.AddOrEditSkillBottomSheet has cognitive complexity 30 (threshold 15). Drivers by points: if/else 26, loops 2, boolean chains 1, match/switch 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddOrEditSkillBottomSheet.kt"},"region":{"startLine":122}}}],"partialFingerprints":{"codehealthFindingId/v1":"629153c9cac0454e960d62759420ca1ae1129bb3fd99ea99ce283e55a8be5745"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelDownloadingAnimationKt.ModelDownloadingAnimation (cognitive 30): ModelDownloadingAnimationKt.ModelDownloadingAnimation has cognitive complexity 30 (threshold 15). Drivers by points: if/else 28, boolean chains 2 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ModelDownloadingAnimation.kt"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"209569c4a59c9a02463a0e14a4306e56efcb6023bba19ad5dc5abd851838f300"}},{"ruleId":"D2","level":"warning","message":{"text":"AddMcpServerFromUrlDialogKt.AddMcpServerFromUrlDialog (cognitive 26): AddMcpServerFromUrlDialogKt.AddMcpServerFromUrlDialog has cognitive complexity 26 (threshold 15). Drivers by points: if/else 23, boolean chains 2, match/switch 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"699a4f570ee5174617f54968d7bf49aa8e5a9ee4fb1ad4e1862e12d139db05dd"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillManagerViewModel.saveSkillEdit (cognitive 23): SkillManagerViewModel.saveSkillEdit has cognitive complexity 23 (threshold 15). Drivers by points: if/else 21, boolean chains 1, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerViewModel.kt"},"region":{"startLine":744}}}],"partialFingerprints":{"codehealthFindingId/v1":"3580e0e292354bced3380ccd1fcc819190c7326dd06c338f03e1e2490f46abf9"}},{"ruleId":"D2","level":"warning","message":{"text":"ConfigKt.convertValueToTargetType (cognitive 22): ConfigKt.convertValueToTargetType has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, match/switch 9 (nesting depth added 10). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"4b445fa5486a26f8817ff850c1b95bc4a00e198a39d4033e71bc19ccb865c1c6"}},{"ruleId":"D2","level":"warning","message":{"text":"BenchmarkValueSeriesViewerKt.BenchmarkValueSeriesViewer (cognitive 21): BenchmarkValueSeriesViewerKt.BenchmarkValueSeriesViewer has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, loops 6, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkValueSeriesViewer.kt"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"c9aec314902fb47851efcb3795c5e5c236218aa098c86966bdd7cdffcb77e748"}},{"ruleId":"D2","level":"warning","message":{"text":"MessageBodyImageKt.MessageBodyImage (cognitive 21): MessageBodyImageKt.MessageBodyImage has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 5, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageBodyImage.kt"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"21250d1937506bcabb52fce61b16d3ceeca4639034f7bdd268be46484d29bae7"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillTesterBottomSheetKt.SkillTesterBottomSheet (cognitive 19): SkillTesterBottomSheetKt.SkillTesterBottomSheet has cognitive complexity 19 (threshold 15). Drivers by points: if/else 17, error handling 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillTesterBottomSheet.kt"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d4c994409bd360ccb6baf4325c68ac14a18f29bb47626aece6b7222a05e4ec4"}},{"ruleId":"D2","level":"warning","message":{"text":"ChatViewKt.ChatView (cognitive 19): ChatViewKt.ChatView has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 3, boolean chains 2, match/switch 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c416a5ebe05225ef83d595bbaf6aa4326d341a18ada1f695185e465736bd632"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeScreenKt.TaskList (cognitive 19): HomeScreenKt.TaskList has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 7, if/else 6, loops 6 (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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt"},"region":{"startLine":838}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a37d75d55ad3cd60dadd5b0c69585b1ecf0c28000b6e183efbad56d5a0d1205"}},{"ruleId":"D2","level":"warning","message":{"text":"AgentToolsImpl.runJs (cognitive 18): AgentToolsImpl.runJs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 15, boolean chains 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentTools.kt"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"e785cc4e6ea1d443d0fa03e930cec4d0cbfc90546a2e4941c466848a9151fa56"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelManagerViewModel.addImportedLlmModel (cognitive 18): ModelManagerViewModel.addImportedLlmModel has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":657}}}],"partialFingerprints":{"codehealthFindingId/v1":"ad76ee08a3186d12ded43d6965f09b1f0f3d1cadb23f25dde4464f1ca3bdecc2"}},{"ruleId":"D2","level":"warning","message":{"text":"IntentHandler.scheduleNotification (cognitive 17): IntentHandler.scheduleNotification has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/IntentHandler.kt"},"region":{"startLine":294}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1a4840cf2a7fe75eb31f85ce3e450ea8047b6fdc4a9da8f68613cea14efc4d4"}},{"ruleId":"D2","level":"warning","message":{"text":"GlobalModelManagerKt.GlobalModelManager (cognitive 17): GlobalModelManagerKt.GlobalModelManager has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt"},"region":{"startLine":112}}}],"partialFingerprints":{"codehealthFindingId/v1":"a75fd33130ff6b37badf8a13a3a84f6cd95bc1d53fefcde20bec26da4b09f6de"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelListKt.ModelList (cognitive 17): ModelListKt.ModelList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 16, boolean chains 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelList.kt"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e26345f1d89966db74e3bb216c563aa64f8cee3aa9b6d147077af524492b931"}},{"ruleId":"D2","level":"warning","message":{"text":"ModelManagerViewModel.createUiState (cognitive 17): ModelManagerViewModel.createUiState has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, loops 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":1143}}}],"partialFingerprints":{"codehealthFindingId/v1":"1342e335424dfe1191184b53dbd02a17dab5518706b6ed9c399fb886409750ef"}},{"ruleId":"D2","level":"warning","message":{"text":"SkillManagerViewModel.validateAndAddSkillFromLocalImport (cognitive 16): SkillManagerViewModel.validateAndAddSkillFromLocalImport has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, error handling 4, loops 2, boolean chains 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerViewModel.kt"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"0963f7de9a68ecd4a6f1f6d235026b4279c85dd95613fdc8e84ec41a48ffa1ab"}},{"ruleId":"D2","level":"warning","message":{"text":"HomeScreenKt.TaskCard (cognitive 16): HomeScreenKt.TaskCard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt"},"region":{"startLine":989}}}],"partialFingerprints":{"codehealthFindingId/v1":"49463fd96e572cc3da77eb1d987d23eb51ba66aabb6d03a0fa2493d05cf762d9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: modelmanager/ModelManagerViewModel.kt: FileTooLong \u2014 995 significant lines (blank, comment-only and punctuation-only lines excluded), about 86% of them inside a single declaration: systemPromptRepository (200-1521). 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c9e3b3b7dc7c725ca0c2d9bca33f98b140f96d3c1f51ab1c9adf256f2a9a808"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: ModelManagerViewModel: TooManyMethods \u2014 57 methods. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2ece553e156aa7507cdd6bbe3b59b01d3c0b16ac8647477e6850ed841586b3e"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: home/HomeScreen.kt: FileTooLong \u2014 824 significant lines (blank, comment-only and punctuation-only lines excluded). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bbcf1a15a264a28abef546b109c4d2d47d23ca9e371aa4872af2d33e0bef030"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: chat/MessageInputText.kt: FileTooLong \u2014 823 significant lines (blank, comment-only and punctuation-only lines excluded), about 69% of them inside a single declaration: val (144-987). 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageInputText.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"128b739d48a2f4694eae1b3ff63a2abfda964b0328ad5700cc08120818583411"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentchat/SkillManagerViewModel.kt: FileTooLong \u2014 809 significant lines (blank, comment-only and punctuation-only lines excluded), about 85% of them inside a single declaration: dataStoreRepository (139-1240). 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerViewModel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7543e3dbbfccb5acded3eb557ab324f597ddbf9e6e4c478993f4a505ed72a7c"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentchat/SkillManagerBottomSheet.kt: FileTooLong \u2014 748 significant lines (blank, comment-only and punctuation-only lines excluded). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2350117a4ab03b4deebebbfbe98528dfbc05670c40066969aa19edb286376ef3"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: benchmark/BenchmarkResultsViewer.kt: FileTooLong \u2014 717 significant lines (blank, comment-only and punctuation-only lines excluded). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkResultsViewer.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d80992412e37ae3dd171ab9b70296fec89ae526572bb759961f70177e4b46c1b"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: DefaultDataStoreRepository: TooManyMethods \u2014 40 methods. Most of these members implement data.DataStoreRepository (39 of 40 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DataStoreRepository.kt"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfb407d99e0f27486615f257214d8555c6cf7da318cb3a45168f93f78055210b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: agentchat/AgentChatScreen.kt: FileTooLong \u2014 600 significant lines (blank, comment-only and punctuation-only lines excluded), about 71% of them inside a single declaration: chatViewJavascriptInterface (120-710). 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42e603fee3fbf96aed4a6af8fc45ed559af170bbe22115c1f6e03a9254f59fe3"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: SkillManagerViewModel: TooManyMethods \u2014 32 methods. 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerViewModel.kt"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"ca78b516dffdb388ecb634cd007b096273a523e5d81f40c39abae658cea0cffd"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: mobileactions/MobileActionsScreen.kt: FileTooLong \u2014 528 significant lines (blank, comment-only and punctuation-only lines excluded). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d27e1211bd7dcc9073aea4387838abda50632b20847ac528429ef6a1ffa70cf9"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: chat/ChatPanel.kt: FileTooLong \u2014 510 significant lines (blank, comment-only and punctuation-only lines excluded), about 77% of them inside a single declaration: val (124-754). 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 \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ba7a2baabc2e9f0f356d0ca4022ad1937e7a81d041b86dc557d9b8a9a1c3ce8"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: tinygarden/TinyGardenScreen.kt: FileTooLong \u2014 509 significant lines (blank, comment-only and punctuation-only lines excluded). 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e73fe3225245db2cf7a03e5ccc0f782e0e959f548545e99d059bf1fc1df04df"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:240-261 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt:141-161 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:240\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff9f91e7e6d6ba388d729cc81e53e541592d7da5021411d5e01dae9c322d5bf8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:704-724 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt:692-713 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:704\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":704}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82ed1c7853be47135dd8d1e0b0cdb42fd8bad964544d059225b857be0082606"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:252-269 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:379-396 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:252\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3bac5ed9b1d6010a8fc8b4f70d4f3da4cefc0adeb9e3137414481dce73125d5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromLocalImportDialog.kt:148-164 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromUrlDialog.kt:158-174 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromLocalImportDialog.kt:148\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromLocalImportDialog.kt"},"region":{"startLine":148}}}],"partialFingerprints":{"codehealthFindingId/v1":"af45e2702d1086b565961c293d75ba2944386925ce4b87c10f082e6f91f2802a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:501-517 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:574-590 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:501\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt"},"region":{"startLine":501}}}],"partialFingerprints":{"codehealthFindingId/v1":"aca24a5308f6c26f011125a3bb922263839f87f4b0ee4a3766256cc4fc9ce7cb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatHistorySideSheet.kt:176-191 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/TextInputHistorySheet.kt:181-196 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatHistorySideSheet.kt:176\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatHistorySideSheet.kt"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"e8143268ec0b2def7301c024fadd083b08cafae387fd5cf810fec64084977334"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:286-300 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:408-422 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:286\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt"},"region":{"startLine":286}}}],"partialFingerprints":{"codehealthFindingId/v1":"b043ea9e06e4de7263085acb748a94c075ca0192890e0140be239abf0d6a35b2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/LlmSingleTurnScreen.kt:110-124 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/navigation/GalleryNavGraph.kt:553-567 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/LlmSingleTurnScreen.kt:110\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/LlmSingleTurnScreen.kt"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dea9f0907242558421aae23767c962f1de3e3afb4ee2d2ca2fa8ea4667d5cb5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt:117-130 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromUrlDialog.kt:91-104 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt:117\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"81beaff3795631ab40cfe17eb9e8f384dd800fc19ca2ce1332188bdc1dc4c91d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt:152-165 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:812-825 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt:152\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt"},"region":{"startLine":152}}}],"partialFingerprints":{"codehealthFindingId/v1":"7caccf7ae68ddb8ad905d57090b317f88824c093f258aafdc46eae748ed04af6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt:346-359 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt:423-436 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt:346\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d8e4beb639425f8e9725b142065cbe05ba492834b7d5385c7fa02e01c6d3b02"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:995-1008 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/notifications/NotificationsScreen.kt:311-324 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:995\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt"},"region":{"startLine":995}}}],"partialFingerprints":{"codehealthFindingId/v1":"5407bd6a3327612e2e1a8783f5a555c7cb1d80eba82276d0c74a08c398f9a5d8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:332-345 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt:469-482 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:332\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":332}}}],"partialFingerprints":{"codehealthFindingId/v1":"376af45ced5f6f11391f1ebb90e110f96e7db795aca01b81f42ea348964a709e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt:232-246 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt:344-357 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt:232\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce86b7f0169e6a3d3dca7c8b3fe6c07d690b852b2178ef1f524625404dcba637"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:217-230 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:301-314 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:217\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt"},"region":{"startLine":217}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ababcd2f20f52fccf247f42a375b2957c407c845c8570e7f0553a8429b6df8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt:246-260 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/notifications/NotificationsScreen.kt:123-136 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt:246\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"123cf2fa2d24497b387dd0958a996d65b2d5c68825c3b1bc82789dd426985314"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt:285-297 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromLocalImportDialog.kt:155-167 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromUrlDialog.kt:164-177 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt:285\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt"},"region":{"startLine":285}}}],"partialFingerprints":{"codehealthFindingId/v1":"0261c473b95cc6986eeb79408ec02fea5a24260ec6a274ab912786f7aca10668"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt:207-219 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:251-263 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:378-390 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt:207\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddSkillFromFeaturedListBottomSheet.kt"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"c43a28d24177d3e97fa05ae7a99871e9ebdbfaba8e8c81019bce4e9a507e8db4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 3): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:116-128 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:217-229 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:301-313 \u2014 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 \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt"},"region":{"startLine":116}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e817111ef5056676585b6ef454e7ea22ff2e09cbeb1752575faff4db9e885a4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:676-688 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/TinyGardenScreen.kt:647-659 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt:676\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/mobileactions/MobileActionsScreen.kt"},"region":{"startLine":676}}}],"partialFingerprints":{"codehealthFindingId/v1":"5ed052a2c17cb791b86cb57f33caedc2cb12dd5263dc5831ff3e2e4f275fbe1d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt:314-326 | Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt:387-399 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt:314\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt"},"region":{"startLine":314}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9c64ac26b6a7806f41392db7cf726805410cb21272b5925699817a92f890e18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DownloadRepository.kt:220-232 | Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DownloadRepository.kt:256-269 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DownloadRepository.kt:220\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/DownloadRepository.kt"},"region":{"startLine":220}}}],"partialFingerprints":{"codehealthFindingId/v1":"3f35b2e760d7633cd2624424459eeed9f07a25beb75af2a35e794b6e66f6715f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt:276-287 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt:344-355 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt:276\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt"},"region":{"startLine":276}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3d493175c3fe7ab36f9b56ce8c8671925a5709628b94c0b7a7be1684d68dbc6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/SmallFilledTonalButton.kt:60-70 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/SmallOutlinedButton.kt:61-71 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/SmallFilledTonalButton.kt:60\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/SmallFilledTonalButton.kt"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce9aecfaea96486bc3ae3afe0b4634022a63316f863917a2eea04ce18aa76411"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:193-203 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:404-413 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:193\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt"},"region":{"startLine":193}}}],"partialFingerprints":{"codehealthFindingId/v1":"996f05ca738793e5b662b54b9416d25075cf1b021460cc28da096ee3d3a52b2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:235-244 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/SkillManagerBottomSheet.kt:361-371 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:235\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt"},"region":{"startLine":235}}}],"partialFingerprints":{"codehealthFindingId/v1":"0cb3220c15c91734d65815241ec8cafbbc6ef33b4a9270cc55aa613ab8d2b63e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/ConversationHistoryPanel.kt:109-118 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt:368-377 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/ConversationHistoryPanel.kt:109\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/tinygarden/ConversationHistoryPanel.kt"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"05f9d55965b723e6156cd2cc606e03bac362d616af6ba4dfd22e51913e04b2c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ConfigDialog.kt:421-430 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/SettingsDialog.kt:287-296 \u2014 the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach \u2014 a location they all depend on today, or a new shared one if there is none \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ConfigDialog.kt:421\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ConfigDialog.kt"},"region":{"startLine":421}}}],"partialFingerprints":{"codehealthFindingId/v1":"79264495146f1ff6ec75f03626ec2553f22c6b05b62913303ee5d9d06448309b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/Utils.kt:376-385 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/Utils.kt:406-415 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/Utils.kt:376\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/Utils.kt"},"region":{"startLine":376}}}],"partialFingerprints":{"codehealthFindingId/v1":"399d0aafcc4ed623f4e9ce036e6b863d932f4a03ccad7ad726c613d64afe64ea"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt:460-469 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt:480-489 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt:460\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt"},"region":{"startLine":460}}}],"partialFingerprints":{"codehealthFindingId/v1":"5918531fef532479bcd1de6f47d031b7ffe32e37a2fdbc27a5ad72c8d86ebca6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/MainActivity.kt:76-85 | Android/src/app/src/main/java/com/google/ai/edge/gallery/MainActivity.kt:190-198 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/MainActivity.kt:76\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/MainActivity.kt"},"region":{"startLine":76}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a7319eff372839fd671ed473170aae158d3afb76593f99159de9a3fa54e0902"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:449-457 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpToolManagerBottomSheet.kt:158-166 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt:449\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt"},"region":{"startLine":449}}}],"partialFingerprints":{"codehealthFindingId/v1":"293c19ff219e04c0a3a75bd16f945a40f1d8dc17360243d69393df8f0af75daa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt:96-104 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt:186-194 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt:96\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt"},"region":{"startLine":96}}}],"partialFingerprints":{"codehealthFindingId/v1":"38c714e7601db876a263d9418e42679f1562dacbf00d8ebb03d08a245284eba7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatViewModel.kt:541-551 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatViewModel.kt:561-569 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatViewModel.kt:541\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatViewModel.kt"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"a39309e35cf2a8dc99adfeff5c5a5268c5a30906c508dd46faa5f2ec859b2e94"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt:182-190 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:129-137 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt:182\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"4e8ac2b5fc5d9f53b9864ad752926d5502ba9a3d467f598238183fe2da883066"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt:320-329 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt:344-352 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt:320\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"378c6a02f1727c80a01710181a8f53d4200a92ae08044f5e43a64874fb9ff8e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt:135-142 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt:183-190 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt:130-137 \u2014 there are 3 copies across 2 file(s) \u2014 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 \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt:135\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatScreen.kt"},"region":{"startLine":135}}}],"partialFingerprints":{"codehealthFindingId/v1":"4aab113db29e1761f2c16dd52f46223eca90978978ac317855b3561023034545"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt:306-313 | Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt:368-375 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt:306\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt"},"region":{"startLine":306}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a418c8b591a8c73a0852c70532c7ca16546838d664af72901219737bc58265f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/tos/AppTosDialog.kt:59-66 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/tos/GemmaTermsOfUseDialog.kt:65-72 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/tos/AppTosDialog.kt:59\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/tos/AppTosDialog.kt"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"94ff1955e8839b47a743065592a35d4590f49e27dc124d00e342c878768ccc2e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt:320-326 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelList.kt:350-358 \u2014 the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt:320\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 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 \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/GlobalModelManager.kt"},"region":{"startLine":320}}}],"partialFingerprints":{"codehealthFindingId/v1":"6a21fdf3263ddfc1b7488aff872c02854eace185266477713152b43cc0317cdd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt:90-95 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt:102-107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"66526e96fd9fd2037d73728c44fe0cb044e1e8856eae35eaf96a2dc24bdfaefc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatMessage.kt:222-226 | Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatMessage.kt:250-254 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatMessage.kt"},"region":{"startLine":222}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c968a1160a64ad9cca59f367517251f8739eaf3d2ca17859e8ede5fc03b1299"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"ruleId":"D9","level":"note","message":{"text":"No tests found: No test suite could be collected \u2014 nothing here references a test framework (JUnit (with Kotest or MockK on Kotlin)), so there were no discoverable tests to count. Tests written as plain executables or shell/PowerShell harnesses are not collectible this way and are not scored here."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"c9bf64cbb5a4ae13d6bcd01fa3bc8d2879d860c73bc67f176ee3c2cecb8adce3"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt changed 9 times in last 90 days, max complexity 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatPanel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"518ce80b83d9050115eb3df7f1aa70d10ff86106f39e8fe26ad0d807882e4089"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt changed 13 times in last 90 days, max complexity 33. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AgentChatScreen.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8f4301a02aeb1bae46ff1ea8cba03c46ea06a4ababa1c881045f1fa04b3e8c78"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt changed 8 times in last 90 days, max complexity 21. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/modelmanager/ModelManagerViewModel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2292ce7cd723e5ca919b0a6273b1716e597c2bea05ea44ea6c82c1fcb0ac5bc7"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ModelPageAppBar.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ModelPageAppBar.kt changed 5 times in last 90 days, max complexity 33. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/ModelPageAppBar.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"fd66ae47c022433cfb22ee097420aacd4641ce482dff7f7e4a53e9433dbd6f70"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt changed 8 times in last 90 days, max complexity 18. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/ChatView.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a82e13a180292da1121a86adc208e9e503ce26cb7899fa742af3bd655d0dabb6"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt changed 6 times in last 90 days, max complexity 23. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"35c300a286d180faee2f050c8c256a443ff31b3a4f5df2163166fe247b7afc00"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt changed 5 times in last 90 days, max complexity 27. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/home/HomeScreen.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"316fa13e24bbc8d4c33cf1a942a0bdec70b825465dcdd84004bfa8e08f5bec65"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/navigation/GalleryNavGraph.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/navigation/GalleryNavGraph.kt changed 4 times in last 90 days, max complexity 28. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/navigation/GalleryNavGraph.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"16c2711aec3c8100bb024d545219b6c0a003b097a9af7eca49bbe1b1b2a1fbd0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageInputText.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageInputText.kt changed 2 times in last 90 days, max complexity 50. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/common/chat/MessageInputText.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"12fc15d9d464c1a177ddcdd73c1464def06a29ea2660966a78ba1db745c63640"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt: Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt changed 3 times in last 90 days, max complexity 29. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/data/Config.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"575db97ebc4bbdc4b7fed256c4dfa32279118c74b63b172064053e6ade5b1786"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 37 significant file(s) lose their only recent owner: Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/benchmark/BenchmarkResultsViewer.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddOrEditSkillBottomSheet.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/PromptTemplatesPanel.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerBottomSheet.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpManagerViewModel.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/AddMcpServerFromUrlDialog.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/theme/Theme.kt, Android/src/app/src/main/java/com/google/ai/edge/gallery/customtasks/agentchat/McpToolManagerBottomSheet.kt (\u002B29 more). Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"b47ec27510466953fa325045fe75f06961c22ac2d4b7c622846e2bf5e95ad575"}},{"ruleId":"D16","level":"note","message":{"text":"Further sole-owners (lower concentration): 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold \u2014 folded into the bus-factor score and metrics (43 single-owned of 153 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #2 (2 file(s)), anonymized user #3 (2 file(s)), anonymized user #4 (2 file(s)) \u2014 spread or document their files in the same way, at lower priority than the named off-boarding risks above."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6eac528f2429e724e1a97ed868f79eefbcf1888dab4af9a9e673429369bb5b2f"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ca55f1bfc82208de655386b81d82c64fcd6a563a5bbc1a818482957370f01137"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"bb7121d0d2be3f3d43a82fb77f5d74a8be59adf560fed19d03d8a4a042e6340d"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"b649bba64ad682b81a5e3259d153fcec06c2f5adacde1760f9fe872f08b4f79b"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"3ac9e814e23bfb1c1ca30addfc5987ac8eec17ff2c55eb9c6359bbcb109d50d5"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"30817c4b1e4bed24d3c6e20d5587099b98158dd720ed322faf6e0c8ba7c8edba"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"8267ae4affbc42f4bdf4faeb2b0448a0b5dd632bdaf352c6348045be8795ac4e"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"CWE-353","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"ca51831384ca26007fde9208ccbe4514e590786ba00acfbc9290ff5573bfe991"},"taxa":[{"id":"CWE-926","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: LlmChatViewModel.kt \u2194 LlmSingleTurnViewModel.kt: \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt\u0060 and \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmsingleturn/LlmSingleTurnViewModel.kt\u0060 change together 50% of the time (9 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well) with no explicit dependency \u2014 the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE \u2014 the registration is the link, and it is meant not to be an import \u2014 and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatViewModel.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ba39a49e2278014e9abf2f320a73c55ce5c37a72e55331b5968d9c1a2a2861"}},{"ruleId":"D35","level":"warning","message":{"text":"Change coupling: LlmChatModelHelper.kt \u2194 LlmChatTaskModule.kt: \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt\u0060 and \u0060Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatTaskModule.kt\u0060 change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package \u2014 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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Android/src/app/src/main/java/com/google/ai/edge/gallery/ui/llmchat/LlmChatModelHelper.kt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a0bb0144bed720a20de80da742f59ab8d6542f7cbf9006e0095b8f638b8d363d"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1b213f6eedd4b140d0bc37bdf1496f72811a643f34064f12518b32e9e83bcfc7"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0e17f71490e4d120a48b2b2881ab866c93b272bef2febb673a3e8e42b2c288ab"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"90f83b4fa27db32740afe9540c905f3c0499caed87f61049a8a903ecc95b41c3"}},{"ruleId":"D36","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"0752d0df7434000fcabf1048e2de30a7a1a8b982b3db9a19898c4dec199856b4"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-353","guid":"09d7e902-d4ee-f05d-ae6c-0a1554d0c18f","name":"CWE-353","shortDescription":{"text":"CWE-353"},"helpUri":"https://cwe.mitre.org/data/definitions/353.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Command Injection","shortDescription":{"text":"Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"OS Command Injection","shortDescription":{"text":"OS Command Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Cross-site Scripting (XSS)","shortDescription":{"text":"Cross-site Scripting (XSS)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"SQL Injection","shortDescription":{"text":"SQL Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-926","guid":"0d9b5579-5549-555a-8a97-f9cc14f3ad4a","name":"CWE-926","shortDescription":{"text":"CWE-926"},"helpUri":"https://cwe.mitre.org/data/definitions/926.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Code Injection","shortDescription":{"text":"Code Injection"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":12,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}