{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D8","name":"Code Coverage","shortDescription":{"text":"Code Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/D8"},{"id":"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":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"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":"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":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"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":"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":"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":"run_bert_link_prediction.main (cyclomatic 75): run_bert_link_prediction.main has cyclomatic complexity 75 (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":"run_bert_link_prediction.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"b21f2843b050d3167be7a199df451fade87647b210ccac327407efecac22a682"}},{"ruleId":"D1","level":"warning","message":{"text":"run_bert_relation_prediction.main (cyclomatic 65): run_bert_relation_prediction.main has cyclomatic complexity 65 (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":"run_bert_relation_prediction.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"8c63ccb04cdc9b6de89cef74018bc04dfd851e74bdaa51f3fd3ead4e648899fe"}},{"ruleId":"D1","level":"warning","message":{"text":"run_bert_triple_classifier.main (cyclomatic 57): run_bert_triple_classifier.main has cyclomatic complexity 57 (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":"run_bert_triple_classifier.py"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"214a7df4f95641a6f4523080a9a90c74052ec10aa966b7eb6ebb493e6e49da1b"}},{"ruleId":"D1","level":"warning","message":{"text":"KGProcessor._create_examples (cyclomatic 17): KGProcessor._create_examples has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"run_bert_link_prediction.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"be8e8d85807ab0a9bc537528e38cb41f31e0eb24d1209194f2e163bea88f0612"}},{"ruleId":"D2","level":"warning","message":{"text":"run_bert_link_prediction.main (cognitive 170): run_bert_link_prediction.main has cognitive complexity 170 (threshold 15). Drivers by points: if/else 50 (103 pts), loops 16 (42 pts), boolean chains 11, ternaries 6 (10 pts), error handling 2 (4 pts) (nesting depth added 85). To reduce it, split the body into named stages: move each independent 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":"run_bert_link_prediction.py"},"region":{"startLine":402}}}],"partialFingerprints":{"codehealthFindingId/v1":"d12b1ab44615e83ea52817ef15aa4c55c48fc5ce97ce09714646cc75c47b21ea"}},{"ruleId":"D2","level":"warning","message":{"text":"run_bert_relation_prediction.main (cognitive 131): run_bert_relation_prediction.main has cognitive complexity 131 (threshold 15). Drivers by points: if/else 41 (73 pts), loops 13 (33 pts), boolean chains 11, ternaries 6 (10 pts), error handling 2 (4 pts) (nesting depth added 58). To reduce it, split the body into named stages: move each independent 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":"run_bert_relation_prediction.py"},"region":{"startLine":305}}}],"partialFingerprints":{"codehealthFindingId/v1":"eab581de83226da2b7e3759ec633c1dfabd683dab3001b8474d07377864c3236"}},{"ruleId":"D2","level":"warning","message":{"text":"run_bert_triple_classifier.main (cognitive 105): run_bert_triple_classifier.main has cognitive complexity 105 (threshold 15). Drivers by points: if/else 36 (59 pts), loops 8 (21 pts), boolean chains 11, ternaries 6 (10 pts), error handling 2 (4 pts) (nesting depth added 42). To reduce it, split the body into named stages: move each independent 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":"run_bert_triple_classifier.py"},"region":{"startLine":394}}}],"partialFingerprints":{"codehealthFindingId/v1":"7156279986fceb989c4a2434e736f34adb26e872c428fe6be245ee2241b25fd3"}},{"ruleId":"D2","level":"warning","message":{"text":"KGProcessor._create_examples (cognitive 45): KGProcessor._create_examples has cognitive complexity 45 (threshold 15). Drivers by points: loops 8 (23 pts), if/else 7 (21 pts), boolean chains 1 (nesting depth added 29). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"run_bert_link_prediction.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"291db59e6b438c96ae3ec5c5ac6655c5b277931c1e0e622cd3673f2223e82c9d"}},{"ruleId":"D2","level":"warning","message":{"text":"KGProcessor._create_examples (cognitive 34): KGProcessor._create_examples has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 5 (11 pts), boolean chains 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":"run_bert_triple_classifier.py"},"region":{"startLine":168}}}],"partialFingerprints":{"codehealthFindingId/v1":"60760fdfea52baaa928b6c981f17b77aa36df23bafd3cab8f80538750842c7ab"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./run_bert_link_prediction.py: FileTooLong \u2014 733 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 233 over it, 1.47\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":"run_bert_link_prediction.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"4863b0b2bf1684219ffcc26ba842365eb277949770e056f9b440a83f0c630d99"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./run_bert_triple_classifier.py: FileTooLong \u2014 599 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 99 over it, 1.20\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":"run_bert_triple_classifier.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"66b764547ab77d358978ec7b809fafa051edbd5c247c3a49f58eb9bef2c1f35b"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ./run_bert_relation_prediction.py: FileTooLong \u2014 567 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 67 over it, 1.13\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":"run_bert_relation_prediction.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"80dc8afd5d0a91871f17e1baf03889ac8ae85d722a12dad317b5286fd1aae315"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member family (3 members, 438 shared lines): run_bert_link_prediction.py:403-1057 | run_bert_relation_prediction.py:306-800 | run_bert_triple_classifier.py:395-844 \u2014 These 3 members are variants of one another: a block of 438 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":"run_bert_link_prediction.py"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"58634c288675a9ef117e66af1649b7b4ef3495b863b072abfb11086106cd23e6"}},{"ruleId":"D4","level":"warning","message":{"text":"Near-duplicate member pair (68 shared lines): run_bert_link_prediction.py:169-257 | run_bert_triple_classifier.py:169-249 \u2014 These two members are variants of one another: 68 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":"run_bert_link_prediction.py"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"8235014c812c4b61cd901ed11518dde7c266cd83ce97311a0f6acd0214011acf"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (93 corresponding lines): run_bert_link_prediction.py:260-352 | run_bert_triple_classifier.py:252-344 \u2014 These two members are one piece of code written twice and then edited apart: 93 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":"run_bert_link_prediction.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"d794b1200f9f80415f95e5603bd4c7475066d179cd021b2e54858d0286a15163"}},{"ruleId":"D4","level":"warning","message":{"text":"Edited copy of a member (83 corresponding lines): run_bert_link_prediction.py:260-352 | run_bert_relation_prediction.py:192-274 \u2014 These two members are one piece of code written twice and then edited apart: 83 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":"run_bert_link_prediction.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"1ab6bdcfcafb1d895b8ba2e4867c73220999a120ed878377e72fc305c9461a4d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (149 lines \u00D7 3): run_bert_link_prediction.py:403-551 | run_bert_relation_prediction.py:306-454 | run_bert_triple_classifier.py:395-543 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":403}}}],"partialFingerprints":{"codehealthFindingId/v1":"757cd4d55387d1ae8b6deb6b7be169e7c89c896e030529eda2d4a2ccb043213b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (2\u201380 lines \u00D7 11): run_bert_link_prediction.py:632-711 | run_bert_link_prediction.py:713-714 | run_bert_link_prediction.py:792-793 | run_bert_link_prediction.py:924-925 | run_bert_link_prediction.py:983-984 | run_bert_relation_prediction.py:535-614 | run_bert_relation_prediction.py:616-617 | run_bert_relation_prediction.py:696-697 | run_bert_triple_classifier.py:624-703 | run_bert_triple_classifier.py:705-706 | run_bert_triple_classifier.py:784-785 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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. 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060run_bert_link_prediction.py:711\u0060 calls \u0060info\u0060 and \u0060run_bert_link_prediction.py:925\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":"run_bert_link_prediction.py"},"region":{"startLine":632}}}],"partialFingerprints":{"codehealthFindingId/v1":"a26ab992b257db72033e0b183740151ec7974d07bb9b4af2c66c03f8b7166961"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (237\u2013238 lines \u00D7 3): run_bert_link_prediction.py:554-790 | run_bert_relation_prediction.py:457-694 | run_bert_triple_classifier.py:546-782 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":554}}}],"partialFingerprints":{"codehealthFindingId/v1":"9df17c4d32ee2664ccfb3ca1c981c0da7c07947fb4915447756041f200cc8ee8"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (33\u201338 lines \u00D7 2): run_bert_link_prediction.py:926-963 | run_bert_link_prediction.py:985-1017 \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":"run_bert_link_prediction.py"},"region":{"startLine":926}}}],"partialFingerprints":{"codehealthFindingId/v1":"96e6412744c008c9dc27b7e72b92b09fb7a6bb04af62ecd1c5df7a5c224adab3"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (35\u201338 lines \u00D7 6): run_bert_link_prediction.py:707-744 | run_bert_link_prediction.py:786-820 | run_bert_relation_prediction.py:610-647 | run_bert_relation_prediction.py:690-724 | run_bert_triple_classifier.py:699-736 | run_bert_triple_classifier.py:778-812 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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, \u0060run_bert_link_prediction.py:745\u0060 calls \u0060view\u0060 and \u0060run_bert_link_prediction.py:822\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":"run_bert_link_prediction.py"},"region":{"startLine":707}}}],"partialFingerprints":{"codehealthFindingId/v1":"0bc40e2fc1559abf4bcba123f2a1b65f59d9020c592a43844c524da9ee709d2d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (45\u201365 lines \u00D7 3): run_bert_link_prediction.py:308-352 | run_bert_relation_prediction.py:210-274 | run_bert_triple_classifier.py:300-344 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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 \u0060run_bert_relation_prediction.py:210\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":"run_bert_link_prediction.py"},"region":{"startLine":308}}}],"partialFingerprints":{"codehealthFindingId/v1":"08c509eed6012eb4dd9bbbd908971f30b73177d92134b6a66475fd18c3492a11"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (22 lines \u00D7 2): run_bert_link_prediction.py:264-285 | run_bert_triple_classifier.py:256-277 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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":"run_bert_link_prediction.py"},"region":{"startLine":264}}}],"partialFingerprints":{"codehealthFindingId/v1":"5992e79d273afb0be34674e53c137a05308d8f274d9c2b0b673d36e7d55f0a9d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (21 lines \u00D7 2): run_bert_link_prediction.py:207-227 | run_bert_triple_classifier.py:201-221 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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":"run_bert_link_prediction.py"},"region":{"startLine":207}}}],"partialFingerprints":{"codehealthFindingId/v1":"55b690c22ffd291804c1760e9f79e4643a2c8a0976fff0febbb575f6be663ce9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (20 lines \u00D7 2): run_bert_link_prediction.py:186-205 | run_bert_triple_classifier.py:177-196 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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":"run_bert_link_prediction.py"},"region":{"startLine":186}}}],"partialFingerprints":{"codehealthFindingId/v1":"af97a525b86cd9e9730e915c76363e2d99a756bb068c8c8cd43111ba4c836ddc"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): run_bert_link_prediction.py:372-389 | run_bert_triple_classifier.py:364-381 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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":"run_bert_link_prediction.py"},"region":{"startLine":372}}}],"partialFingerprints":{"codehealthFindingId/v1":"348d440e3a2fd7d896dfdbef1330cc55c8a505b2304f576c247abff00ebf257f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16 lines \u00D7 2): run_bert_link_prediction.py:828-843 | run_bert_triple_classifier.py:820-835 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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 \u0060run_bert_link_prediction.py:828\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":"run_bert_link_prediction.py"},"region":{"startLine":828}}}],"partialFingerprints":{"codehealthFindingId/v1":"37d68ac7aa841d2a34b1b350abcc33885ba0a25ce3b967ceb71dc31be323ed96"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15 lines \u00D7 2): run_bert_link_prediction.py:230-244 | run_bert_triple_classifier.py:223-237 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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":"run_bert_link_prediction.py"},"region":{"startLine":230}}}],"partialFingerprints":{"codehealthFindingId/v1":"d9f01912ee0e85a1b97f2eb41161f6d7fc2abd13b37e7d219f856ba24475ca33"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 3): run_bert_link_prediction.py:260-271 | run_bert_relation_prediction.py:192-203 | run_bert_triple_classifier.py:252-263 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":260}}}],"partialFingerprints":{"codehealthFindingId/v1":"a371e716e20d3a0ef6966047245ae28a2839c3562a149a67bb5400b47686fd8f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 2): run_bert_link_prediction.py:246-257 | run_bert_triple_classifier.py:238-249 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_triple_classifier.py\u0060 as WHOLE FILES: this scan already matched 21 separate duplicated blocks between them, totalling at least 781 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":"run_bert_link_prediction.py"},"region":{"startLine":246}}}],"partialFingerprints":{"codehealthFindingId/v1":"948b3ca9f4a8ec36bdf03da3dea4381f55e6fadc6f9f12e0861c8d7f2bc3c7d6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10\u201311 lines \u00D7 8): run_bert_link_prediction.py:731-740 | run_bert_link_prediction.py:808-817 | run_bert_link_prediction.py:934-944 | run_bert_link_prediction.py:992-1002 | run_bert_relation_prediction.py:634-643 | run_bert_relation_prediction.py:712-721 | run_bert_triple_classifier.py:723-732 | run_bert_triple_classifier.py:800-809 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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, \u0060run_bert_link_prediction.py:745\u0060 calls \u0060view\u0060 and \u0060run_bert_link_prediction.py:822\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":"run_bert_link_prediction.py"},"region":{"startLine":731}}}],"partialFingerprints":{"codehealthFindingId/v1":"748dd1b4d9f0e35a53d8d201bd5a0c5a6d225d5b95cfbe7c2f9703490edae322"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12 lines \u00D7 6): run_bert_link_prediction.py:760-771 | run_bert_link_prediction.py:839-850 | run_bert_relation_prediction.py:664-675 | run_bert_relation_prediction.py:786-797 | run_bert_triple_classifier.py:752-763 | run_bert_triple_classifier.py:831-842 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":760}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc90c227f67e7f0f434d2036e0fa432f9aac6059fa2cc86479322bc213c5358f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 6): run_bert_link_prediction.py:747-756 | run_bert_link_prediction.py:822-831 | run_bert_relation_prediction.py:651-660 | run_bert_relation_prediction.py:726-735 | run_bert_triple_classifier.py:739-748 | run_bert_triple_classifier.py:814-823 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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, \u0060run_bert_link_prediction.py:745\u0060 calls \u0060view\u0060 and \u0060run_bert_link_prediction.py:820\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":"run_bert_link_prediction.py"},"region":{"startLine":747}}}],"partialFingerprints":{"codehealthFindingId/v1":"cf56e30a74e261979af4788e4a5ca3dc4abfb18f9689c5cd3029eb23d5c0116d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): run_bert_link_prediction.py:101-109 | run_bert_relation_prediction.py:98-106 | run_bert_triple_classifier.py:101-109 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":101}}}],"partialFingerprints":{"codehealthFindingId/v1":"8cf0cacb754a1f6deb3b1a9b3f640f97cc799887e12c203bea45bef390ad178c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): run_bert_link_prediction.py:178-186 | run_bert_relation_prediction.py:170-178 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":178}}}],"partialFingerprints":{"codehealthFindingId/v1":"851600e71d071a4a7964143bc66b97665b71e06cb4761271e8666daf1d69ef84"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (6 lines \u00D7 8): run_bert_link_prediction.py:716-721 | run_bert_link_prediction.py:795-800 | run_bert_link_prediction.py:926-931 | run_bert_link_prediction.py:985-990 | run_bert_relation_prediction.py:619-624 | run_bert_relation_prediction.py:699-704 | run_bert_triple_classifier.py:708-713 | run_bert_triple_classifier.py:787-792 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":716}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b269c9ef1d8138e28eb0c4873d8a2ba3bcc2799587931c3a294e5e8fe926952"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 6): run_bert_link_prediction.py:133-140 | run_bert_link_prediction.py:147-154 | run_bert_relation_prediction.py:131-138 | run_bert_relation_prediction.py:141-148 | run_bert_triple_classifier.py:133-140 | run_bert_triple_classifier.py:147-154 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060run_bert_link_prediction.py:142\u0060 calls \u0060get_labels\u0060 and \u0060run_bert_relation_prediction.py:140\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":"run_bert_link_prediction.py"},"region":{"startLine":133}}}],"partialFingerprints":{"codehealthFindingId/v1":"1d98474ee7e5e155c06caaadd907622c0de1daf3d3de4aa25467ef4c24cd26f7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (14 lines \u00D7 3): run_bert_link_prediction.py:356-369 | run_bert_relation_prediction.py:278-291 | run_bert_triple_classifier.py:348-361 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8a9bb0b688b576da4ae82188c0342068a16f03f87060ba7e3f394a83af36e36"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): run_bert_link_prediction.py:395-399 | run_bert_relation_prediction.py:298-302 | run_bert_triple_classifier.py:387-391 \u2014 before extracting anything, compare \u0060run_bert_link_prediction.py\u0060 and \u0060run_bert_relation_prediction.py\u0060 as WHOLE FILES: this scan already matched 15 separate duplicated blocks between them, totalling at least 666 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":"run_bert_link_prediction.py"},"region":{"startLine":395}}}],"partialFingerprints":{"codehealthFindingId/v1":"0b66caf050efda527a723ab36861917764218fc397be488f6cc41da36b61b596"}},{"ruleId":"D8","level":"error","message":{"text":"No automated tests: No automated tests \u2014 no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (pytest or unittest), and run it in CI so the gap cannot reopen."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"3132564c6310e5d01a231f252a02d5d2f5a542c0a8fa29a14c89693f1e3df871"}},{"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":"a4a363fdc0728ddee7828f7b606ce921cf458dfc7b096d5e709935a2ce8ffce3"},"taxa":[{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09: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":"63c1ca9d61933b5f215e29bae9d5ccf3fc04085320ca7be97064f99b7a1ccb22"},"taxa":[{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09: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":"19c9a9e2580a82744c33a7d3f54560ffab8e6283866dd010aa4b7866fc76d70c"},"taxa":[{"id":"CWE-532","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A09:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","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":"583c754707031c7f24952734cba9fa97072608f6614c4fad93566ca3b3bbef1a"},"properties":{"dependency":{"package":"torch","version":"0.4.1","advisory":"[GHSA redacted]","aliases":["BIT-pytorch-2025-2148","BIT-pytorch-2025-2149","BIT-pytorch-2025-2953","BIT-pytorch-2025-2998","BIT-pytorch-2026-4538","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[CVE redacted]","[GHSA redacted]","[GHSA redacted]","[GHSA redacted]","PYSEC-2025-189","PYSEC-2025-190","PYSEC-2025-191","PYSEC-2025-192","PYSEC-2026-139"],"severity":"medium","relation":"direct","declaredRange":"0.4.1","reachability":{"kind":"production","file":"run_bert_link_prediction.py","line":28}}}},{"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":"M3","level":"note","message":{"text":"No src/ separation: Production code is mixed at the repository root with everything else the repository holds, so nothing marks which files are the product."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"fdf7f5b24e313364d10170a5c2542959902fe0d26ed70edef3eaa10ec5bcdb1d"}},{"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":"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":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"9ea225f8356846d84bbfadf416ac2ef55b5c7044e420f90a9d544ca3d435c540"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060args.local_rank == -1 or torch.distributed.get_rank() == 0\u0060 appears character-identically in 3 files \u2014 run_bert_link_prediction.py, run_bert_relation_prediction.py, run_bert_triple_classifier.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":"run_bert_link_prediction.py"},"region":{"startLine":685}}}],"partialFingerprints":{"codehealthFindingId/v1":"3b4afe190431c309759e1c0d6808329be74ff76476a11885d7d18b01c8581814"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(tokens_a) \u003E len(tokens_b) and len(tokens_a) \u003E len(tokens_c)\u0060 appears character-identically in 2 files \u2014 run_bert_link_prediction.py, run_bert_triple_classifier.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":"run_bert_link_prediction.py"},"region":{"startLine":382}}}],"partialFingerprints":{"codehealthFindingId/v1":"563c46e6baeca375acceb5be46adedd27c1565154503ea4acd78c9db42b72620"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(tokens_b) \u003E len(tokens_a) and len(tokens_b) \u003E len(tokens_c)\u0060 appears character-identically in 2 files \u2014 run_bert_link_prediction.py, run_bert_triple_classifier.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":"run_bert_link_prediction.py"},"region":{"startLine":384}}}],"partialFingerprints":{"codehealthFindingId/v1":"55cd2290447cd3ad3ba86e21810a8c952f142898a4092c0416e92da24d6017d8"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060len(tokens_c) \u003E len(tokens_a) and len(tokens_c) \u003E len(tokens_b)\u0060 appears character-identically in 2 files \u2014 run_bert_link_prediction.py, run_bert_triple_classifier.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":"run_bert_link_prediction.py"},"region":{"startLine":386}}}],"partialFingerprints":{"codehealthFindingId/v1":"10df446d2fe6a40121ebab61d945b8cf6b7394d9d229a644929fc966f6d2b7fb"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060os.path.exists(args.output_dir) and os.listdir(args.output_dir) and args.do_train\u0060 appears character-identically in 3 files \u2014 run_bert_link_prediction.py, run_bert_relation_prediction.py, run_bert_triple_classifier.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":"run_bert_link_prediction.py"},"region":{"startLine":541}}}],"partialFingerprints":{"codehealthFindingId/v1":"58c6e1bd8b626537c16d7f4441cbdd55fa88bcb3342da1c5b0d7f17a0fa0a71f"}},{"ruleId":"X10","level":"note","message":{"text":"Duplicated predicate: \u0060torch.cuda.is_available() and not args.no_cuda\u0060 appears character-identically in 3 files \u2014 run_bert_link_prediction.py, run_bert_relation_prediction.py, run_bert_triple_classifier.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":"run_bert_link_prediction.py"},"region":{"startLine":509}}}],"partialFingerprints":{"codehealthFindingId/v1":"10b0efcecc393ce90d3b7d96a743d5723c34c152210c40ffba74201f26aab731"}}],"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-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-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-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-532","guid":"1cd8877a-76e8-ce54-b40b-779af23364a0","name":"Insertion of Sensitive Information into Log File","shortDescription":{"text":"Insertion of Sensitive Information into Log File"},"helpUri":"https://cwe.mitre.org/data/definitions/532.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-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"}]},{"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":"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":"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/"},{"id":"A09:2025","guid":"78892bc9-3c98-495d-881c-8af1390d643c","name":"Security Logging \u0026 Alerting Failures","shortDescription":{"text":"Security Logging \u0026 Alerting Failures"},"helpUri":"https://top10.owasp.org/2025/A09_2025-Security_Logging_and_Alerting_Failures/"}]}],"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":4,"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."]}]}