{"$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":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"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"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"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":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"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"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"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"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D31","name":"IaC \u0026 Container Security","shortDescription":{"text":"IaC \u0026 Container Security"},"helpUri":"https://codehealth.canine.dev/dimensions/D31","relationships":[{"target":{"id":"CWE-1032","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-732","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-16","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1032","CWE-732","CWE-16"],"owasp":"A02:2025"}},{"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":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AXB2","name":"Runtime readiness","shortDescription":{"text":"Runtime readiness"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB2"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X4","name":"Structured logging","shortDescription":{"text":"Structured logging"},"helpUri":"https://codehealth.canine.dev/dimensions/X4"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"train.train (cyclomatic 40): train.train has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent 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":"trainer/train.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"a606aeb766192f66dae136ffc945b3cbaedb25b7d09128345b1c3d01859849a7"}},{"ruleId":"D1","level":"warning","message":{"text":"Reader.__init__ (cyclomatic 38): Reader.__init__ has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/easyocr.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"c14dab3b76a2861cf6fa7da4e370728b7974a3a62b8a153fe3f5d3697a334b19"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.train (cyclomatic 34): Trainer.train has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train_distributed.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"f2aa929327c80e750708ab4f3baf968e8e0eea9a98d8d20cef77a44183f220a3"}},{"ruleId":"D1","level":"warning","message":{"text":"craft_utils.getPoly_core (cyclomatic 33): craft_utils.getPoly_core 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":"easyocr/craft_utils.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"a36d8eb000308e8c346b4b9f9b7351c87895beb55195abc61f588c819a3cffb0"}},{"ruleId":"D1","level":"warning","message":{"text":"craft_utils.getPoly_core (cyclomatic 33): craft_utils.getPoly_core 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":"trainer/craft/utils/craft_utils.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"110c8c3a734c20dfdd66fe719e5e6209662b08e8ca931ec329523fb9e0ba6ee3"}},{"ruleId":"D1","level":"warning","message":{"text":"DetectionIoUEvaluator.evaluate_image (cyclomatic 29): DetectionIoUEvaluator.evaluate_image has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/metrics/eval_det_iou.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"a4eaeb984e7b425b09c8abecff6231d8531806a696cbddeb369c550be7f9061c"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.train (cyclomatic 29): Trainer.train has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"ae8b66f2efd14900d5f6f1305d4275ed17abe141522569950b5a3539da0ae2f9"}},{"ruleId":"D1","level":"warning","message":{"text":"Trainer.train (cyclomatic 27): Trainer.train 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":"trainer/craft/trainSynth.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ef92df3c074c79ffb2e2bae400b01c121399cd5c068acb7d0d0ecec32a8307"}},{"ruleId":"D1","level":"warning","message":{"text":"Reader.recognize (cyclomatic 25): Reader.recognize has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/easyocr.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"433775c207b306e184487f4f644be1c9b422f1348739ff21c4b643be07489dca"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.get_paragraph (cyclomatic 24): utils.get_paragraph 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":"easyocr/utils.py"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"220c4da9c27ab4913f8683588e31b80d751174e8e7df2cd49880cfc6e006ce87"}},{"ruleId":"D1","level":"warning","message":{"text":"utils.group_text_box (cyclomatic 16): utils.group_text_box has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"f5114062983002a38a2e94fd38b77e0e9d96602044ac802242899f0a3521d506"}},{"ruleId":"D1","level":"warning","message":{"text":"eval.main_eval (cyclomatic 16): eval.main_eval has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"37fabbfaddd061ec0addcedd52fb4378eb3c6016a5c5287bb0a78e183642727a"}},{"ruleId":"D2","level":"warning","message":{"text":"train.train (cognitive 83): train.train has cognitive complexity 83 (threshold 15). Drivers by points: if/else 33 (61 pts), loops 8 (15 pts), error handling 3 (6 pts), boolean chains 1 (nesting depth added 38). To reduce it, split the body into named stages: move each independent 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":"trainer/train.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"80aa7e1dbd42fc070ad601e6faa24b01870ac71e88587ebc06f4766b82326aab"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.train (cognitive 77): Trainer.train has cognitive complexity 77 (threshold 15). Drivers by points: if/else 30 (57 pts), loops 4 (14 pts), boolean chains 6 (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":"trainer/craft/train_distributed.py"},"region":{"startLine":141}}}],"partialFingerprints":{"codehealthFindingId/v1":"35b64bd65fdbee61575be2bb0fd9e83d8f808097f0f4507dc63283187e4719b6"}},{"ruleId":"D2","level":"warning","message":{"text":"craft_utils.getPoly_core (cognitive 71): craft_utils.getPoly_core has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 7 (13 pts), boolean chains 7, error handling 1 (2 pts) (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":"easyocr/craft_utils.py"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"38ed01d6e8faa7d46bdbe48442610bba16ce5918a435f3f6b4153e72aad0b839"}},{"ruleId":"D2","level":"warning","message":{"text":"craft_utils.getPoly_core (cognitive 71): craft_utils.getPoly_core has cognitive complexity 71 (threshold 15). Drivers by points: if/else 17 (49 pts), loops 7 (13 pts), boolean chains 7, error handling 1 (2 pts) (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":"trainer/craft/utils/craft_utils.py"},"region":{"startLine":91}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdedcadf1247d6c009fc3a85e43d09a153356bfac8ef2f388761667714497d88"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.train (cognitive 63): Trainer.train has cognitive complexity 63 (threshold 15). Drivers by points: if/else 19 (43 pts), loops 4 (14 pts), boolean chains 6 (nesting depth added 34). To reduce it, split the body into named stages: move each independent 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":"trainer/craft/trainSynth.py"},"region":{"startLine":117}}}],"partialFingerprints":{"codehealthFindingId/v1":"57ec4593955309eff44fb50a24eb5b20f3fd588e5cb14cc43a46f5bd7b227731"}},{"ruleId":"D2","level":"warning","message":{"text":"Trainer.train (cognitive 58): Trainer.train has cognitive complexity 58 (threshold 15). Drivers by points: if/else 28 (50 pts), boolean chains 5, loops 2 (3 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":138}}}],"partialFingerprints":{"codehealthFindingId/v1":"d341775473395895639a6647eeade7fd1a8680e9fac233da623db6f8483bfcd5"}},{"ruleId":"D2","level":"warning","message":{"text":"DetectionIoUEvaluator.evaluate_image (cognitive 57): DetectionIoUEvaluator.evaluate_image has cognitive complexity 57 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 7 (15 pts), ternaries 7 (12 pts), boolean chains 4, error handling 1 (2 pts) (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/metrics/eval_det_iou.py"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"11874391f617187e20ddf9222902ff26e07a03346954f75774ec9765c5f916f4"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.get_paragraph (cognitive 55): utils.get_paragraph has cognitive complexity 55 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 7 (16 pts), boolean chains 3 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":643}}}],"partialFingerprints":{"codehealthFindingId/v1":"581f7dea081c5ce32cee083ba45201a3acc8f4001a6369031b85f240464a5dd0"}},{"ruleId":"D2","level":"warning","message":{"text":"Reader.__init__ (cognitive 46): Reader.__init__ has cognitive complexity 46 (threshold 15). Drivers by points: if/else 25 (45 pts), loops 1 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/easyocr.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"92db0d6f94171bb59291f87c079f54b0e4f3e6523278360d8bdb20ab02a2a681"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.group_text_box (cognitive 33): utils.group_text_box has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 5 (9 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b9da81cde9cdca6a42d72f3fa1c4be6b6c0fa8167c6151240aee4b9538ba875"}},{"ruleId":"D2","level":"warning","message":{"text":"Reader.recognize (cognitive 31): Reader.recognize has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16 (20 pts), loops 3 (6 pts), boolean chains 5 (nesting depth added 7). 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":"easyocr/easyocr.py"},"region":{"startLine":353}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c7a9d7630914f5b74b920274b2ece93668852c7830c32476c28e20fd1a55ec3"}},{"ruleId":"D2","level":"warning","message":{"text":"InstanceDiceLoss.forward (cognitive 29): InstanceDiceLoss.forward has cognitive complexity 29 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/dice_loss.py"},"region":{"startLine":131}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe9cf5252751c4f2a882077d3c804e8d3cb59eb06d6be9384f766792ba26ca46"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.ctcBeamSearch (cognitive 27): utils.ctcBeamSearch has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"cbfd9e368d0ef172463432ea0bcf8a94fad85116da01f3a71e38c3caebe46b4a"}},{"ruleId":"D2","level":"warning","message":{"text":"eval.main_eval (cognitive 27): eval.main_eval has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":227}}}],"partialFingerprints":{"codehealthFindingId/v1":"955c6838e38fc0e1682e5c1a31c991549df17a56d04d1909b9ddd41359f7f5cc"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.ctcBeamSearch (cognitive 24): utils.ctcBeamSearch has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/utils.py"},"region":{"startLine":74}}}],"partialFingerprints":{"codehealthFindingId/v1":"532687a534cd24f70921b187bca4c8f0462d0cf9d555388da4425353e4ecb8e7"}},{"ruleId":"D2","level":"warning","message":{"text":"CTCLabelConverter.decode_wordbeamsearch (cognitive 23): CTCLabelConverter.decode_wordbeamsearch has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (7 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":352}}}],"partialFingerprints":{"codehealthFindingId/v1":"685c0301ab1554845aa3db258057b8b1300e43d7449580f4598b8d111bf260a1"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.word_segmentation (cognitive 21): utils.word_segmentation has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/utils.py"},"region":{"startLine":176}}}],"partialFingerprints":{"codehealthFindingId/v1":"e1d25bdae1cfaa7a43930a3eaa33bd6caa71a8c2cd29a76eee530d5b445146d9"}},{"ruleId":"D2","level":"warning","message":{"text":"ModulatedDeformRoIPoolingPack.__init__ (cognitive 20): ModulatedDeformRoIPoolingPack.__init__ has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 2 (4 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"e171a132b7c01f5f5ac5b6996055854ca1c494875a2976c0b20ae2d99de4996d"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.word_segmentation (cognitive 20): utils.word_segmentation has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"088482e1da18e4ebf53c330e2dce54edaed9e1a5e065b1486283daa44cb81a5a"}},{"ruleId":"D2","level":"warning","message":{"text":"utils.merge_to_free (cognitive 19): utils.merge_to_free has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"57b770be8223b14b3c927c591daebc4cbc31b117018049b845e8478a4701fa52"}},{"ruleId":"D2","level":"warning","message":{"text":"craft_utils.getDetBoxes_core (cognitive 18): craft_utils.getDetBoxes_core has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f69460a09f6193542498e41f9b4994472c655c99990785d74fa8e1a72dfcb2d"}},{"ruleId":"D2","level":"warning","message":{"text":"Reader.readtextlang (cognitive 17): Reader.readtextlang has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (11 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/easyocr.py"},"region":{"startLine":476}}}],"partialFingerprints":{"codehealthFindingId/v1":"6b97eed112a02e6cba66fcef7bb9cdfa512861cbcf4c6e9687c9d5533f5e7d2e"}},{"ruleId":"D2","level":"warning","message":{"text":"DBNet.polygons_from_bitmap (cognitive 16): DBNet.polygons_from_bitmap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/DBNet.py"},"region":{"startLine":448}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ae3837c648202ec861c0c791ffb7c056fdcd671a3b2b4da02f056f8e4ee3481"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: easyocr/utils.py: FileTooLong \u2014 592 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 92 over it, 1.18\u00D7 the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"929f3d89a67b1fd6654a947a4ffaa86d850ae723c8dbcc7934b3817f23da87a0"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 133 shared lines): trainer/craft/train.py:140-419 | trainer/craft/trainSynth.py:118-331 | trainer/craft/train_distributed.py:143-436 \u2014 These 3 members are variants of one another: a block of 133 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d2c45bfdc5b79d631cac660e06bb3bc7fb0b54b40b0c0edb1985defa32b9e0f"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 32 shared lines): trainer/craft/train.py:423-475 | trainer/craft/trainSynth.py:335-379 | trainer/craft/train_distributed.py:439-490 \u2014 These 3 members are variants of one another: a block of 32 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"0e4542d7619681b8863c9c7a7597be7987c858a53353d64201a4c093312afb30"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (65 shared lines): easyocr/utils.py:182-270 | trainer/utils.py:75-165 \u2014 These two members are variants of one another: 65 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members\u0027 grain \u2014 factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2824b44261c796d9244673c45e50a92da9eaea29256ae729fe8290383501fec"}},{"ruleId":"D4","level":"warning","message":{"text":"Members sharing a duplicated core (5 members, 50\u002B identical tokens): trainer/craft/train.py:34-58 | trainer/craft/train.py:62-81 | trainer/craft/trainSynth.py:35-62 | trainer/craft/train_distributed.py:34-61 | trainer/craft/train_distributed.py:65-84 \u2014 These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below \u2014 it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members\u0027 grain \u2014 factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"e607c01a75a3f779d0e97e1e4cbd73a79b68192e949daeb1502ab02454ae7c11"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (63 corresponding lines): easyocr/craft_utils.py:22-85 | trainer/craft/utils/craft_utils.py:27-89 \u2014 These two members are one piece of code written twice and then edited apart: 63 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6ef0ddef9e8c40ecfd14b638120961484be90cfae268a6793586a62504b9307"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (59 corresponding lines): easyocr/DBNet/decoders/seg_detector.py:13-71 | easyocr/DBNet/decoders/seg_detector_asf.py:15-82 \u2014 These two members are one piece of code written twice and then edited apart: 59 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":13}}}],"partialFingerprints":{"codehealthFindingId/v1":"c67fa75d4de71d29933f26435b7993972365052519f34722d6cfa0eb4797b6af"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): trainer/craft/utils/inference_boxes.py:208-249 | trainer/craft/utils/inference_boxes.py:255-302 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/utils/inference_boxes.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7a08275921d85e7bb933af35fbe512bf350f58edfd8975ee63426661d2f378c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): trainer/craft/eval.py:28-66 | trainer/craft/eval.py:110-148 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cda80860ce65fb216517d247a501f13703b04ed4d04c54886d5efa1daea67aa"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (25 corresponding lines): easyocr/craft.py:32-56 | trainer/craft/model/craft.py:32-58 \u2014 These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"7b50294dd59834103676641b1af441915d0568f883513af4ee4a3afb8101faad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (29 corresponding lines): easyocr/utils.py:29-57 | trainer/utils.py:177-205 \u2014 These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":29}}}],"partialFingerprints":{"codehealthFindingId/v1":"dc7337fc2c4fc649cc1c9afa5d84ac04f709a0fdb00f02152344f302eb693a1f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (32 corresponding lines): easyocr/DBNet/decoders/seg_detector.py:118-149 | easyocr/DBNet/decoders/seg_detector_asf.py:129-160 \u2014 These two members are one piece of code written twice and then edited apart: 32 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"f3ed24dfcb5ff06f4065cbb52efa6c7756be542409c69c11f1de0a400a1ce4e2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (39 corresponding lines): easyocr/DBNet/backbones/resnet.py:35-74 | easyocr/DBNet/backbones/resnet.py:109-147 \u2014 These two members are one piece of code written twice and then edited apart: 39 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":35}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f4596c79f6473ed7660b01ae43e0e768904b88c20b1f30ba2099e343ec4ec90"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (42 corresponding lines): trainer/craft/data/imgaug.py:20-61 | trainer/craft/data/imgaug.py:67-116 \u2014 These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/data/imgaug.py"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"f1b73cd353bab44a808e3d73c5a2345343b582b3111e354388e9e09ad4f0d4f2"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (20 corresponding lines): easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:73-92 | easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:151-172 \u2014 These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"ba35b8b4e633d981529991fd64d5e43ed10d05eec69effd332428c040d050fe9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (27 corresponding lines): easyocr/recognition.py:71-97 | trainer/dataset.py:235-270 \u2014 These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":71}}}],"partialFingerprints":{"codehealthFindingId/v1":"a910f086b5260db055f1dcc2b0cd3baca4e39959b1a335641b476b5b6aab7f3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (28 corresponding lines): easyocr/imgproc.py:38-65 | trainer/craft/data/imgproc.py:55-85 \u2014 These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":38}}}],"partialFingerprints":{"codehealthFindingId/v1":"de742de4460aa013cb83d1d78191a2f8d443255fd774951d94c87fbdc067650e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (26 corresponding lines): easyocr/DBNet/backbones/resnet.py:77-102 | easyocr/DBNet/backbones/resnet.py:150-179 \u2014 These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"c2cc1c13e2556f9725171af8969de8e7e68d282d599759f1b1296f9d1b78fe2c"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): easyocr/utils.py:89-108 | trainer/utils.py:40-57 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"19e26f22f909931294f79660dbdf8c119baf7a242bca2743d14a15b77ce3ba70"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (23 corresponding lines): trainer/craft/trainSynth.py:384-406 | trainer/craft/train_distributed.py:495-520 \u2014 These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/trainSynth.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"c726798d381b9fb53fe9081ef4d8120a835f41afa6e7093dbbe39519f806d1ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copies of one member (3 members, 17\u002B corresponding lines): easyocr/DBNet/decoders/simple_detection.py:98-115 | easyocr/DBNet/decoders/simple_detection.py:136-153 | easyocr/DBNet/decoders/simple_detection.py:175-191 \u2014 These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/simple_detection.py"},"region":{"startLine":98}}}],"partialFingerprints":{"codehealthFindingId/v1":"f28fb48a20e087ad358ae565e2e0d4888948fea7f976497a674b1bb1d9e1f463"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (18 corresponding lines): trainer/craft/loss/mseloss.py:78-95 | trainer/craft/loss/mseloss.py:154-172 \u2014 These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/loss/mseloss.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"08138714701ba809299b0e412c93939bd9abef0d76720bcf8edcc02a20b02489"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (14 corresponding lines): easyocr/model/model.py:7-20 | easyocr/model/vgg_model.py:7-20 \u2014 These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/model.py"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"4140adcf798817d9852a410f4ad40eba1b0d3fc4ca38d751c33d0a9da95a16be"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): easyocr/recognition.py:22-28 | trainer/dataset.py:22-28 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"bd8b6cd64f7d3975a35f29c2641e1420fceb5a24f8a9035fcc65e9def130a36a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (5 corresponding lines): easyocr/imgproc.py:22-26 | trainer/craft/data/imgproc.py:30-39 \u2014 These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"0935c316a187f4ed2bb38b3827cb0a262c008099a38cf141e2a96a9e8be389ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py:62-72 | easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py:134-144 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"e5a9542ee72f2018c39e45b8ecc4a78b0948cefa2a7c8fa6bbda2fb05c4d77ca"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (7 corresponding lines): easyocr/imgproc.py:12-18 | trainer/craft/data/imgproc.py:14-23 \u2014 These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":12}}}],"partialFingerprints":{"codehealthFindingId/v1":"bf04206eec1fee33cc156a6ca95c19177e3bf67d11f9952f720e3aa6b28ea7e0"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (13 corresponding lines): easyocr/DBNet/backbones/resnet.py:263-275 | easyocr/DBNet/backbones/resnet.py:303-316 \u2014 These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":263}}}],"partialFingerprints":{"codehealthFindingId/v1":"154045c66a9f6b85b6581b9327e10a640525d5acb8805aee3be250fe84f89ac9"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (11 corresponding lines): easyocr/model/modules.py:68-80 | trainer/craft/model/vgg16_bn.py:67-77 \u2014 These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70a9df73904975734335a548476a9b0cc1ef8dbc111b87520d70e337d56e9e8"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): easyocr/utils.py:77-80 | trainer/utils.py:28-31 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"51cdd13c0f535728435f325763aad6027794423bc4486cdb90027a16640e160b"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): easyocr/utils.py:83-86 | trainer/utils.py:34-37 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"019cd118214eae9a1eda42194f5f098f1483860a2f47238e11e3ae34b174659a"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (2 corresponding lines): easyocr/craft_utils.py:15-16 | trainer/craft/utils/craft_utils.py:17-18 \u2014 These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"7801ce85be9972eea741f79b93cff1a58722d0b3f61bbe1e99d3ab5b529492f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (8 corresponding lines): easyocr/craft_utils.py:234-243 | trainer/craft/utils/craft_utils.py:238-245 \u2014 These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":234}}}],"partialFingerprints":{"codehealthFindingId/v1":"121594c2e9a56dd997f214f87cb5f8a64a405907423ba13e187fc69df96e03d3"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): easyocr/model/modules.py:85-87 | trainer/modules/sequence_modeling.py:7-9 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ff42b8b8ef185b7320917f19e8097a5093d1f910b31a7ca5658032a57a0242f"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): easyocr/imgproc.py:68-70 | trainer/craft/data/imgproc.py:89-91 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"89f2c9a9ec59fb061abf51c372bd0c7332acc959a2232b89d403b3c648235a4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (3 corresponding lines): easyocr/recognition.py:17-19 | trainer/dataset.py:17-19 \u2014 These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"5add951bda2233413ffbee56c295893b2c2307103bc0a020650c844c7582a984"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (4 corresponding lines): easyocr/recognition.py:33-36 | trainer/dataset.py:209-212 \u2014 These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":33}}}],"partialFingerprints":{"codehealthFindingId/v1":"632dfd54c07f28906c3c7bbac67285c6e435299305c3f3f58051852d79d343d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (2 corresponding lines): easyocr/model/modules.py:130-131 | trainer/modules/feature_extraction.py:58-59 \u2014 These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":130}}}],"partialFingerprints":{"codehealthFindingId/v1":"afd8e43068c89337188ba79e5b2576e1e42cbff71a6f46ef7e1d270b573aa096"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (6 corresponding lines): easyocr/utils.py:63-69 | trainer/utils.py:15-20 \u2014 These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below \u2014 the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members\u0027 grain \u2014 factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":63}}}],"partialFingerprints":{"codehealthFindingId/v1":"8da0049036d8fcc9b69c4394d066de48af9cd09dd9acb92c911eaea9fd8ca824"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (143 lines \u00D7 2): easyocr/craft_utils.py:89-231 | trainer/craft/utils/craft_utils.py:93-235 \u2014 before extracting anything, compare \u0060easyocr/craft_utils.py\u0060 and \u0060trainer/craft/utils/craft_utils.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 203 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":89}}}],"partialFingerprints":{"codehealthFindingId/v1":"93de708ac14c096fb894e5a3ee8eed39c3108098e258aef717785e1b332e2d41"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (42 lines \u00D7 3): trainer/craft/train.py:287-328 | trainer/craft/trainSynth.py:197-238 | trainer/craft/train_distributed.py:298-339 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":287}}}],"partialFingerprints":{"codehealthFindingId/v1":"1eadf91dd67426ec738eef5ac52d492cf9a7e19f6807aaa2afda9e25621aa72c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (31\u201338 lines \u00D7 2): easyocr/utils.py:238-268 | trainer/utils.py:125-162 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":238}}}],"partialFingerprints":{"codehealthFindingId/v1":"733c075b8b7acb1c679d7a3c3d6a940482f74ad4b568893253cf3f08fafd8587"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201334 lines \u00D7 3): trainer/craft/train.py:200-232 | trainer/craft/trainSynth.py:139-172 | trainer/craft/train_distributed.py:210-242 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"a30c3d080e3dcbf6a8783f3833bce06e24d99c273e5e37e301a86dac89c01a01"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (34 lines \u00D7 2): easyocr/model/modules.py:231-264 | trainer/modules/feature_extraction.py:213-246 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/modules/feature_extraction.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":231}}}],"partialFingerprints":{"codehealthFindingId/v1":"4f99713b1936cd104586e82f3b0d24ce63bbc5cad4295a87edb3c4bb56ea94d4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32\u201334 lines \u00D7 2): trainer/craft/data/imgaug.py:30-61 | trainer/craft/data/imgaug.py:83-116 \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 \u0060trainer/craft/data/imgaug.py:83\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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/data/imgaug.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"decdbb4d0d5a8efa07a8947e46bbfbdf61b50fbfb6812c855a14c2a887d14e6a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 3): trainer/craft/train.py:423-454 | trainer/craft/trainSynth.py:335-366 | trainer/craft/train_distributed.py:439-470 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060trainer/craft/train_distributed.py:474\u0060 calls \u0060device_count\u0060 and \u0060trainer/craft/train.py:457\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":423}}}],"partialFingerprints":{"codehealthFindingId/v1":"2afeb50378f25f101dc28d768dba6a7566a9de611f48544d91a15711c028ac56"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (32 lines \u00D7 2): trainer/craft/train.py:368-399 | trainer/craft/train_distributed.py:384-415 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060trainer/craft/train.py:368\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":"trainer/craft/train.py"},"region":{"startLine":368}}}],"partialFingerprints":{"codehealthFindingId/v1":"4a85dbdda776151f0fb65bea8fae0cbc45b12be78f93afe74d042848c8c0eb51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (26\u201329 lines \u00D7 2): easyocr/utils.py:182-207 | trainer/utils.py:78-106 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060easyocr/utils.py:212\u0060 calls \u0060simplify_label\u0060 and \u0060trainer/utils.py:109\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":182}}}],"partialFingerprints":{"codehealthFindingId/v1":"414f23a1dbd29638d7f4564084e7f2beb6720224e50c8fd4f83cee2314046b50"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (28 lines \u00D7 2): trainer/craft/train.py:109-136 | trainer/craft/train_distributed.py:112-139 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060trainer/craft/train_distributed.py:144\u0060 calls \u0060device_count\u0060 and \u0060trainer/craft/train.py:144\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":109}}}],"partialFingerprints":{"codehealthFindingId/v1":"5408036a6484f9c41863ba4adca273c964f7b03cc8604dea83596fdc168d3eba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (24\u201325 lines \u00D7 2): easyocr/craft_utils.py:22-45 | trainer/craft/utils/craft_utils.py:27-51 \u2014 before extracting anything, compare \u0060easyocr/craft_utils.py\u0060 and \u0060trainer/craft/utils/craft_utils.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 203 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"e63762e38d2dfaca7315e3d01b546b013f0b4b4535104ea9acc079c99383f712"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201324 lines \u00D7 2): easyocr/DBNet/backbones/resnet.py:47-70 | easyocr/DBNet/backbones/resnet.py:121-138 \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 \u0060easyocr/DBNet/backbones/resnet.py:47\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":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":47}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0e062a46995f031d86e31c21a7b10ce9654146461f72b699432c250433a721c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201323 lines \u00D7 3): trainer/craft/train.py:239-261 | trainer/craft/trainSynth.py:178-195 | trainer/craft/train_distributed.py:250-272 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060trainer/craft/train_distributed.py:249\u0060 calls \u0060set_epoch\u0060 and \u0060trainer/craft/train.py:238\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"eba38b79dd7cf4a4397c31cbf49050046dc5350d00d9247d9a9c75ba6eb60836"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): easyocr/easyocr.py:450-472 | easyocr/easyocr.py:486-508 \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":"easyocr/easyocr.py"},"region":{"startLine":450}}}],"partialFingerprints":{"codehealthFindingId/v1":"3a8dbbc00643c716937cb76b26b0db6686d0c5b694aabd448805bc4a457c56a9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): trainer/craft/trainSynth.py:268-290 | trainer/craft/train_distributed.py:371-393 \u2014 before extracting anything, compare \u0060trainer/craft/trainSynth.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060trainer/craft/trainSynth.py:268\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060trainer/craft/train_distributed.py:369\u0060 calls \u0060eval\u0060 and \u0060trainer/craft/trainSynth.py:265\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/trainSynth.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"1acde3aa5962f77ddea7798b90bebeefa0a71fdccd4ee86ee541d4e4263b2f51"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22\u201323 lines \u00D7 2): trainer/craft/utils/inference_boxes.py:208-229 | trainer/craft/utils/inference_boxes.py:255-277 \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":"trainer/craft/utils/inference_boxes.py"},"region":{"startLine":208}}}],"partialFingerprints":{"codehealthFindingId/v1":"970f441aa12cd5ef8148859db9424478c54da897b9940b67f9ce42ca8c6af7b7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18\u201322 lines \u00D7 5): trainer/craft/train.py:361-382 | trainer/craft/train.py:402-419 | trainer/craft/trainSynth.py:314-331 | trainer/craft/train_distributed.py:377-398 | trainer/craft/train_distributed.py:419-436 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d5930a31937dee147c4263c4ddc3d5e10b6315737def48238b2642a1d1b394b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20\u201322 lines \u00D7 3): trainer/craft/eval.py:28-49 | trainer/craft/eval.py:71-90 | trainer/craft/eval.py:110-131 \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":"trainer/craft/eval.py"},"region":{"startLine":28}}}],"partialFingerprints":{"codehealthFindingId/v1":"9eb79a6a5bfbd9f3e9b6e7a607c9eb0bf0ad8510426b7df3d9990783594ebf2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (41 lines \u00D7 2): easyocr/model/modules.py:25-65 | trainer/craft/model/vgg16_bn.py:24-64 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/craft/model/vgg16_bn.py\u0060 as WHOLE FILES: 97% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060easyocr/model/modules.py:25\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":"easyocr/model/modules.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfd2ba4a3857a8b2f0f745aac8eba24f973cd4a86344edaadf5a0c0ad3cf6951"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): easyocr/utils.py:32-52 | trainer/utils.py:179-199 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":32}}}],"partialFingerprints":{"codehealthFindingId/v1":"d08e8b2f4a74e6ba7b88a45116e1031dccda4e4e4d9d8b3fe857ca680fd0dd57"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201320 lines \u00D7 2): easyocr/utils.py:278-290 | trainer/utils.py:213-232 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":278}}}],"partialFingerprints":{"codehealthFindingId/v1":"169f1f2ce7df827ded9b080b7b6299183da3a3060520fdf4973d390113065372"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): trainer/craft/train.py:62-81 | trainer/craft/train_distributed.py:65-84 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ea4d0016c51516b245d3f358fe820d6fd0eb2aac3851b7d4d5ecc687750489"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (19 lines \u00D7 3): trainer/craft/train.py:360-378 | trainer/craft/trainSynth.py:273-291 | trainer/craft/train_distributed.py:376-394 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060trainer/craft/train.py:360\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":"trainer/craft/train.py"},"region":{"startLine":360}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ff803305eeeda743de0b9c04d65f4c3c4d7367462104198b1f70d7ad6a32d0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): easyocr/DBNet/backbones/resnet.py:77-94 | easyocr/DBNet/backbones/resnet.py:150-167 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060easyocr/DBNet/backbones/resnet.py:168\u0060 calls \u0060relu\u0060, \u0060conv3\u0060, \u0060bn3\u0060 and \u0060easyocr/DBNet/backbones/resnet.py:96\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":77}}}],"partialFingerprints":{"codehealthFindingId/v1":"2bda2f8feffd5c71d4e46adeacf59c492d7244434adce2bc16c4c4b5eb38ea1b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): trainer/craft/train.py:151-168 | trainer/craft/train_distributed.py:156-173 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"f554745e3ac9054d67e67cd08d9666d8242a3cc5e2e8b617f9ab5443d7e163ba"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 4): trainer/craft/train.py:361-380 | trainer/craft/train.py:402-418 | trainer/craft/trainSynth.py:274-293 | trainer/craft/train_distributed.py:377-396 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":361}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ed5ba8faa407571f13921098aff36ffff1765963928248b5d07626cbc4b667"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): easyocr/DBNet/decoders/seg_detector.py:51-67 | easyocr/DBNet/decoders/seg_detector_asf.py:66-82 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060easyocr/DBNet/decoders/seg_detector.py:51\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":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":51}}}],"partialFingerprints":{"codehealthFindingId/v1":"f20e159eac924e90996ff40c000e8cd025dba06eb5468e999abfc90451b49a46"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): trainer/craft/utils/inference_boxes.py:104-120 | trainer/craft/utils/inference_boxes.py:133-149 \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":"trainer/craft/utils/inference_boxes.py"},"region":{"startLine":104}}}],"partialFingerprints":{"codehealthFindingId/v1":"1491e145206694e8d0349d69da99c5258c70537f0830108897bf0247718e5598"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:54-70 | easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:115-131 \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":"easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py"},"region":{"startLine":54}}}],"partialFingerprints":{"codehealthFindingId/v1":"2b2781e5c2cda16ae7c136014142f98db57ed3ab7c32643f5d1696293ebd16f9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:73-88 | easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:151-166 \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. 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:167\u0060 calls \u0060mask_fc\u0060, \u0060view\u0060 and \u0060easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py:89\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/modules/deform_pool.py"},"region":{"startLine":73}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7ef7ed9c6ff477314d0d5f93f573f8639052b15150eb5c46d3c71bcfe218743"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): easyocr/DBNet/decoders/seg_detector.py:118-133 | easyocr/DBNet/decoders/seg_detector_asf.py:129-143 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060easyocr/DBNet/decoders/seg_detector_asf.py:144\u0060 calls \u0060concat_attention\u0060 and \u0060easyocr/DBNet/decoders/seg_detector.py:136\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":118}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bff46ee59e151a9caa6094041cc4695ba8475e6615f3e327003c00f28c79882"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): trainer/craft/train.py:173-188 | trainer/craft/train_distributed.py:179-194 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060trainer/craft/train_distributed.py:196\u0060 calls \u0060DistributedSampler\u0060 and \u0060trainer/craft/train.py:190\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":173}}}],"partialFingerprints":{"codehealthFindingId/v1":"955bc280582b9d8c4ca93bbe6119795ee66b66bd36db8e2381d672d2a9e4568c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): easyocr/DBNet/decoders/seg_detector.py:101-115 | easyocr/DBNet/decoders/seg_detector_asf.py:112-126 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"2405b4e7802531999cc973a23929cc5ea20d8549fbb7ac0f3aba376fc1cedea9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): easyocr/model/modules.py:155-169 | trainer/modules/feature_extraction.py:136-150 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/modules/feature_extraction.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":155}}}],"partialFingerprints":{"codehealthFindingId/v1":"18c3c53403ca46f5d0340a3bd88ecb1fc218700bfe9532c6d2beda2395f71adb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): easyocr/model/modules.py:214-228 | trainer/modules/feature_extraction.py:196-210 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/modules/feature_extraction.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":214}}}],"partialFingerprints":{"codehealthFindingId/v1":"b8e0a55a275c6aac342d18edcd1ef6b6df75fb98784e4a6aa5eac884298ba28a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): trainer/craft/trainSynth.py:384-398 | trainer/craft/train_distributed.py:495-509 \u2014 before extracting anything, compare \u0060trainer/craft/trainSynth.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/trainSynth.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa42da28810f08ebc193ee7dfcd1d3f6f999ea52b166d7e9355f3dd2d0682f9f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): easyocr/DBNet/decoders/feature_attention.py:43-56 | easyocr/DBNet/decoders/feature_attention.py:83-95 \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 \u0060easyocr/DBNet/decoders/feature_attention.py:43\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":"easyocr/DBNet/decoders/feature_attention.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"d95169b7307d9204fc943acad75912afd7fae54f6e1b53463375e98c6eeac176"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): easyocr/DBNet/decoders/seg_detector.py:83-96 | easyocr/DBNet/decoders/seg_detector_asf.py:94-107 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060easyocr/DBNet/decoders/seg_detector.py:83\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. 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":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":83}}}],"partialFingerprints":{"codehealthFindingId/v1":"b9b61fcb42fef57ffb3c60cfe0611dc2f5af43c8495a042cd49af2e61fab815a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): easyocr/DBNet/decoders/seg_detector.py:136-149 | easyocr/DBNet/decoders/seg_detector_asf.py:147-160 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060easyocr/DBNet/decoders/seg_detector_asf.py:144\u0060 calls \u0060concat_attention\u0060 and \u0060easyocr/DBNet/decoders/seg_detector.py:133\u0060 does not \u2014 after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":136}}}],"partialFingerprints":{"codehealthFindingId/v1":"44e8c7d07de2702947b53055cc4cdf6012cc13158904f471730e727fa2b9eb13"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): trainer/craft/eval.py:53-66 | trainer/craft/eval.py:135-148 \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 \u0060trainer/craft/eval.py:53\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":"trainer/craft/eval.py"},"region":{"startLine":53}}}],"partialFingerprints":{"codehealthFindingId/v1":"df6cd6508eb65046bea7762fd3c0d09d3de531ed8a22300ecbd022d3e84abf4c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): easyocr/recognition.py:85-96 | trainer/dataset.py:251-263 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"22d14f3d8787329562f3827334ee3ded011c6a6c580394f07e621392a09c9046"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201313 lines \u00D7 2): trainer/train.py:181-193 | trainer/train.py:203-214 \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":"trainer/train.py"},"region":{"startLine":181}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdc68b6988a882b0f323c8461b22a7863dc215747caa5212b03e383619b2fb3e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (23 lines \u00D7 2): easyocr/craft.py:34-56 | trainer/craft/model/craft.py:36-58 \u2014 before extracting anything, compare \u0060easyocr/craft.py\u0060 and \u0060trainer/craft/model/craft.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060trainer/craft/model/craft.py:63\u0060 calls \u0060autocast\u0060 and \u0060easyocr/craft.py:60\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft.py"},"region":{"startLine":34}}}],"partialFingerprints":{"codehealthFindingId/v1":"6f89b272d0466dbf2a41569231924a38ace55414dc5c185827f84ba2595d68f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): easyocr/model/model.py:24-35 | easyocr/model/vgg_model.py:24-35 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/model.py"},"region":{"startLine":24}}}],"partialFingerprints":{"codehealthFindingId/v1":"42a18b9c8bb1041f7e4796e99c15b7d38fe3035d3b0f28546f33c6f34d48f3ee"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): easyocr/model/model.py:10-20 | easyocr/model/vgg_model.py:10-20 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/model.py"},"region":{"startLine":10}}}],"partialFingerprints":{"codehealthFindingId/v1":"00d8f39ea477efae9df92940d143a4790962db27bb3d54b4838d1ea83c36975f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): easyocr/model/modules.py:11-21 | trainer/craft/model/vgg16_bn.py:9-19 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/craft/model/vgg16_bn.py\u0060 as WHOLE FILES: 97% of the shorter file\u0027s lines also appear in the other, so this reads as one file having been copied from the other rather than as a helper waiting to be extracted. The 2 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it \u2014 treat the file pair as the unit. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":11}}}],"partialFingerprints":{"codehealthFindingId/v1":"da2c7b5e85d2e75ecdb43a05c797ac9a9d997d761cc52d76bed90f6ddf87f380"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201311 lines \u00D7 2): trainer/craft/data/dataset.py:389-399 | trainer/craft/data/dataset.py:492-500 \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":"trainer/craft/data/dataset.py"},"region":{"startLine":389}}}],"partialFingerprints":{"codehealthFindingId/v1":"e70762374828417d750defe7ebb13db0ad583df46f89e37959e5a77c38a9e84d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): trainer/craft/loss/mseloss.py:78-87 | trainer/craft/loss/mseloss.py:154-164 \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":"trainer/craft/loss/mseloss.py"},"region":{"startLine":78}}}],"partialFingerprints":{"codehealthFindingId/v1":"68c0edb5d33145cbcd55d1bcd63930c90689facc666f80b6f0b4942afd10b8d2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 2): trainer/craft/trainSynth.py:126-135 | trainer/craft/train_distributed.py:169-179 \u2014 before extracting anything, compare \u0060trainer/craft/trainSynth.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060trainer/craft/trainSynth.py:126\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":"trainer/craft/trainSynth.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c903e674c0eb89c33dede46dbdc653723c22eaef7f384855c43861dd4368fd7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 3): easyocr/easyocr.py:456-465 | easyocr/easyocr.py:492-501 | easyocr/easyocr.py:559-568 \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":"easyocr/easyocr.py"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"d27e9138706aaa8bf67fdd0d16ad6076dccc621aaa5c2eef01b4309cb8102255"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201310 lines \u00D7 2): easyocr/imgproc.py:50-59 | trainer/craft/data/imgproc.py:71-79 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"0105252bc03995bcfb03da7919f0961b691bd2e5000682bdec84af5748b00212"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): trainer/craft/trainSynth.py:45-54 | trainer/craft/train_distributed.py:44-53 \u2014 before extracting anything, compare \u0060trainer/craft/trainSynth.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 274 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060trainer/craft/trainSynth.py:45\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":"trainer/craft/trainSynth.py"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"8630fb4b3e982222d02238cf539e290d5254fc0c2a80f9385dd632da07027454"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u201310 lines \u00D7 2): trainer/craft/utils/util.py:43-50 | trainer/craft/utils/util.py:103-112 \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 \u0060trainer/craft/utils/util.py:103\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":"trainer/craft/utils/util.py"},"region":{"startLine":43}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d932dc54859202bfea8dda2cf2d3f133da9ced21f5d137cf55059f7df1c23e4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): trainer/craft/train.py:40-48 | trainer/craft/trainSynth.py:41-49 | trainer/craft/train_distributed.py:40-48 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060trainer/craft/train.py:40\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060trainer/craft/trainSynth.py:51\u0060 calls \u0060DistributedSampler\u0060 and \u0060trainer/craft/train.py:50\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c1f76673d2b125d0c85bc933a9d64a81443b5623960dc8d3f223599841c306f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): easyocr/DBNet/decoders/simple_detection.py:101-109 | easyocr/DBNet/decoders/simple_detection.py:178-185 \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":"easyocr/DBNet/decoders/simple_detection.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a289ed0125da983174f8304c442dd5d2774ab7cda525db154547b32a613aade"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): easyocr/craft.py:15-23 | trainer/craft/model/craft.py:15-23 \u2014 before extracting anything, compare \u0060easyocr/craft.py\u0060 and \u0060trainer/craft/model/craft.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"1efff0ed4184399b7584b12de01df9aada6ca5a7245c9136d3377aea9bf03d6b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): easyocr/detection.py:14-22 | trainer/craft/utils/util.py:12-20 \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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/detection.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"53993b8f792c0cef0df6978aed5230a52d7c705a0deef276e0610b07c3051435"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): easyocr/utils.py:93-101 | trainer/utils.py:43-51 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":93}}}],"partialFingerprints":{"codehealthFindingId/v1":"90175d89b3e09f4537f51f5a1803c78379ee8661e3767628dea5ade12672dee0"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 3): easyocr/DBNet/decoders/feature_attention.py:17-24 | easyocr/DBNet/decoders/feature_attention.py:59-66 | easyocr/DBNet/decoders/feature_attention.py:98-105 \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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060easyocr/DBNet/decoders/feature_attention.py:71\u0060 calls \u0060channel_wise\u0060, \u0060sigmoid\u0060 and \u0060easyocr/DBNet/decoders/feature_attention.py:108\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/feature_attention.py"},"region":{"startLine":17}}}],"partialFingerprints":{"codehealthFindingId/v1":"df383c204044ca25baea17ae77a92c6c365025df98e1afc3340a29f94609c0e5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 3): trainer/craft/utils/inference_boxes.py:151-158 | trainer/craft/utils/inference_boxes.py:226-232 | trainer/craft/utils/inference_boxes.py:274-280 \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":"trainer/craft/utils/inference_boxes.py"},"region":{"startLine":151}}}],"partialFingerprints":{"codehealthFindingId/v1":"d85615ff8e20de77e0020f8393f5023c56a381b80bbd33bb727a1db811977f7c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py:65-72 | easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py:137-144 \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 \u0060easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py: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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/modules/deform_conv.py"},"region":{"startLine":65}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3552bbe109aee738c4be4e3343651bb181451589256f4683eb23d7f20d925d7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/DBNet/backbones/resnet.py:268-275 | easyocr/DBNet/backbones/resnet.py:308-316 \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 \u0060easyocr/DBNet/backbones/resnet.py:268\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 \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":268}}}],"partialFingerprints":{"codehealthFindingId/v1":"21101322c3023bc0140fbea19d5062994979d4396802580ae96d0ecb29db7de9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/model/modules.py:140-147 | trainer/modules/feature_extraction.py:121-128 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/modules/feature_extraction.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"181af9fa6cf06eb86e772290351fa42e49b8ec79bd89c4e8299cd1e812cb40fe"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6\u20138 lines \u00D7 2): easyocr/recognition.py:200-207 | easyocr/recognition.py:214-219 \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":"easyocr/recognition.py"},"region":{"startLine":200}}}],"partialFingerprints":{"codehealthFindingId/v1":"b1831573d03bff0f364d2b8467aef8b71cde445fceca18bf9ad2a855d42e6e78"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/utils.py:111-118 | trainer/utils.py:60-67 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":111}}}],"partialFingerprints":{"codehealthFindingId/v1":"71c8bead4760578083c71abda25d5ab96c37508e5486f4eb1bfe16ed04ff1e04"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/utils.py:215-222 | trainer/utils.py:109-116 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060easyocr/utils.py:212\u0060 calls \u0060simplify_label\u0060 and \u0060trainer/utils.py:106\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"923fb411322e54e778888113b558a39dc6c04e132617a97c5b4e0617e4398e69"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 5): trainer/craft/train.py:37-43 | trainer/craft/train.py:65-71 | trainer/craft/trainSynth.py:38-44 | trainer/craft/train_distributed.py:37-43 | trainer/craft/train_distributed.py:68-74 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":37}}}],"partialFingerprints":{"codehealthFindingId/v1":"18dc571012b3bc83c5b3f00796ed4636b62c5c1e6cecb3c53cce5e77e5ba3387"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): easyocr/DBNet/decoders/seg_detector.py:49-55 | easyocr/DBNet/decoders/seg_detector_asf.py:53-59 | easyocr/DBNet/decoders/seg_detector_asf.py:64-70 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at \u0060easyocr/DBNet/decoders/seg_detector.py:49\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":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":49}}}],"partialFingerprints":{"codehealthFindingId/v1":"b19b24d4476e14644b39c26790d0de8e43e19be819af615dc7faad8db2e97371"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): easyocr/DBNet/DBNet.py:526-532 | easyocr/DBNet/DBNet.py:610-616 \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 \u0060easyocr/DBNet/DBNet.py:526\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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060easyocr/DBNet/DBNet.py:609\u0060 calls \u0060array\u0060 and \u0060easyocr/DBNet/DBNet.py:524\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/DBNet.py"},"region":{"startLine":526}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf8fd3a27ccb720f3b0e77b95f6856c65540af4d4c3d176fe2a2f643815d70c3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): easyocr/craft_utils.py:52-62 | trainer/craft/utils/craft_utils.py:52-62 \u2014 before extracting anything, compare \u0060easyocr/craft_utils.py\u0060 and \u0060trainer/craft/utils/craft_utils.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 203 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":52}}}],"partialFingerprints":{"codehealthFindingId/v1":"1cc65400c12e641d2f9ad5ffa6e5ca223f54d9b4cca86787e41be625130a7a75"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 3): easyocr/DBNet/decoders/feature_attention.py:129-134 | easyocr/DBNet/decoders/seg_detector.py:74-79 | easyocr/DBNet/decoders/seg_detector_asf.py:85-90 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/feature_attention.py"},"region":{"startLine":129}}}],"partialFingerprints":{"codehealthFindingId/v1":"d6ec12747786925503a36348994225f188438154251006fde00277b0500d9f74"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 3): easyocr/craft.py:60-80 | trainer/craft/model/craft.py:64-84 | trainer/craft/model/craft.py:87-107 \u2014 before extracting anything, compare \u0060easyocr/craft.py\u0060 and \u0060trainer/craft/model/craft.py\u0060 as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 53 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, \u0060trainer/craft/model/craft.py:63\u0060 calls \u0060autocast\u0060 and \u0060easyocr/craft.py:58\u0060 does not \u2014 after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft.py"},"region":{"startLine":60}}}],"partialFingerprints":{"codehealthFindingId/v1":"b3e281633ec2ff7e8c418ff493a4021243746545b022caab7b4ba38e4034bb2a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (38 lines \u00D7 2): easyocr/model/modules.py:174-211 | trainer/modules/feature_extraction.py:156-193 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/modules/feature_extraction.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":174}}}],"partialFingerprints":{"codehealthFindingId/v1":"92ea59b9e923a57a17b5b3536d41e99f4b18f80551476bb7238934c0d1ae9c3c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): easyocr/recognition.py:39-47 | trainer/dataset.py:215-223 \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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":39}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ad0cdc1e644f069eb6aca600e1e3cb5396c636b0e52b9d32403966017ef707"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/utils.py:377-384 | trainer/utils.py:289-296 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":377}}}],"partialFingerprints":{"codehealthFindingId/v1":"f91d0289a8a2c2cc0dc4cc16628710c544f6970b58c9bf2b025e00650096a17c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): easyocr/craft_utils.py:66-83 | trainer/craft/utils/craft_utils.py:69-86 \u2014 before extracting anything, compare \u0060easyocr/craft_utils.py\u0060 and \u0060trainer/craft/utils/craft_utils.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 203 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":66}}}],"partialFingerprints":{"codehealthFindingId/v1":"37dfca6a79362d379391a9e811b2f01d61203f961df73b8f17d266cc4c3f2982"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): easyocr/imgproc.py:14-18 | trainer/craft/data/imgproc.py:16-23 \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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"f8e2869343fe85f2fd9bcda2cebaab65b4af17fbbb342be651d1dcec5d6dce09"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): easyocr/utils.py:21-26 | trainer/utils.py:169-174 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6bc7c3a428822234a1a4f2604c55c8df55d628a7357fefbc4877af60cddb041"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): trainer/craft/eval.py:153-158 | trainer/craft/utils/util.py:110-114 \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."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":153}}}],"partialFingerprints":{"codehealthFindingId/v1":"9b0bb1fa477cbd89541763b811211989e152aeaec27e5e37cb79ce17c5be2907"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): easyocr/craft_utils.py:246-251 | trainer/craft/utils/craft_utils.py:248-253 \u2014 before extracting anything, compare \u0060easyocr/craft_utils.py\u0060 and \u0060trainer/craft/utils/craft_utils.py\u0060 as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 203 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"46486f724c755fcbc362559c6af4fadfe1cd98343077adc40cc4a10cfd218faa"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 2): easyocr/imgproc.py:30-35 | trainer/craft/data/imgproc.py:46-51 \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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/imgproc.py"},"region":{"startLine":30}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce3976dca88de4153a21cbe0172007f8f57828dcead1abe30cc6aced52b2af18"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): easyocr/model/modules.py:90-100 | trainer/modules/sequence_modeling.py:12-22 \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. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":90}}}],"partialFingerprints":{"codehealthFindingId/v1":"079f2c003b04b4f4b7f90faab8457ecfa4bf5ee0f0ed7bbb737616b0f6ac22c2"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 2): easyocr/utils.py:312-325 | trainer/utils.py:242-255 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"425a3be1eb5a554f74836981507b9e08ec24ac62e213b8ac6f75850f8873aa6e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): easyocr/utils.py:346-350 | trainer/utils.py:276-281 \u2014 \u0060easyocr/utils.py\u0060 and \u0060trainer/utils.py\u0060 are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other \u2014 this scan matched 11 separate duplicated blocks between them, totalling at least 167 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":346}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b82bf72f6737004174efe8955ba2adcf60b327024b54f6ab7e9be76feb20bef"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): trainer/craft/train.py:85-91 | trainer/craft/train_distributed.py:88-94 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/train_distributed.py\u0060 as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 336 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":85}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4ecbbadb987c715785b4a7e4a39962ccfae43af1c99044e319b8b2671c44709"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 3): trainer/craft/train.py:100-106 | trainer/craft/trainSynth.py:79-85 | trainer/craft/train_distributed.py:103-109 \u2014 before extracting anything, compare \u0060trainer/craft/train.py\u0060 and \u0060trainer/craft/trainSynth.py\u0060 as WHOLE FILES: this scan already matched 10 separate duplicated blocks between them, totalling at least 215 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":100}}}],"partialFingerprints":{"codehealthFindingId/v1":"f04511fb04c765dc6e0ee52f548907913174a64a89b1f3cf91daf1e086bc81ad"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): easyocr/DBNet/decoders/seg_detector.py:22-29 | easyocr/DBNet/decoders/seg_detector_asf.py:25-32 \u2014 before extracting anything, compare \u0060easyocr/DBNet/decoders/seg_detector.py\u0060 and \u0060easyocr/DBNet/decoders/seg_detector_asf.py\u0060 as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 97 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together \u2014 extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/decoders/seg_detector.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"cea332d53a55d0c33502583226849d87bc4ff9592f4a956a5b7a18a60fbfef4e"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 2): easyocr/easyocr.py:383-387 | easyocr/easyocr.py:391-395 \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":"easyocr/easyocr.py"},"region":{"startLine":383}}}],"partialFingerprints":{"codehealthFindingId/v1":"369c587a03b2518c9f9db19a2358c5c6a96ed10905c2bf3b13ef7c3418879cfb"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): easyocr/model/modules.py:105-121 | trainer/modules/feature_extraction.py:9-25 \u2014 before extracting anything, compare \u0060easyocr/model/modules.py\u0060 and \u0060trainer/modules/feature_extraction.py\u0060 as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 127 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/model/modules.py"},"region":{"startLine":105}}}],"partialFingerprints":{"codehealthFindingId/v1":"e579b841ca1e7319c49f65eae5cc839a8493e4691b45348b1338005196419446"}},{"ruleId":"D17","level":"warning","message":{"text":"FixmeComment: # FIXME: kwargs should be filtered \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/model/constructor.py"},"region":{"startLine":57}}}],"partialFingerprints":{"codehealthFindingId/v1":"95d051d5e8652a3aeaa8e4defc9363d561a67678fb69e21195f61ef152761b9c"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - Jaided AI: \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/functions/deform_conv.py"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"a67076065487dccfd377400ace0604dc5d791b7fa45e06b0f4d9e2e095568991"}},{"ruleId":"D17","level":"warning","message":{"text":"TodoComment: # TODO - Jaided AI: \u2014 source code is not a task system: move the work to your tracker and leave a reference instead (e.g. \u0060# REF: #123\u0060), so the task is planned where tasks live and the ticket links back to the code."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/assets/ops/dcn/functions/deform_pool.py"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"23211279783c0607796be1295a42de945f329ea96d31bb89eaf39c48bc5ef124"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060. ADRs are expected here because \u0060setup.py\u0060 makes this repository a deployable product (line 22)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":22}}}],"partialFingerprints":{"codehealthFindingId/v1":"592d3b527192dcc635e0d3620b5ab85e733e86a8c73dc2514871cd852d17c732"}},{"ruleId":"D26","level":"note","message":{"text":"Projects may be oversized for their cohesion: \u0060(repository root)\u0060 (7441 LoC, 107 module-visible types across 11 directories) overshoots its size bounds. 1 of 3 build unit(s) (Python) overshoot their size bounds, lowering Project Cohesion to 5.6/10. Review these for cohesion \u2014 draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"setup.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"abe47371f9c2f5de74296306cc08014294bcb5a4d980daf68004ee575618d83e"}},{"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":"59673b116e24c76447c97c5be488558cb70d8b0112c5e9cf1fa496c9effc3e2b"},"taxa":[{"id":"CWE-95","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"bf292def413710f784a61beddd052f1a41e7335c09418bb458783881e2a228ef"},"taxa":[{"id":"CWE-327","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"93a499aaa1cb9146ae600e27751ba3b46d2a5c1e9fd219f2aa2229578d9ac62b"},"taxa":[{"id":"CWE-611","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"28cba1852f27185ac1e561c083d44e13df05db5651f9227fdaf157aa0f7f8394"},"taxa":[{"id":"CWE-611","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"ebd2559142ae0fdece8b42edc20d86b6afd4957056cba1dd9d616dcd12fb53d7"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"13e549d8391f5296bea1592469cc3d7bd988c90ead873896e22d47940d1d5ad9"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"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":"aaa184e861ea1b5fd4da5bf5684da9b6096fde7f7873d4a229b8e4e187ea5de0"},"taxa":[{"id":"CWE-502","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","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":"a06fd94f9334ea882d25abf52e27d866e2e494679e3481c33311eb4758450532"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D29","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":"f2190b1189a1fede6d74f9ba9c0077d4c8aba41a24f1bc5b0cb7f4fed3873c94"},"taxa":[{"id":"CWE-939","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}}]},{"ruleId":"D30","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":"4cf2b20ee111dbff63663a937b46832b70bfd4adaab5d44c2e3e7f7fa311ce3c"},"properties":{"dependency":{"package":"pillow","version":"9.3.0","advisory":"[GHSA redacted]","aliases":["A-299477569","ASB-A-299477569","BIT-pillow-2023-44271","BIT-pillow-2023-50447","BIT-pillow-2024-28219","BIT-pillow-2026-112390","BIT-pillow-2026-112391","BIT-pillow-2026-112392","BIT-pillow-2026-112393","BIT-pillow-2026-112394","BIT-pillow-2026-112395","BIT-pillow-2026-112397","BIT-pillow-2026-112398","BIT-pillow-2026-112399","BIT-pillow-2026-112400","BIT-pillow-2026-112401","BIT-pillow-2026-112402","BIT-pillow-2026-112403","BIT-pillow-2026-112404","BIT-pillow-2026-112406","BIT-pillow-2026-112891","BIT-pillow-2026-112892","BIT-pillow-2026-112894","BIT-pillow-2026-112895","BIT-pillow-2026-112896","BIT-pillow-2026-112897","BIT-pillow-2026-112898","BIT-pillow-2026-112900","BIT-pillow-2026-112901","BIT-pillow-2026-42308","BIT-pillow-2026-42310","BIT-pillow-2026-54058","BIT-pillow-2026-54059","BIT-pillow-2026-54060","BIT-pillow-2026-55379","BIT-pillow-2026-55380","BIT-pillow-2026-55798","BIT-pillow-2026-59197","BIT-pillow-2026-59198","BIT-pillow-2026-59199","BIT-pillow-2026-59200","BIT-pillow-2026-59204","BIT-pillow-2026-59205","BIT-pillow-2026-96636","BIT-pillow-2026-96637","BIT-pillow-2026-96638","BIT-pillow-2026-96640","BIT-pillow-2026-96641","BIT-pillow-2026-96642","BIT-pillow-2026-96644","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2023-175","PYSEC-2023-227","PYSEC-2026-165","PYSEC-2026-1793","PYSEC-2026-1794","PYSEC-2026-2253","PYSEC-2026-2254","PYSEC-2026-2255","PYSEC-2026-2256","PYSEC-2026-2257","PYSEC-2026-2874","PYSEC-2026-3451","PYSEC-2026-3453","PYSEC-2026-3454","PYSEC-2026-3493","PYSEC-2026-3494","PYSEC-2026-3495","PYSEC-2026-3496","PYSEC-2026-4326","PYSEC-2026-4327","PYSEC-2026-4329","PYSEC-2026-4330","PYSEC-2026-4331","PYSEC-2026-4332","PYSEC-2026-4334","PYSEC-2026-4335","PYSEC-2026-4337","PYSEC-2026-4338","PYSEC-2026-4340","PYSEC-2026-4341","PYSEC-2026-4343","PYSEC-2026-4363","PYSEC-2026-457","RUSTSEC-2023-0060","RUSTSEC-2023-0061"],"reachability":{"kind":"production","file":"trainer/craft/data/dataset.py","line":8}}}},{"ruleId":"D30","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":"5f7ca67047960e679fc1dc860e769abfb3f8f78683955f8a78a5f35d12c48e9f"},"properties":{"dependency":{"package":"torch","version":"1.13.1","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2024-31580","BIT-pytorch-2024-31583","BIT-pytorch-2024-31584","BIT-pytorch-2024-48063","BIT-pytorch-2025-2148","BIT-pytorch-2025-2149","BIT-pytorch-2025-2953","BIT-pytorch-2025-2998","BIT-pytorch-2025-2999","BIT-pytorch-2025-3000","BIT-pytorch-2025-3001","BIT-pytorch-2025-32434","BIT-pytorch-2025-3730","BIT-pytorch-2025-46148","BIT-pytorch-2025-55551","BIT-pytorch-2025-55552","BIT-pytorch-2025-55553","BIT-pytorch-2025-55554","BIT-pytorch-2025-55557","BIT-pytorch-2025-55558","BIT-pytorch-2025-55560","BIT-pytorch-2026-24747","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2024-250","PYSEC-2024-251","PYSEC-2024-252","PYSEC-2024-259","PYSEC-2024-328","PYSEC-2025-189","PYSEC-2025-190","PYSEC-2025-191","PYSEC-2025-192","PYSEC-2025-193","PYSEC-2025-194","PYSEC-2025-195","PYSEC-2025-198","PYSEC-2025-203","PYSEC-2025-204","PYSEC-2025-205","PYSEC-2025-206","PYSEC-2025-207","PYSEC-2025-208","PYSEC-2025-209","PYSEC-2025-41","PYSEC-2026-139","PYSEC-2026-1856","PYSEC-2026-1970","PYSEC-2026-2286"],"reachability":{"kind":"production","file":"trainer/craft/data/dataset.py","line":10}}}},{"ruleId":"D30","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":"be5565975914aeaf951808582c982a672e841156fff6b360ed043576a4602b35"},"properties":{"dependency":{"package":"opencv-python","version":"4.5.3.56","advisory":"[GHSA redacted]","aliases":["PYSEC-2023-183"],"reachability":{"kind":"production","file":"trainer/craft/data/dataset.py","line":9}}}},{"ruleId":"D31","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":"fe2d688610b51e0a5a02c7c5dd1724a4986e40f2689fb84510e2ec0164c27d6a"}},{"ruleId":"D31","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":"6c9bd328f1425e4185802e2cb388fc5dec17b2da92bc5227fa43622d89e747d7"}},{"ruleId":"D31","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":"becbc5502f94878197b05d70c7ef15f1353fd99a90efcb824b9c43f11ae5ce7a"}},{"ruleId":"D31","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":"eca1749843eb7ca9a94f4d80d0f44cccb095bdb48fe1439f3953dc2c7a6ef97b"}},{"ruleId":"D31","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":"9e0f3459b79638a37e60cbd02c38023fe12af07a9f4389344a1f2c17a05fb726"},"taxa":[{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D31","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":"d8a647b32ae4272dcc6af8bcc1f8b04f316915081ff55951dd454437a4655f40"}},{"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":"trainer/craft/train_distributed.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5052aa2478c5682c94bfd87b752abcc8a8ad087ae97f61d7fba1edb49052904"}},{"ruleId":"D34","level":"note","message":{"text":"Further orphaned files (smaller): 15 smaller file(s) also have no living knowledge \u2014 folded into the freshness score and metrics rather than raised one row each \u2014 most significant first: trainer/craft/train.py, trainer/craft/trainSynth.py, trainer/craft/utils/craft_utils.py, trainer/craft/eval.py, trainer/craft/utils/inference_boxes.py, trainer/craft/data/dataset.py, trainer/craft/metrics/eval_det_iou.py, trainer/craft/loss/mseloss.py (and 7 more) (16 orphaned of 52 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 52 of the 75 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ce861fd78f6935114d3a342cb90ad25870f984e1042954fcbbe27c0e23be3658"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/data/dataset.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"55416dd093e2d4f3f0356667fcf04a91fbc2afc3fb5956a841745e085ed1dd26"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"d4b28fca67da2e89ea08a96e9dd74e40a8a7db1f85bf4a2f6a264099db02b179"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/trainSynth.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb7b3d73b5d404762a65d2dc7398b403af27ef9b936a141663998e8733997744"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/utils/craft_utils.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"439a0d463399654a84690ce094507d7fd8e1462222f641b2f1414881f6a91a95"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7536dc11a229aeb5e3368842cfacf8c6b881147106dbd8d558c7f6a8f7224127"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/utils/inference_boxes.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6db4932fe9a7b602cf11be9589c55e893e96a9c8b774773a4ca0dec95ccaa91b"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/data/pseudo_label/make_charbox.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"aa07ad9373bc4e90c9ff2d67b9679fb09e3b30df97dc806cd127a0b386ab20f3"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/metrics/eval_det_iou.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9f23ba151eddc6b5cc74f1d21356d723a6171848e04ca55d553bd0d548b147b2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/data/gaussian.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6c249fa0a72eca63cc560b4a50bc96c06e32370d94504b5ae4c15d21ac48ee2d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/loss/mseloss.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7454279fa0cadb2d4c3fa7aebd7737875517ff35cc1e09a381dca602892dd1e8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/export.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3be3c055166f33a2bace9e9ef44388fcd0d1c52c88501cb40692bd199e4619f7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/data/imgaug.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7651e2c0d62f5aa518b68658df66bb4cc2235107002cd1b63955efc6f5cafef7"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/utils/util.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eb8f7054f0aae96852e2a6027fc80204d65c50be02c5bb0fcd0e9daf6d08e5f6"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/model/craft.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b79e487ab651c24a3dc8e3ffeb1050350247b60663bb33ec9402165b72608f61"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/model/vgg16_bn.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9928b65d5e99d1ad153fdd17a2d1b5d4908e2a4054dbd0a5afbe8628e24d11f"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 1/2 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060trainer/craft\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add bandit, \u0060semgrep --config=p/python\u0060, or CodeQL\u0027s python pack \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P3","level":"note","message":{"text":"No dependency-update automation: \u0060requirements.txt\u0060 declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices \u2014 including after an advisory is published against it. Add a \u0060.github/dependabot.yml\u0060 with one \u0060package-ecosystem\u0060 entry per ecosystem the tree uses (or an enabled \u0060renovate.json\u0060), and gate pull requests with \u0060actions/dependency-review-action\u0060."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"requirements.txt"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ea225f8356846d84bbfadf416ac2ef55b5c7044e420f90a9d544ca3d435c540"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060(seg_num \u002B 1) * seg_w \u003C= x and seg_num \u003C= tot_seg\u0060 appears character-identically in 2 files \u2014 easyocr/craft_utils.py, trainer/craft/utils/craft_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":142}}}],"partialFingerprints":{"codehealthFindingId/v1":"1b885c70cba40c0c4331d9291a210d88125aa3e67db444f025ab682d8787bdae"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060None in pp or seg_w \u003C np.max(seg_height) * 0.25\u0060 appears character-identically in 2 files \u2014 easyocr/craft_utils.py, trainer/craft/utils/craft_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":170}}}],"partialFingerprints":{"codehealthFindingId/v1":"f9ba8ce037aff9e96bd8391c12ae83e5a870951587f29ba1b83d28b69320056e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060i \u003E 0 and bestLabeling[i - 1] == bestLabeling[i]\u0060 appears character-identically in 2 files \u2014 easyocr/utils.py, trainer/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":266}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c2d16d1c33c396027aa8acbd174e8699995487c6c5cef0531e3c0979df0906f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060i \u003E 0 and idx_list[i - 1] == idx_list[i]\u0060 appears character-identically in 2 files \u2014 easyocr/utils.py, trainer/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":97}}}],"partialFingerprints":{"codehealthFindingId/v1":"a2a7b4871c89dce1f4d10ca0dcc1e291e9ed1a0f2c2140b3a318c0f87ffb110b"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060isinstance(image, np.ndarray) and len(image.shape) == 4\u0060 appears character-identically in 3 files \u2014 easyocr/detection.py, easyocr/detection_db.py, easyocr/utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/detection.py"},"region":{"startLine":25}}}],"partialFingerprints":{"codehealthFindingId/v1":"168f4bb6b68f254bb24ebe33a09a80b39d63907fc632075c7199834b07e8f416"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060np.sum(np.logical_and(word_label, line_img)) == 0 or r \u002B 2 * step_r \u003E= max_r\u0060 appears character-identically in 2 files \u2014 easyocr/craft_utils.py, trainer/craft/utils/craft_utils.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/craft_utils.py"},"region":{"startLine":199}}}],"partialFingerprints":{"codehealthFindingId/v1":"ac256a370950f1bd0972cffc8662fa488c244167b4c943d8391a0041fcd1aad4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060self.config.train.ckpt_path is not None and self.config.train.st_iter != 0\u0060 appears character-identically in 3 files \u2014 trainer/craft/train.py, trainer/craft/trainSynth.py, trainer/craft/train_distributed.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":206}}}],"partialFingerprints":{"codehealthFindingId/v1":"9a8daa39fd561cdf471de98c3151118540c94dad06057a3d552a6edc1a2b28e1"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060stride != 1 or self.inplanes != planes * block.expansion\u0060 appears character-identically in 3 files \u2014 easyocr/DBNet/backbones/resnet.py, easyocr/model/modules.py, trainer/modules/feature_extraction.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/DBNet/backbones/resnet.py"},"region":{"startLine":221}}}],"partialFingerprints":{"codehealthFindingId/v1":"c7d5340a37840fe7eddbd1e6b325315e10de5627efc9fb5539bd49c5628c4aa4"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060train_step % self.config.train.eval_interval == 0 and train_step != 0\u0060 appears character-identically in 3 files \u2014 trainer/craft/train.py, trainer/craft/trainSynth.py, trainer/craft/train_distributed.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":354}}}],"partialFingerprints":{"codehealthFindingId/v1":"7c0f7f0ad932e00542f177bc08c7cafbdc312846dbb3d5c9cdee9e868915838e"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060train_step \u003E 0 and train_step % 5 == 0 and self.gpu == 0\u0060 appears character-identically in 2 files \u2014 trainer/craft/trainSynth.py, trainer/craft/train_distributed.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/trainSynth.py"},"region":{"startLine":240}}}],"partialFingerprints":{"codehealthFindingId/v1":"7d3834c5f81cedb5a21749ca21654cbcc23a1c39db9e979b67d22ae96889c681"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060train_step \u003E 0 and train_step % self.config.train.lr_decay == 0\u0060 appears character-identically in 3 files \u2014 trainer/craft/train.py, trainer/craft/trainSynth.py, trainer/craft/train_distributed.py. It is one line, so the duplication detector\u0027s token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/train.py"},"region":{"startLine":249}}}],"partialFingerprints":{"codehealthFindingId/v1":"7a61e0d62c3114b0710ab3a254958335d3908a0884b61d287459d35e6d339da5"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/train.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"140f4c1af174fec96a9aea5b774e6fc6f971f9f18098216fe8d7838749d1a3a0"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/train.py"},"region":{"startLine":164}}}],"partialFingerprints":{"codehealthFindingId/v1":"31a4aee2919c8f8b3f5bbcef53d6241cecc827f1dacafc7d9b49c510ca032052"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/modules/sequence_modeling.py"},"region":{"startLine":18}}}],"partialFingerprints":{"codehealthFindingId/v1":"8be9801335b4b89d55f03cd0de2f2a219072d10dfaf763826f77ce3a9b8e64af"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":44}}}],"partialFingerprints":{"codehealthFindingId/v1":"390b819b340953f50dc9da152945b1d61c3c82fd4265bd485366088506a4c8b8"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":86}}}],"partialFingerprints":{"codehealthFindingId/v1":"813340b6b65a59761220f20b96969bb04c63ab944127d1171b980ee89b447a54"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"trainer/craft/eval.py"},"region":{"startLine":126}}}],"partialFingerprints":{"codehealthFindingId/v1":"c6d9cf9e73b9e439d347bb0904df624aaad04d2ff3f81873f5fa0a9ca9c70c81"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/detection.py"},"region":{"startLine":82}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee557a015e251f58daa93046d14ca7a4d06393e4ee953cfcc19dc183b7c98160"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/detection_db.py"},"region":{"startLine":139}}}],"partialFingerprints":{"codehealthFindingId/v1":"1f83d146f3606083b528c9a4c8950fff6b9a5b900d7f000470c59bbfe5411e90"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"7449037b65bf7ca7527657f2c05f008a5ad1a8130be955e0a018a02005fc7513"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/recognition.py"},"region":{"startLine":195}}}],"partialFingerprints":{"codehealthFindingId/v1":"96c7593f374015891a5ae9ad70cdce77d4d1d187e921c4025ce3eafe97b6ae8d"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"easyocr/utils.py"},"region":{"startLine":300}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0fc802a102f0a779282decb7dea3d84a472dec24013c706bb719dada33f2b33"}}],"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-1032","guid":"5f21e517-68aa-a650-9a25-5771ef024637","name":"OWASP Top Ten \u2014 Security Misconfiguration category","shortDescription":{"text":"OWASP Top Ten \u2014 Security Misconfiguration category"},"helpUri":"https://cwe.mitre.org/data/definitions/1032.html"},{"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-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-16","guid":"659db3ea-affc-8453-8add-c1218fbfcb92","name":"Configuration","shortDescription":{"text":"Configuration"},"helpUri":"https://cwe.mitre.org/data/definitions/16.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-327","guid":"e51910ff-67b5-3c51-aa3d-92837d9eab90","name":"Use of a Broken or Risky Cryptographic Algorithm","shortDescription":{"text":"Use of a Broken or Risky Cryptographic Algorithm"},"helpUri":"https://cwe.mitre.org/data/definitions/327.html"},{"id":"CWE-502","guid":"f7d3b296-aac0-5c5a-b706-e07faba26c36","name":"Deserialization of Untrusted Data","shortDescription":{"text":"Deserialization of Untrusted Data"},"helpUri":"https://cwe.mitre.org/data/definitions/502.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-611","guid":"1afbae66-ea29-2d59-aaa2-134e3ae2e85a","name":"Improper Restriction of XML External Entity Reference","shortDescription":{"text":"Improper Restriction of XML External Entity Reference"},"helpUri":"https://cwe.mitre.org/data/definitions/611.html"},{"id":"CWE-732","guid":"1da27e8f-b330-7650-ab63-bd61953eae5d","name":"Incorrect Permission Assignment for Critical Resource","shortDescription":{"text":"Incorrect Permission Assignment for Critical Resource"},"helpUri":"https://cwe.mitre.org/data/definitions/732.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"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":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-939","guid":"12397742-f2c4-8254-8012-482c3356c551","name":"CWE-939","shortDescription":{"text":"CWE-939"},"helpUri":"https://cwe.mitre.org/data/definitions/939.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"},{"id":"CWE-95","guid":"400bba4e-483c-5c50-a695-114fa9168003","name":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Directives in Dynamically Evaluated Code (\u0027Eval Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/95.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"}]}],"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":18,"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."]}]}