{"$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":"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":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"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"}]}},"results":[{"ruleId":"D2","level":"warning","message":{"text":"AutoSize.autoConvertDensity (cognitive 21): AutoSize.autoConvertDensity has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11, ternaries 10 (nesting depth added 5). 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, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"2990b2e13b0277716a0102dee44fada6abc527c9e9346f1ca8190a3f7055a849"}},{"ruleId":"D2","level":"warning","message":{"text":"AutoSizeCompat.autoConvertDensity (cognitive 19): AutoSizeCompat.autoConvertDensity has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, ternaries 8 (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":"autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java"},"region":{"startLine":137}}}],"partialFingerprints":{"codehealthFindingId/v1":"1178970becad16d8be1d5d102a6ea879ae7d8034a73c91a4b878f6c95b842279"}},{"ruleId":"D3","level":"warning","message":{"text":"TooManyMethods: AutoSizeConfig: TooManyMethods \u2014 46 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":"autosize/src/main/java/me/jessyan/autosize/AutoSizeConfig.java"},"region":{"startLine":46}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbdd43670920993c3a98b904f71a838a35e8fce1f8edd5814302ad7f1d287129"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/BaseApplication.java:50-87 | demo/src/main/java/me/jessyan/autosize/demo/BaseApplication.java:54-93 \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 \u0060demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/BaseApplication.java:50\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":"demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/BaseApplication.java"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae001c1e2ac38633a4b9bc477682d916443e589a9ef501f54e1a8295301bd4b8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): autosize/src/main/java/me/jessyan/autosize/AutoSize.java:324-337 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:270-283 \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 \u0060autosize/src/main/java/me/jessyan/autosize/AutoSize.java:324\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":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":324}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f6ba81d3b57c7b624ee4c887c6cbebd48e1cb909014d4f7b7f407c2063151e3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): autosize/src/main/java/me/jessyan/autosize/AutoSize.java:191-202 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:152-163 \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 \u0060autosize/src/main/java/me/jessyan/autosize/AutoSize.java:191\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":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":191}}}],"partialFingerprints":{"codehealthFindingId/v1":"98c37bef5eec100943d41216a5ca1d09283570517d50ef2f7b644cc6c29a2559"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): autosize/src/main/java/me/jessyan/autosize/AutoSize.java:252-263 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:208-219 \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 \u0060autosize/src/main/java/me/jessyan/autosize/AutoSize.java: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":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"8ee2b7ca5c3cfe05a70a0f9af800296aa36b8dd20842ff760da77c865b97b6cf"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 4): autosize/src/main/java/me/jessyan/autosize/AutoSize.java:110-120 | autosize/src/main/java/me/jessyan/autosize/AutoSize.java:131-141 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:71-81 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:92-102 \u2014 there are 4 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 4 sites; resolving a subset leaves the remainder to drift apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":110}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dad463ac7552f652d6b9c1fc36785c1ccde2ccd32035e26e019a48d92873a10"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/CustomFragment1.java:65-73 | demo/src/main/java/me/jessyan/autosize/demo/CustomFragment1.java:65-73 \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 \u0060demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/CustomFragment1.java:65\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/CustomFragment1.java"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e0a5ec2f220e6991e8482587ea4688b3ee277f4842f6afc085e9cffa3fbf0ec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): autosize/src/main/java/me/jessyan/autosize/AutoSize.java:377-384 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:323-330 \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 \u0060autosize/src/main/java/me/jessyan/autosize/AutoSize.java:377\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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"f13bc1da41a2ca23ed3b159d43a08641a8b8d6ed71ee58093948880d9664ee70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): autosize/src/main/java/me/jessyan/autosize/AutoSize.java:296-302 | autosize/src/main/java/me/jessyan/autosize/AutoSizeCompat.java:242-248 \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 \u0060autosize/src/main/java/me/jessyan/autosize/AutoSize.java:296\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":"autosize/src/main/java/me/jessyan/autosize/AutoSize.java"},"region":{"startLine":296}}}],"partialFingerprints":{"codehealthFindingId/v1":"f617e4579e329a40ea7818828d31a370f85961abb71d1a04dc77d0c770bfd491"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): autosize/src/main/java/me/jessyan/autosize/utils/Preconditions.java:121-125 | autosize/src/main/java/me/jessyan/autosize/utils/Preconditions.java:143-147 \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 \u0060autosize/src/main/java/me/jessyan/autosize/utils/Preconditions.java:121\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":"autosize/src/main/java/me/jessyan/autosize/utils/Preconditions.java"},"region":{"startLine":121}}}],"partialFingerprints":{"codehealthFindingId/v1":"12f2afd7f9682d11d21997ae1e4f65767bbeb27fff6dd06173a21dbd2d918e52"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/FragmentHost.java:35-39 | demo/src/main/java/me/jessyan/autosize/demo/FragmentHost.java:35-39 \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 \u0060demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/FragmentHost.java:35\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":"demo-androidx/src/main/java/me/jessyan/autosize/demo/androidx/FragmentHost.java"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"48f068f67ead9590d7c16de4cf805b82d4e900c158af7c03cac40e11487bfb16"}},{"ruleId":"D16","level":"warning","message":{"text":"dormant codebase \u2014 no living knowledge left to concentrate: All 2 significant source file(s) were last meaningfully changed so long ago that no living knowledge remains \u2014 nothing since has been substantial enough to re-establish ownership (a broad, mechanical sweep that touches many files shallowly does not count, and neither does no activity at all). There is no concentration to measure, so the bus factor is not scored. This is not a clean bill: nobody currently holds working knowledge of this code (see D34 Knowledge Freshness)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"569d55ea5cb0330f13c125b289d07e5abdfcceac947a2c2645277937942e7d5f"}},{"ruleId":"D34","level":"error","message":{"text":"Orphaned knowledge: No living knowledge remains for this large file \u2014 its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"autosize/src/main/java/me/jessyan/autosize/AutoSizeConfig.java"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"81e6bef6babf14194b5e02dd61166eb48a52ace0285a9e7864ab90e2e591c690"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 17 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than listed individually (18 orphaned of 18 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)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}}],"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-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-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-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":0,"secretScannerRunsExcluded":0}}}]}