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

pyg-team/pytorch_geometric

Measured 4 November 2026, 13:19 UTC, at code version e5be823

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 66out of 100 At risk Up 10 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 120,445 lines of product code in 2 projects, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Code Health, 64

Findings by how serious they are

46 critical 804 serious 542 minor

19 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
4 November 2026, 13:19 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

54of 54 dimensions measured by tools.
1383of 1392 findings point to an exact file and line, so you can open each one in the code. The other 9 concern the repository as a whole, such as missing documentation.
54dimensions across 6 lenses, read from 120,445 lines of product code in 2 projects.
Chapters

Executive summary

pyg-team/pytorch_geometric is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 66 out of 100, which the At risk rating leaves unchanged.

Code Health, at 64, is the weakest lens, level with Maturity, and counts most in the score. The best first step is writing log messages as searchable templates, worth about 1 point.

Seventeen pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Eleven places in the code run text as code, which an attacker could use, and six settings leave the servers or containers unsafe. Pinning each tool to an exact version, replacing text run as code with direct calls and correcting the unsafe settings would close these risks. Passing outside input through environment variables would fix the five pipeline steps that put outside input straight into a shell command, and limiting each secret to its own step would deal with the four secrets exposed to more of the pipeline than needed.

The product code is 120,445 lines, about €190,000 to rebuild. Two of our security checks couldn't finish, among them the one for known security holes in its packages, so those results are missing, not clean passes.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Code Health 64 · counts for 46%Maturity 64 · counts for 25%Security and Compliance 65 · counts for 14%Production Readiness 70 · counts for 8%Architecture 83 · counts for 4%Performance 89 · counts for 2%

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Product code 77%Tests 23%
Fixed since the last survey: 1 finding

This critical or serious finding was in the previous survey, on 20 October 2026, and is gone from this one.

  • Change Coupling · Change coupling: REDACTED ↔ willow_object_class.py REDACTED
Rebuild cost: about €190,000 · Estimate
Cost to rebuild€62,000 to €310,000, for 1,039 to 3,297 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.9 at a score of 66. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 120,445 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Interpolated log message defeats structured logging
Raises the score by about 1 point · Medium effort · Structured logging
2
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED.
Raises the score by about 0.7 points · Low effort · Secrets (history)
3
Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 16 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.
Raises the score by about 0.7 points · Low effort · Static Analysis (SAST)

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €190,000 to build again, about 1.3 person-years of work. Its weakest lens is Code Health, at 64 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Interpolated log message defeats structured logging. Of all the actions in this report, it raises the score most for the work it takes: about 1 point for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 7.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 2% to 5% on every change. The history of the code shows how much it changes: about 446 lines over the last 90 days, which is about 1,809 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

524 modules, with 488 dependencies between them. Every module uses only modules listed above it, so there are no loops.

The table shows the 40 modules with the most connections; 484 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 data.storage2 distributed.dist_context3 distributed.rpc4 edge_index5 nn.aggr.base6 nn.conv.message_passing7 nn.kge.base8 transforms.base_transform9 utils.mixin10 torch_geometric11 data.feature_store12 data.graph_store13 explain.config14 nn.conv.cugraph.base15 sampler.base16 data.data17 distributed.dist_neighbor_sampler18 distributed.local_feature_store19 distributed.local_graph_store20 explain.algorithm.base21 llm.utils.backend_utils22 loader.link_loader23 loader.node_loader24 data.dataset25 data.hetero_data26 datasets.graph_generator.base27 datasets.motif_generator.custom28 distributed.dist_loader29 llm.utils30 llm.utils.graph_store31 data32 data.in_memory_dataset33 data.lightning.datamodule34 data.on_disk_dataset35 distributed36 distributed.dist_link_neighbor_loader37 distributed.dist_neighbor_loader38 explain.explanation39 loader40 datasets.fake
1 data.storage
2 distributed.dist_context
3 distributed.rpc
4 edge_index
5 nn.aggr.base
6 nn.conv.message_passing
7 nn.kge.base
8 transforms.base_transform
9 utils.mixin
10 torch_geometric1
11 data.feature_store2
12 data.graph_store1
13 explain.config3
14 nn.conv.cugraph.base1
15 sampler.base5
16 data.data33
17 distributed.dist_neighbor_sampler113
18 distributed.local_feature_store24
19 distributed.local_graph_store2
20 explain.algorithm.base2
21 llm.utils.backend_utils11
22 loader.link_loader1
23 loader.node_loader1
24 data.dataset1
25 data.hetero_data2222
26 datasets.graph_generator.base1
27 datasets.motif_generator.custom1
28 distributed.dist_loader11
29 llm.utils11
30 llm.utils.graph_store111
31 data11111
32 data.in_memory_dataset11
33 data.lightning.datamodule1
34 data.on_disk_dataset11
35 distributed111111
36 distributed.dist_link_neighbor_loader111
37 distributed.dist_neighbor_loader111
38 explain.explanation111
39 loader21121
40 datasets.fake112
Uses a module listed above itPart of a loopThe module itself
1 data.storage2 distributed.dist_context3 distributed.rpc4 edge_index5 nn.aggr.base6 nn.conv.message_passing7 nn.kge.base8 transforms.base_transform9 utils.mixin10 torch_geometric11 data.feature_store12 data.graph_store13 explain.config14 nn.conv.cugraph.base15 sampler.base16 data.data17 distributed.dist_neighbor_sampler18 distributed.local_feature_store19 distributed.local_graph_store20 explain.algorithm.base21 llm.utils.backend_utils22 loader.link_loader23 loader.node_loader24 data.dataset25 data.hetero_data26 datasets.graph_generator.base27 datasets.motif_generator.custom28 distributed.dist_loader29 llm.utils30 llm.utils.graph_store31 data32 data.in_memory_dataset33 data.lightning.datamodule34 data.on_disk_dataset35 distributed36 distributed.dist_link_neighbor_loader37 distributed.dist_neighbor_loader38 explain.explanation39 loader40 datasets.fakedata.storage1distributed.dist_context2distributed.rpc3edge_index4nn.aggr.base5nn.conv.message_passing6nn.kge.base7transforms.base_transform8utils.mixin9torch_geometric10data.feature_store11data.graph_store12explain.config13nn.conv.cugraph.base14sampler.base15data.data16distributed.dist_neighbor_sampler17distributed.local_feature_store18distributed.local_graph_store19explain.algorithm.base20llm.utils.backend_utils21loader.link_loader22loader.node_loader23data.dataset24data.hetero_data25datasets.graph_generator.base26datasets.motif_generator.custom27distributed.dist_loader28llm.utils29llm.utils.graph_store30data31data.in_memory_dataset32data.lightning.datamodule33data.on_disk_dataset34distributed35distributed.dist_link_neighbor_loader36distributed.dist_neighbor_loader37explain.explanation38loader39datasets.fake40121315331132422111112222111111111111111111111111111111111121121112+484 more modules (most-connected shown)

At a glance — Code Health · 64% · Adequate ·

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

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

At a glance — Readiness · 70% · Adequate · gated by P3 ·

At a glance — Security · 65% · Adequate · gated by D29 ·

At a glance — Performance · 89% · Strong ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection71High / Critical
A02:2025 — Security Misconfiguration15High / Critical
A07:2025 — Authentication Failures2High / Critical

Roadmap

Top priorities: Resolve the 462 Orphaned file finding(s) in Knowledge Freshness — start with base.py (7), __init__.py (6), utils.py (6); Interpolated log message defeats structured logging; Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.

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

Do thisHelpsEffortDimension
Interpolated log message defeats structured logging+1.4 ptsMediumStructured logging
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED.+0.7 ptsLowSecrets (history)
Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 16 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once.+0.7 ptsLowStatic Analysis (SAST)
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5).+0.7 ptsLowStatic Analysis (SAST)
Resolve the 1 Critical IaC finding(s) in IaC & Container Security — start with REDACTED.+0.7 ptsLowIaC & Container Security
Resolve the 5 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (2).+0.7 ptsLowIaC & Container Security
Resolve the 9 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5), REDACTED (4).+0.7 ptsLowIaC & Container Security
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.3 ptsMediumArchitecture documentation

File quality

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

FileScoreBandWorst signal
REDACTED0.8SlopSecrets (history): REDACTED: REDACTED
REDACTED1.0SlopIaC & Container Security: Critical IaC: REDACTED
REDACTED1.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.8SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED3.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.3MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 46

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 804

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 542

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

Could not be resolved — 19

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 54 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 54 dimensions across the health lenses
D1D2D3D4D6D9D13D14D15D16D17D19D26D28D29D31D34D35D44AX10AX3AX4M1M2M3P1P10P2P3P4P6PF1PF3X1X12X13X14X15X16X17X18X19X21X22X23X24X25X26X27X28X29X3X30X4

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1383 of 1392 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic

Every finding is locatable in findings.md. Run 01a1a6b6-a540-7582-b274-bf9af456b657.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a Codecov configuration (codecov.yml, target 80%) and a coverage step in CI (`pytest -m "not rag and not dataset" --cov --cov`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.py), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py) and this repository declares a Python test suite (repository root, 434 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's 9 shipped Python distribution(s) across 2 manifest(s) WERE read; what went unanswered is the currency half, because it grades an EXACT pin against the newest release and every declaration here is a floor or a range — which installs the newest release it admits and so cannot be behind one. So pypi.org was never asked. This is a true statement about the repository, and the healthy one, NOT a gap on our side: no reader we could write would find a currency question here.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is a COLLECTOR gap, not an environment fault: it declares a published package (pyproject.toml), but no published-package marker D22 reads admitted any project here, so this ecosystem's public API has no collector, and the remedy is to write one — no change to the scan image can close it.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D30 Dependency Vulnerabilities — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Osv: osv-scanner exited 1 with no findings — dependency CVEs were not measured. 'osv-scanner' exited 1 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
  • D43 Malicious Dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Osv: osv-scanner exited 1 with no findings — dependency CVEs were not measured. 'osv-scanner' exited 1 and produced no findings, and that exit code has no documented repo-side meaning — so this run measured nothing, and nothing here is a statement about the repository.
  • AX1 Captive dependencies — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in torch_geometric/config_store.py, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 2 | 3 | # Based on NGC PyG 24.09 image: -------------------- ERROR: failed to solve: nvcr.io/nvidia/cuda-dl-base:24.09-cuda12.6-devel-ubuntu22.04: failed to resolve source metadata for nvcr.io/nvidia/cuda-dl-base:24.09-cuda12.6-devel-ubuntu22.04: failed to do request: Head "https://nvcr.io/v2/nvidia/cuda-dl-base/manifests/24.09-cuda12.6-devel-ubuntu22.04": Forbidden; runtime evidence skipped.
  • C1 Data Protection — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C3 Audit Trail — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'sqlite3' is imported (torch_geometric/data/database.py:297), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C4 Data Retention — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'sqlite3' is imported (torch_geometric/data/database.py:297), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • C5 Data-Subject Rights — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 'sqlite3' is imported (torch_geometric/data/database.py:297), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
  • GD1 Unfinished & placeholder code — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
  • X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
  • X5 Nullable reference types — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax and MSBuild project configuration, TypeScript source and its tsconfig files, Java source and its package and module declarations, PHP source and its PHPStan and Psalm configuration, Dart source and its pubspec language version, Ruby source and its Sorbet and Steep configuration, Scala source and its build's explicit-nulls, WartRemover and Scalafix settings, and Kotlin source only, and no C# was loaded, no TypeScript was found, and this repository's Python is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity6.6 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

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

81 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was NeighborSampler.__init__ at 56. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being data.size_repr at 16 — they are counted neither in the figure above nor in this dimension's score.

NeighborSampler.__init__ (cyclomatic 56)torch_geometric/sampler/neighbor_sampler.py:44
DistNeighborSampler.node_sample (cyclomatic 43)torch_geometric/distributed/dist_neighbor_sampler.py:212
collate._collate (cyclomatic 39)torch_geometric/data/collate.py:149
profiler._layer_trace (cyclomatic 37)torch_geometric/profile/profiler.py:149
DistNeighborSampler.edge_sample (cyclomatic 36)torch_geometric/distributed/dist_neighbor_sampler.py:512

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

What to do

  1. Bring the 12 bodies over 30 down to 30 or less in Cyclomatic Complexity — start with NeighborSampler.__init__ (cyclomatic 56), DistNeighborSampler.node_sample (cyclomatic 43), collate._collate (cyclomatic 39). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cyclomatic Complexity from 6.6 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D2 · Cognitive Complexity4.3 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

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

178 method(s) exceeded the cognitive complexity threshold of 15; the worst was NeighborSampler.__init__ at 130.

NeighborSampler.__init__ (cognitive 130)torch_geometric/sampler/neighbor_sampler.py:44
DistNeighborSampler.node_sample (cognitive 128)torch_geometric/distributed/dist_neighbor_sampler.py:212
MessagePassing.propagate (cognitive 88)torch_geometric/nn/conv/message_passing.py:421
DistNeighborSampler.edge_sample (cognitive 85)torch_geometric/distributed/dist_neighbor_sampler.py:512
neighbor_sampler.edge_sample (cognitive 85)torch_geometric/sampler/neighbor_sampler.py:821

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

What to do

  1. Bring the 8 bodies over 60 down to 60 or less in Cognitive Complexity — start with NeighborSampler.__init__ (cognitive 130), DistNeighborSampler.node_sample (cognitive 128), MessagePassing.propagate (cognitive 88). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 8 together lifts Cognitive Complexity from 4.4 to about 5.7/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D3 · God Classes9.7 / 10Stronggated by 9 serious findings✓ Tool-verified

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

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

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

9 god class(es) detected.

TooManyMethods: BaseData · ×6torch_geometric/data/data.py:48
FileTooLong: REDACTED · ×3REDACTED

What to do

  1. Resolve the 6 TooManyMethods finding(s) in God Classes — start with data.py (2), hetero_data.py, storage.py. — One of this dimension's main actionable groups (6 warning-level).
  2. Resolve the 3 FileTooLong finding(s) in God Classes — start with REDACTED, edge_index.py, ibmb_loader.py. — One of this dimension's main actionable groups (3 warning-level).
  3. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

D4 · Code Duplication8.9 / 10Strong✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

269 duplicated block group(s) detected. A further 20 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 68 of the 289 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (6 lines × 2) · ×30torch_geometric/data/data.py:693
Duplicated block (5 lines × 2) · ×28graphgym/configs_gen.py:128
Duplicated block (7 lines × 2) · ×24torch_geometric/datasets/actor.py:106
Duplicated block (10 lines × 2) · ×19torch_geometric/data/storage.py:433
Duplicated block (9 lines × 2) · ×16torch_geometric/data/hetero_data.py:466

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

What to do

  1. Resolve the 30 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with distributed_sampling.py (3), data.py (2), edge_index.py (2). — One of this dimension's main actionable groups (30 warning-level).
  2. Resolve the 28 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with gdelt.py (2), configs_gen.py, aminer.py. — One of this dimension's main actionable groups (28 warning-level).
  3. Resolve the 24 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with edge_index.py (2), REDACTED (2), actor.py. — One of this dimension's main actionable groups (24 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 6 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

6 of 458 classes have LCOM4 above 3.

Low cohesion: HeteroData (LCOM4 16) · ×6torch_geometric/data/hetero_data.py:43

What to do

  1. Resolve the 6 Low cohesion finding(s) in Cohesion (LCOM4) — start with hetero_data.py, data.py, temporal.py. — One of this dimension's main actionable groups (6 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

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

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

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

1301 test methods: 1301 unit, 0 integration, 0 BDD, 0 e2e. The Python suite contributes 1301 test function(s) across 434 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D13 · REDACTED Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

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

0 of 24 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 9 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (15 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. 2 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots10.0 / 10Exemplary✓ Tool-verified

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D16 · Bus Factor9.9 / 10Exemplary✓ Tool-verified

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

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

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

6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is torch_geometric/metrics/link_pred.py. Counted over 495 of the 745 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

✓ On the Gold path — maintain.

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

D17 · Explicit Debt9.8 / 10Stronggated by 138 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×126torch_geometric/config_store.py:427
HackComment · ×9torch_geometric/nn/models/gpse.py:884
FixmeComment · ×3REDACTED:214

What to do

  1. Resolve the 126 TodoComment finding(s) in Explicit Debt — start with neighbor_sampler.py (13), utils.py (7), base.py (6). — One of this dimension's main actionable groups (126 warning-level).
  2. Resolve the 9 HackComment finding(s) in Explicit Debt — start with link_loader.py (2), node_loader.py (2), backend_utils.py (2). — One of this dimension's main actionable groups (9 warning-level).
  3. Resolve the 3 FixmeComment finding(s) in Explicit Debt — start with REDACTED, fs.py, test_fs.py. — One of this dimension's main actionable groups (3 warning-level).
  4. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

1 of 1 documentation facets pass in full. 63 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic.

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

1 of 2 build units (Python) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

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

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

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

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

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

D29 · Static Analysis (SAST)0.0 / 10Critical✓ Tool-verified

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

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

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

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

71 finding(s): 0 critical, 39 high, 30 medium, 2 low. 16 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) charged to Static Analysis (SAST) — the other 16 are reported here at file:line but scored by D36 (supply-chain provenance), which charges them once. — One of this dimension's main actionable groups (17 issue-level, 1 of them charged here).
  2. Resolve the 11 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (11 issue-level).
  3. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).

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

D31 · IaC & Container Security6.8 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (REDACTED/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

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

15 finding(s): 1 critical, 5 high, 9 medium, 0 low.

REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 5 High IaC finding(s) in IaC & Container Security — start with REDACTED (3), REDACTED (2). — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 1 Critical IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  3. Resolve the 9 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (9 warning-level).

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

D34 · Knowledge Freshness0.6 / 10Critical✓ Tool-verified

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

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

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

465 of 495 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is REDACTED. Counted over 495 of the 745 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×462torch_geometric/data/hetero_data.py:1
Most significant orphaned file · ×3REDACTED:1
Concentrated knowledge decay

What to do

  1. Resolve the 462 Orphaned file finding(s) in Knowledge Freshness — start with base.py (7), __init__.py (6), utils.py (6). — One of this dimension's main actionable groups (462 recommendation-level).
  2. Resolve the 3 Most significant orphaned file finding(s) in Knowledge Freshness — start with REDACTED, edge_index.py, neighbor_sampler.py. — One of this dimension's main actionable groups (3 recommendation-level).
  3. Resolve the 1 Concentrated knowledge decay finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling9.9 / 10Stronggated by 5 serious findings✓ Tool-verified

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

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

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

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

Strongest change-coupling: cartesian.py↔spherical.py 67%; knn_graph.py↔radius_graph.py 64%; _coalesce.py↔_sort_edge_index.py 62%

Change coupling: cartesian.py ↔ spherical.py · ×5torch_geometric/transforms/cartesian.py:1

What to do

  1. Resolve the 5 Change coupling finding(s) in Change Coupling — start with cartesian.py, knn_graph.py, _coalesce.py. — One of this dimension's main actionable groups (5 warning-level).

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

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

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

0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 9 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition9.3 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

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

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

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

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

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

  • Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.

What to do

  • Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

P3 · Security & performance tooling3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 13855 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:4
  • `REDACTED` schedules updates, but no `package-ecosystem` entry covers `pip`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list. — REDACTED:3

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Dependabot is configured but does not watch `pip` — add that `package-ecosystem` entry to REDACTED so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

PF1 · Benchmark discipline8.0 / 10Strong✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document1.9 / 10Critical✓ Tool-verified

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

  • `map_annotation` is public and takes `annotation: Any` from its caller, and it calls itself at line 168 (`map_annotation`) with a piece of `annotation` — and nowhere in `map_annotation` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `map_annotation` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/config_store.py:168
  • `device` is public and takes `device: Any` from its caller, and it calls itself at line 35 (`device`) with a piece of `device` — and nowhere in `device` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `device` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/device.py:35
  • `type_repr` is public and takes `obj: Any` from its caller, and it calls itself at line 475 (`type_repr`) with a piece of `obj` — and nowhere in `type_repr` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `type_repr` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/inspector.py:475
  • `require_grad` is public and takes `x: Any` from its caller, and it calls itself at line 15 (`require_grad`) with a piece of `x` (and at line 17, line 19) — and nowhere in `require_grad` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `require_grad` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/profile/benchmark.py:15
  • `uniform` is public and takes `value: Any` from its caller, and it calls itself at line 14 (`uniform`) with a piece of `value` (and at line 16) — and nowhere in `uniform` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `uniform` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/nn/inits.py:14
  • `kaiming_uniform` is public and takes `value: Any` from its caller, and it calls itself at line 25 (`kaiming_uniform`) with a piece of `value` (and at line 27) — and nowhere in `kaiming_uniform` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `kaiming_uniform` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/nn/inits.py:25
  • `glorot` is public and takes `value: Any` from its caller, and it calls itself at line 36 (`glorot`) with a piece of `value` (and at line 38) — and nowhere in `glorot` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `glorot` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/nn/inits.py:36
  • `constant` is public and takes `value: Any` from its caller, and it calls itself at line 53 (`constant`) with a piece of `value` (and at line 55) — and nowhere in `constant` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `constant` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/nn/inits.py:53
  • `normal` is public and takes `value: Any` from its caller, and it calls itself at line 71 (`normal`) with a piece of `value` (and at line 73) — and nowhere in `normal` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `normal` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/nn/inits.py:71
  • `reset` is public and takes `value: Any` from its caller, and it calls itself at line 81 (`reset`) with a piece of `value` — and nowhere in `reset` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `reset` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/nn/inits.py:81
  • `to_device` is public and takes `inputs: Any` from its caller, and it calls itself at line 12 (`to_device`) with a piece of `inputs` (and at line 14, line 16) — and nowhere in `to_device` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `to_device` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/loader/cache.py:12
  • `non_blocking_transfer` is public and takes `batch: Any` from its caller, and it calls itself at line 73 (`self.non_blocking_transfer`) with a piece of `batch` (and at line 75) — and nowhere in `non_blocking_transfer` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `non_blocking_transfer` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/loader/prefetch.py:73
  • `separate` is public, takes a document from its caller (line 15) and hands it to `_separate`, which calls itself at line 117 (`_separate`) with a piece of `values` (and at line 142) — and nowhere in `_separate` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_separate` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — torch_geometric/data/separate.py:117

What to do

  • Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back. Also whether a `finally` that gives the primitive back unconditionally can run in a state where the method does not hold it: after a timed wait whose result was discarded, after an acquire inside the `try` that can fail, after the body already released it, or never, because a `return` left between the acquire and the `try`.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling4.9 / 10Weak✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×11) — torch_geometric/_onnx.py:130, torch_geometric/_onnx.py:164, torch_geometric/_onnx.py:186, …
  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×24) — torch_geometric/_onnx.py:148, torch_geometric/config_store.py:18, torch_geometric/config_store.py:24, …
  • `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. — torch_geometric/llm/models/txt2kg.py:306

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X4 · Structured logging4.4 / 10Weak✓ Tool-verified

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.

  • `info` at line 1000 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — torch_geometric/nn/models/gpse.py:1000
  • `info` at line 203 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — torch_geometric/loader/ibmb_loader.py:203
  • `debug` at line 85 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — torch_geometric/loader/mixin.py:85
  • `debug` at line 167 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — torch_geometric/loader/mixin.py:167
  • `debug` at line 286 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — torch_geometric/loader/mixin.py:286
  • `debug` at line 413 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — torch_geometric/loader/utils.py:413
  • `warning` at line 614 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:614
  • `debug` at line 1813 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1813
  • `debug` at line 1818 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:1818
  • `warning` at line 2511 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:2511
  • `info` at line 2903 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:2903
  • `warning` at line 2906 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:2906
  • `debug` at line 2958 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:2958
  • `debug` at line 2964 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:2964
  • `info` at line 2968 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:2968
  • `warning` at line 3024 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3024
  • `info` at line 3122 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3122
  • `info` at line 3311 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3311
  • `info` at line 3416 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3416
  • `debug` at line 3489 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3489
  • `info` at line 3503 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3503
  • `error` at line 3587 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3587
  • `info` at line 3616 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3616
  • `debug` at line 3791 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3791
  • `info` at line 3795 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3795
  • `info` at line 3803 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3803
  • `info` at line 3809 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3809
  • `info` at line 3937 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3937
  • `debug` at line 3951 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3951
  • `info` at line 3978 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3978
  • `info` at line 3984 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3984
  • `warning` at line 3991 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:3991
  • `info` at line 4005 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4005
  • `debug` at line 4059 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4059
  • `info` at line 4063 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4063
  • `info` at line 4166 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4166
  • `debug` at line 4314 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4314
  • `info` at line 4317 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4317
  • `info` at line 4405 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4405
  • `info` at line 4553 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:4553

What to do

  • Interpolated log message defeats structured logging

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health64%AdequateLargest drag on the score — prioritise here.
Architecture83%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity64%Adequate — gated by D34Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness70%Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security65%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance89%StrongStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

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

  • D36 Supply-chain Provenance & Signing — 9 observation(s) recorded · The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • X10 Duplicated predicate — 25 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 control(s) we could not find positive evidence for

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

  • C3 Audit Trail — Not assessed: this repository stores data through 'sqlite3' (torch_geometric/data/database.py:297) but declares no persisted model this check reads (Django, SQLAlchemy, SQLModel, Peewee, Tortoise and MongoEngine model fields, Alembic and Django migration columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
  • C4 Data Retention — Not assessed: this repository stores data through 'sqlite3' (torch_geometric/data/database.py:297) but declares no persisted model this check reads (Django, SQLAlchemy, SQLModel, Peewee, Tortoise and mongoengine model fields, Alembic and Django migration columns, SQL schemas). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
  • C5 Data-Subject Rights — Not assessed: this repository stores data through 'sqlite3' (torch_geometric/data/database.py:297) but declares no persisted model this check reads (Django, SQLAlchemy, SQLModel, Peewee, Tortoise and mongoengine model fields, Alembic and Django migration columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 60 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC2 Forms & labels — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC3 Page structure — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC4 Keyboard semantics — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC5 ARIA correctness — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC6 Visual & motion safety — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AC7 A11y enforcement — Frontend below the scale floor (5 DOM element(s) < 25) — too little surface to assess accessibility.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — 2 | 3 | # Based on NGC PyG 24.09 image: -------------------- ERROR: failed to solve: nvcr.io/nvidia/cuda-dl-base:24.09-cuda12.6-devel-ubuntu22.04: failed to resolve source metadata for nvcr.io/nvidia/cuda-dl-base:24.09-cuda12.6-devel-ubuntu22.04: failed to do request: Head "https://nvcr.io/v2/nvidia/cuda-dl-base/manifests/24.09-cuda12.6-devel-ubuntu22.04": Forbidden; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — No access-control surface detected in the analyzed source — this repository registers no route and starts no server another machine can reach (no Flask/FastAPI/Starlette route, Django urlpatterns or class-based view, Tornado handler). Access control is therefore N/A here — a library or command-line tool is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • D10 Test Quality — ~36082 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
  • D12 Dependency Hygiene — Dependency currency not established — no declaration carries an exact pin to grade
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — Naming consistency is measured on C# and TypeScript only; JavaScript, Python, html not measured.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Aggregate roots were found in only one source directory (torch_geometric), which is a layered codebase, not two contexts. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D30 Dependency Vulnerabilities — Scanner failed to run — not a clean result
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — Scanner failed to run — not a clean result
  • D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 1 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 47 value object(s)
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 63 current-state document(s) make no claim of a kind M4 checks. 15 claim(s) of kinds M4 does not check were not checked (path 1, command argument 4, environment variable 10); M4 checks only links and versions and artefact counts.
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF2 Allocation hygiene — Not applicable: Python runs on a garbage-collected runtime that gives a program no allocation-control idiom to choose on a hot path — no pools, stack allocation or value types — so allocation awareness is not something this code can be rated on.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • X2 Cancellation propagation — no C# was loaded; this repository's Python was read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 46 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D31 · IaC & Container Security · High IaC · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D31 · IaC & Container Security · Critical IaC · ×1
  • REDACTED
Serious — 804 finding(s)
D17 · Explicit Debt · TodoComment · ×126
  • TodoComment torch_geometric/config_store.py:427 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/data/data.py:710 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/data/hetero_data.py:562 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/data/temporal.py:198 — # TODO — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/edge_index.py:483 — # TODO Remove once PyTorch does not override `dtype` in `DataLoader`. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/index.py:255 — # TODO Remove once PyTorch does not override `dtype` in `DataLoader`. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/edge_index.py:947 — # TODO Investigate how to avoid overlapping return types here. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/edge_index.py:1154 — # TODO We cannot save `_T_index` for now since it is stored as tuple. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/experimental.py:7 — # TODO (matthias) This file currently requires manual imports to let — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/hash_tensor.py:196 — # TODO Expose fixed threshold as argument. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/inspector.py:467 — # TODO Only convert to `Optional` if `Optional` is importable. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/typing.py:55 — # TODO Drop this code block once `segment_matmul` is fixed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/utils/_select.py:56 — # TODO Sparse tensors in `torch.sparse` do not yet support `narrow`. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/utils/_spmm.py:101 — # TODO The `torch.sparse.mm` code path with the `reduce` argument does — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/utils/hetero.py:116 — # TODO Add support for SparseTensor w/o converting. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/transforms/add_positional_encoding.py:28 — # TODO Move to `BaseTransform`. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/transforms/to_sparse_tensor.py:114 — # TODO Multi-dimensional edge attributes only supported for COO. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/testing/asserts.py:94 — # TODO Add support for values. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:256 — # TODO Using `pyg-lib` metis partitioning leads to some weird bugs — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/sampler/base.py:211 — # TODO(manan): refine this further; it does not currently define a proper — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/sampler/base.py:555 — # TODO(manan): refine this further; it does not currently define a proper — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/sampler/base.py:686 — # TODO(zaristei) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/sampler/base.py:694 — # TODO(zaristei) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/sampler/neighbor_sampler.py:78 — # TODO(zaristei) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment torch_geometric/sampler/neighbor_sampler.py:641 — # TODO(zaristei) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 101 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×30
  • Duplicated block (6 lines × 2) torch_geometric/data/data.py:693 — torch_geometric/data/data.py:693-698 | torch_geometric/data/hypergraph_data.py:205-210 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) torch_geometric/datasets/gdelt.py:77 — torch_geometric/datasets/gdelt.py:77-82 | torch_geometric/datasets/icews.py:115-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) torch_geometric/datasets/geometry.py:102 — torch_geometric/datasets/geometry.py:102-107 | torch_geometric/datasets/modelnet.py:132-137 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) torch_geometric/datasets/graphland.py:443 — torch_geometric/datasets/graphland.py:443-448 | torch_geometric/datasets/graphland.py:540-545 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/datasets/word_net.py:77 — torch_geometric/datasets/word_net.py:77-82 | torch_geometric/datasets/word_net.py:193-198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/edge_index.py:1615 — torch_geometric/edge_index.py:1615-1620 | torch_geometric/edge_index.py:1712-1717 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/edge_index.py:1663 — torch_geometric/edge_index.py:1663-1668 | torch_geometric/edge_index.py:1755-1760 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/nn/conv/arma_conv.py:111 — torch_geometric/nn/conv/arma_conv.py:111-116 | torch_geometric/nn/conv/tag_conv.py:80-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/conv/arma_conv.py:111` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) torch_geometric/nn/conv/cugraph/base.py:67 — torch_geometric/nn/conv/cugraph/base.py:67-72 | torch_geometric/nn/conv/cugraph/base.py:120-125 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/nn/conv/rgat_conv.py:463 — torch_geometric/nn/conv/rgat_conv.py:463-468 | torch_geometric/nn/conv/rgat_conv.py:475-480 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/conv/rgat_conv.py:463` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) torch_geometric/nn/models/dimenet.py:355 — torch_geometric/nn/models/dimenet.py:355-360 | torch_geometric/nn/models/dimenet.py:403-408 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/nn/models/metapath2vec.py:204 — torch_geometric/nn/models/metapath2vec.py:204-209 | torch_geometric/nn/models/node2vec.py:136-141 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) torch_geometric/nn/module_dict.py:46 — torch_geometric/nn/module_dict.py:46-51 | torch_geometric/nn/parameter_dict.py:47-52 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) torch_geometric/nn/to_hetero_transformer.py:214 — torch_geometric/nn/to_hetero_transformer.py:214-219 | torch_geometric/nn/to_hetero_transformer.py:255-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/to_hetero_transformer.py:214` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) torch_geometric/sampler/base.py:629 — torch_geometric/sampler/base.py:629-634 | torch_geometric/sampler/base.py:639-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) torch_geometric/transforms/cartesian.py:40 — torch_geometric/transforms/cartesian.py:40-45 | torch_geometric/transforms/local_cartesian.py:37-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) torch_geometric/data/data.py:588 — torch_geometric/data/data.py:588-593 | torch_geometric/data/temporal.py:162-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 2) torch_geometric/datasets/movie_lens_100k.py:93 — torch_geometric/datasets/movie_lens_100k.py:93-98 | torch_geometric/datasets/movie_lens_1m.py:88-93 — before extracting anything, compare `torch_geometric/datasets/movie_lens_100k.py` and `torch_geometric/datasets/movie_lens_1m.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) torch_geometric/nn/models/dimenet.py:628 — torch_geometric/nn/models/dimenet.py:628-633 | torch_geometric/nn/models/dimenet.py:907-912 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/models/dimenet.py:905` calls `copy_` and `torch_geometric/nn/models/dimenet.py:627` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) examples/gcn2_cora.py:37 — examples/gcn2_cora.py:37-42 | examples/gcn2_ppi.py:42-47 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) examples/multi_gpu/distributed_sampling.py:26 — examples/multi_gpu/distributed_sampling.py:26-31 | examples/multi_gpu/distributed_sampling_multinode.py:25-30 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) examples/multi_gpu/distributed_sampling.py:66 — examples/multi_gpu/distributed_sampling.py:66-71 | examples/multi_gpu/distributed_sampling_multinode.py:83-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) examples/multi_gpu/distributed_sampling.py:102 — examples/multi_gpu/distributed_sampling.py:102-107 | examples/multi_gpu/distributed_sampling_multinode.py:115-120 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/multi_gpu/distributed_sampling_multinode.py:112` calls `arange` and `examples/multi_gpu/distributed_sampling.py:99` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 2) examples/multi_gpu/distributed_sampling_multinode.py:145 — examples/multi_gpu/distributed_sampling_multinode.py:145-150 | examples/quiver/multi_gpu_quiver.py:116-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) examples/point_transformer_segmentation.py:194 — examples/point_transformer_segmentation.py:194-199 | examples/randlanet_segmentation.py:166-171 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/randlanet_segmentation.py:164` calls `no_grad` and `examples/point_transformer_segmentation.py:190` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×28
  • Duplicated block (5 lines × 2) graphgym/configs_gen.py:128 — graphgym/configs_gen.py:128-133 | graphgym/configs_gen.py:172-176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/aminer.py:80 — torch_geometric/datasets/aminer.py:80-85 | torch_geometric/datasets/aminer.py:93-97 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/dblp.py:129 — torch_geometric/datasets/dblp.py:129-133 | torch_geometric/datasets/imdb.py:81-85 — before extracting anything, compare `torch_geometric/datasets/dblp.py` and `torch_geometric/datasets/imdb.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/hm.py:73 — torch_geometric/datasets/hm.py:73-80 | torch_geometric/datasets/hm.py:90-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/datasets/hm.py:90` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/igmc_dataset.py:101 — torch_geometric/datasets/igmc_dataset.py:101-105 | torch_geometric/datasets/igmc_dataset.py:113-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/md17.py:431 — torch_geometric/datasets/md17.py:431-435 | torch_geometric/datasets/ppi.py:135-141 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/s3dis.py:79 — torch_geometric/datasets/s3dis.py:79-83 | torch_geometric/datasets/shapenet.py:181-185 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/explain/algorithm/dummy_explainer.py:33 — torch_geometric/explain/algorithm/dummy_explainer.py:33-37 | torch_geometric/explain/algorithm/dummy_explainer.py:51-55 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/graphgym/loader.py:149 — torch_geometric/graphgym/loader.py:149-154 | torch_geometric/graphgym/loader.py:156-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/nn/dense/diff_pool.py:70 — torch_geometric/nn/dense/diff_pool.py:70-74 | torch_geometric/nn/dense/mincut_pool.py:73-77 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/nn/models/gnnff.py:47 — torch_geometric/nn/models/gnnff.py:47-51 | torch_geometric/nn/models/gnnff.py:108-112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/nn/models/rev_gnn.py:273 — torch_geometric/nn/models/rev_gnn.py:273-277 | torch_geometric/nn/models/rev_gnn.py:286-290 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/sampler/hgt_sampler.py:51 — torch_geometric/sampler/hgt_sampler.py:51-55 | torch_geometric/sampler/neighbor_sampler.py:163-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/sampler/hgt_sampler.py:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) torch_geometric/utils/mesh_laplacian.py:65 — torch_geometric/utils/mesh_laplacian.py:65-69 | torch_geometric/utils/mesh_laplacian.py:90-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) torch_geometric/data/data.py:596 — torch_geometric/data/data.py:596-600 | torch_geometric/data/temporal.py:170-174 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/airports.py:45 — torch_geometric/datasets/airports.py:45-49 | torch_geometric/datasets/webkb.py:73-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/attributed_graph_dataset.py:120 — torch_geometric/datasets/attributed_graph_dataset.py:120-124 | torch_geometric/datasets/linkx_dataset.py:86-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/gdelt.py:50 — torch_geometric/datasets/gdelt.py:50-54 | torch_geometric/datasets/icews.py:88-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/brca_tgca.py:84 — torch_geometric/datasets/brca_tgca.py:84-88 | torch_geometric/datasets/nell.py:74-78 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/data/storage.py:474 — torch_geometric/data/storage.py:474-478 | torch_geometric/data/storage.py:605-609 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/gdelt.py:85 — torch_geometric/datasets/gdelt.py:85-89 | torch_geometric/datasets/icews.py:123-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/datasets/hgb_dataset.py:187 — torch_geometric/datasets/hgb_dataset.py:187-191 | torch_geometric/datasets/hgb_dataset.py:195-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) torch_geometric/nn/dense/dmon_pool.py:140 — torch_geometric/nn/dense/dmon_pool.py:140-144 | torch_geometric/nn/dense/mincut_pool.py:90-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) torch_geometric/utils/loop.py:462 — torch_geometric/utils/loop.py:462-466 | torch_geometric/utils/loop.py:626-630 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/utils/loop.py:462` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) examples/graph_gps.py:122 — examples/graph_gps.py:122-127 | examples/pna.py:90-94 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `examples/graph_gps.py:122` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • + 3 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×25
  • Swallowed exception (caught, then discarded) torch_geometric/_onnx.py:148 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/config_store.py:18 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/config_store.py:24 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/device.py:12 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/typing.py:82 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/typing.py:87 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/typing.py:302 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/typing.py:313 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/utils/ppr.py:14 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:136 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:185 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:261 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/metrics/link_pred.py:13 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:1702 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:2231 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:2369 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:2753 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/llm/models/txt2kg.py:306 — `except` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/graphgym/loader.py:206 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/graphgym/loader.py:213 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:27 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/graphgym/utils/io.py:12 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/datasets/molecule_gpt_dataset.py:286 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/datasets/snap_dataset.py:96 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) torch_geometric/data/storage.py:917 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×24
  • Duplicated block (7 lines × 2) torch_geometric/datasets/actor.py:106 — torch_geometric/datasets/actor.py:106-112 | torch_geometric/datasets/webkb.py:127-133 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) torch_geometric/datasets/malnet_tiny.py:118 — torch_geometric/datasets/malnet_tiny.py:118-124 | REDACTED:137-143 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) REDACTED:279 — REDACTED:279-285 | torch_geometric/datasets/willow_object_class.py:174-180 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:286` calls `pre_filter` and `torch_geometric/datasets/willow_object_class.py:182` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) torch_geometric/edge_index.py:1231 — torch_geometric/edge_index.py:1231-1237 | torch_geometric/index.py:402-408 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/edge_index.py:1231` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) torch_geometric/edge_index.py:1607 — torch_geometric/edge_index.py:1607-1613 | torch_geometric/edge_index.py:1704-1710 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) torch_geometric/hash_tensor.py:681 — torch_geometric/hash_tensor.py:681-687 | torch_geometric/hash_tensor.py:738-744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/hash_tensor.py:681` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note first that the copies are not typed on the same thing: the declarations holding them bind `dim` to `Union[int, List[int]]` in one and `Union[int, str]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (7 lines × 2) REDACTED:4098 — REDACTED:4098-4107 | REDACTED:4360-4366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4098` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) torch_geometric/loader/link_loader.py:309 — torch_geometric/loader/link_loader.py:309-315 | torch_geometric/loader/node_loader.py:239-245 — before extracting anything, compare `torch_geometric/loader/link_loader.py` and `torch_geometric/loader/node_loader.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) torch_geometric/nn/models/dimenet.py:364 — torch_geometric/nn/models/dimenet.py:364-370 | torch_geometric/nn/models/dimenet.py:413-419 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/models/dimenet.py:411` calls `glorot_orthogonal` and `torch_geometric/nn/models/dimenet.py:362` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) torch_geometric/nn/models/gpse.py:770 — torch_geometric/nn/models/gpse.py:770-776 | torch_geometric/nn/models/gpse.py:868-874 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) torch_geometric/nn/pool/pan_pool.py:113 — torch_geometric/nn/pool/pan_pool.py:113-119 | torch_geometric/nn/pool/topk_pool.py:130-136 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) torch_geometric/profile/profiler.py:344 — torch_geometric/profile/profiler.py:344-351 | torch_geometric/profile/profiler.py:360-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) torch_geometric/transforms/polar.py:38 — torch_geometric/transforms/polar.py:38-44 | torch_geometric/transforms/spherical.py:38-44 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/transforms/spherical.py:49` calls `acos`, `view` and `torch_geometric/transforms/polar.py:49` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 2) torch_geometric/utils/_subgraph.py:216 — torch_geometric/utils/_subgraph.py:216-222 | torch_geometric/utils/_subgraph.py:224-230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) torch_geometric/datasets/graph_generator/base.py:17 — torch_geometric/datasets/graph_generator/base.py:17-23 | torch_geometric/datasets/motif_generator/base.py:16-22 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) torch_geometric/datasets/aminer.py:105 — torch_geometric/datasets/aminer.py:105-111 | torch_geometric/datasets/aminer.py:117-123 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) torch_geometric/datasets/shrec2016.py:120 — torch_geometric/datasets/shrec2016.py:120-126 | torch_geometric/datasets/shrec2016.py:133-139 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) torch_geometric/datasets/webkb.py:111 — torch_geometric/datasets/webkb.py:111-117 | torch_geometric/datasets/wikipedia_network.py:113-119 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) REDACTED:3167 — REDACTED:3167-3173 | REDACTED:3180-3186 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) examples/colors_topk_pool.py:54 — examples/colors_topk_pool.py:54-60 | examples/triangles_sag_pool.py:60-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) examples/jit/gat.py:39 — examples/jit/gat.py:39-45 | examples/tensorboard_logging.py:42-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (7 lines × 2) examples/point_transformer_classification.py:106 — examples/point_transformer_classification.py:106-112 | examples/point_transformer_segmentation.py:82-88 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (7 lines × 2) examples/rgcn_link_pred.py:148 — examples/rgcn_link_pred.py:148-154 | examples/rgcn_link_pred.py:167-173 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) examples/dir_gnn.py:68 — examples/dir_gnn.py:68-74 | examples/jit/gcn.py:42-48 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D29 · Static Analysis (SAST) · REDACTED · ×23
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×19
  • Duplicated block (10 lines × 2) torch_geometric/data/storage.py:433 — torch_geometric/data/storage.py:433-442 | torch_geometric/data/storage.py:586-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) torch_geometric/datasets/geometry.py:113 — torch_geometric/datasets/geometry.py:113-122 | torch_geometric/datasets/modelnet.py:141-150 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) torch_geometric/datasets/movie_lens_100k.py:142 — torch_geometric/datasets/movie_lens_100k.py:142-151 | torch_geometric/datasets/movie_lens_100k.py:165-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) torch_geometric/datasets/omdb.py:80 — torch_geometric/datasets/omdb.py:80-89 | REDACTED:284-293 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) torch_geometric/index.py:754 — torch_geometric/index.py:754-763 | torch_geometric/index.py:822-831 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/index.py:754` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:2787 — REDACTED:2787-2796 | REDACTED:2826-2835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) REDACTED:3788 — REDACTED:3788-3797 | REDACTED:4056-4065 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) torch_geometric/nn/conv/fa_conv.py:222 — torch_geometric/nn/conv/fa_conv.py:222-231 | torch_geometric/nn/conv/rgat_conv.py:362-371 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) torch_geometric/nn/conv/feast_conv.py:84 — torch_geometric/nn/conv/feast_conv.py:84-93 | torch_geometric/nn/conv/ppf_conv.py:113-122 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) torch_geometric/nn/conv/nn_conv.py:108 — torch_geometric/nn/conv/nn_conv.py:108-117 | torch_geometric/nn/conv/spline_conv.py:139-148 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) torch_geometric/nn/conv/point_conv.py:91 — torch_geometric/nn/conv/point_conv.py:91-100 | torch_geometric/nn/conv/point_transformer_conv.py:125-134 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10 lines × 2) torch_geometric/utils/sparse.py:656 — torch_geometric/utils/sparse.py:656-665 | torch_geometric/utils/sparse.py:677-686 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) torch_geometric/edge_index.py:1352 — torch_geometric/edge_index.py:1352-1361 | torch_geometric/index.py:492-501 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note first that the copies are not typed on the same thing: the declarations holding them bind `tensor` to `EdgeIndex` in one and `Index` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (10 lines × 2) examples/compile/gin.py:33 — examples/compile/gin.py:33-42 | examples/mutag_gin.py:50-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) examples/hetero/bipartite_sage_unsup.py:174 — examples/hetero/bipartite_sage_unsup.py:174-183 | examples/multi_gpu/taobao.py:88-97 — before extracting anything, compare `examples/hetero/bipartite_sage_unsup.py` and `examples/multi_gpu/taobao.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (10 lines × 2) REDACTED:639 — REDACTED:639-649 | REDACTED:692-701 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) examples/multi_gpu/distributed_batching.py:122 — examples/multi_gpu/distributed_batching.py:122-131 | examples/multi_gpu/distributed_batching.py:133-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) examples/multi_gpu/taobao.py:115 — examples/multi_gpu/taobao.py:115-124 | examples/multi_gpu/taobao.py:128-137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/multi_gpu/taobao.py:115` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) examples/rgcn_link_pred.py:138 — examples/rgcn_link_pred.py:138-147 | examples/rgcn_link_pred.py:157-166 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×16
  • Duplicated block (9 lines × 2) torch_geometric/data/hetero_data.py:466 — torch_geometric/data/hetero_data.py:466-474 | torch_geometric/data/hetero_data.py:476-484 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/data/hetero_data.py:466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) REDACTED:120 — REDACTED:120-128 | REDACTED:287-296 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:120` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) torch_geometric/datasets/dblp.py:134 — torch_geometric/datasets/dblp.py:134-142 | torch_geometric/datasets/imdb.py:86-94 — before extracting anything, compare `torch_geometric/datasets/dblp.py` and `torch_geometric/datasets/imdb.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) torch_geometric/datasets/entities.py:187 — torch_geometric/datasets/entities.py:187-195 | torch_geometric/datasets/entities.py:197-205 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) torch_geometric/edge_index.py:142 — torch_geometric/edge_index.py:142-150 | torch_geometric/index.py:77-85 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `self` to `'EdgeIndex'` in one and `'Index'` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (9 lines × 2) torch_geometric/llm/models/g_retriever.py:218 — torch_geometric/llm/models/g_retriever.py:218-227 | torch_geometric/llm/models/molecule_gpt.py:188-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) torch_geometric/nn/aggr/fused.py:88 — torch_geometric/nn/aggr/fused.py:88-96 | torch_geometric/nn/aggr/multi.py:52-60 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) torch_geometric/nn/conv/edge_conv.py:123 — torch_geometric/nn/conv/edge_conv.py:123-131 | torch_geometric/nn/conv/gravnet_conv.py:95-103 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) torch_geometric/nn/conv/sg_conv.py:83 — torch_geometric/nn/conv/sg_conv.py:83-91 | torch_geometric/nn/conv/ssg_conv.py:92-100 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) torch_geometric/nn/kge/complex.py:82 — torch_geometric/nn/kge/complex.py:82-90 | torch_geometric/nn/kge/rotate.py:91-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (9 lines × 2) torch_geometric/nn/models/dimenet.py:195 — torch_geometric/nn/models/dimenet.py:195-203 | torch_geometric/nn/models/dimenet.py:273-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) torch_geometric/nn/to_hetero_transformer.py:340 — torch_geometric/nn/to_hetero_transformer.py:340-348 | torch_geometric/nn/to_hetero_with_bases_transformer.py:284-292 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/to_hetero_transformer.py:340` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) torch_geometric/utils/sparse.py:572 — torch_geometric/utils/sparse.py:572-580 | torch_geometric/utils/sparse.py:611-619 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) torch_geometric/nn/kge/distmult.py:74 — torch_geometric/nn/kge/distmult.py:74-82 | torch_geometric/nn/kge/transe.py:91-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) examples/colors_topk_pool.py:88 — examples/colors_topk_pool.py:88-96 | examples/triangles_sag_pool.py:91-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) examples/explain/captum_explainer.py:18 — examples/explain/captum_explainer.py:18-26 | examples/explain/gnn_explainer.py:18-26 — before extracting anything, compare `examples/explain/captum_explainer.py` and `examples/explain/gnn_explainer.py` as WHOLE FILES: 88% of the shorter file's 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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×15
  • Duplicated block (8 lines × 2) REDACTED:96 — REDACTED:96-104 | torch_geometric/datasets/brca_tgca.py:103-110 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) torch_geometric/datasets/email_eu_core.py:74 — torch_geometric/datasets/email_eu_core.py:74-81 | torch_geometric/datasets/polblogs.py:89-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) torch_geometric/datasets/graphland.py:450 — torch_geometric/datasets/graphland.py:450-457 | torch_geometric/datasets/graphland.py:547-554 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) torch_geometric/llm/models/protein_mpnn.py:48 — torch_geometric/llm/models/protein_mpnn.py:48-55 | torch_geometric/llm/models/protein_mpnn.py:112-119 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) torch_geometric/llm/models/protein_mpnn.py:57 — torch_geometric/llm/models/protein_mpnn.py:57-64 | torch_geometric/llm/models/protein_mpnn.py:114-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/llm/models/protein_mpnn.py:57` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/llm/models/protein_mpnn.py:65` calls `Dropout` and `torch_geometric/llm/models/protein_mpnn.py:122` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (8 lines × 2) torch_geometric/nn/conv/gin_conv.py:58 — torch_geometric/nn/conv/gin_conv.py:58-65 | torch_geometric/nn/conv/gin_conv.py:146-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note first that the copies are not typed on the same thing: the declarations holding them bind `nn` to `Callable` in one and `torch.nn.Module` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (8 lines × 2) torch_geometric/nn/models/basic_gnn.py:259 — torch_geometric/nn/models/basic_gnn.py:259-266 | torch_geometric/nn/models/mlp.py:234-241 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) torch_geometric/nn/models/gpse.py:778 — torch_geometric/nn/models/gpse.py:778-785 | torch_geometric/nn/models/gpse.py:876-883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/models/gpse.py:778` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) torch_geometric/nn/models/signed_gcn.py:195 — torch_geometric/nn/models/signed_gcn.py:195-202 | torch_geometric/nn/models/signed_gcn.py:208-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) torch_geometric/nn/pool/avg_pool.py:86 — torch_geometric/nn/pool/avg_pool.py:86-93 | torch_geometric/nn/pool/max_pool.py:90-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 2) torch_geometric/transforms/add_metapaths.py:124 — torch_geometric/transforms/add_metapaths.py:124-131 | torch_geometric/transforms/add_metapaths.py:253-260 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) torch_geometric/utils/sparse.py:595 — torch_geometric/utils/sparse.py:595-602 | torch_geometric/utils/sparse.py:662-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/utils/sparse.py:595` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) torch_geometric/nn/conv/point_conv.py:67 — torch_geometric/nn/conv/point_conv.py:67-74 | torch_geometric/nn/conv/ppf_conv.py:85-92 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) REDACTED:46 — REDACTED:46-53 | REDACTED:84-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) REDACTED:119 — REDACTED:119-126 | REDACTED:146-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×14
  • Duplicated block (11 lines × 2) torch_geometric/data/storage.py:500 — torch_geometric/data/storage.py:500-510 | torch_geometric/data/storage.py:791-801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) torch_geometric/data/storage.py:508 — torch_geometric/data/storage.py:508-518 | torch_geometric/data/storage.py:656-666 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) torch_geometric/data/storage.py:648 — torch_geometric/data/storage.py:648-658 | torch_geometric/data/storage.py:841-851 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) REDACTED:185 — REDACTED:185-195 | torch_geometric/datasets/mnist_superpixels.py:87-97 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) torch_geometric/edge_index.py:1866 — torch_geometric/edge_index.py:1866-1876 | torch_geometric/edge_index.py:1882-1892 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:99 — REDACTED:99-109 | REDACTED:226-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:99` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) torch_geometric/index.py:704 — torch_geometric/index.py:704-714 | torch_geometric/index.py:783-793 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/index.py:704` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/index.py:795` calls `isinstance` and `torch_geometric/index.py:716` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (11 lines × 2) REDACTED:2857 — REDACTED:2857-2867 | REDACTED:2933-2944 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) torch_geometric/nn/module_dict.py:29 — torch_geometric/nn/module_dict.py:29-39 | torch_geometric/nn/parameter_dict.py:30-40 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) torch_geometric/nn/pool/__init__.py:188 — torch_geometric/nn/pool/__init__.py:188-198 | torch_geometric/nn/pool/__init__.py:320-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) torch_geometric/nn/to_hetero_transformer.py:302 — torch_geometric/nn/to_hetero_transformer.py:302-312 | torch_geometric/nn/to_hetero_transformer.py:315-325 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) examples/distributed/graphlearn_for_pytorch/partition_ogbn_dataset.py:46 — examples/distributed/graphlearn_for_pytorch/partition_ogbn_dataset.py:46-56 | examples/distributed/graphlearn_for_pytorch/partition_ogbn_dataset.py:60-70 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/distributed/graphlearn_for_pytorch/partition_ogbn_dataset.py:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) examples/film.py:60 — examples/film.py:60-70 | examples/jit/film.py:56-66 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (11 lines × 2) REDACTED:153 — REDACTED:153-163 | REDACTED:238-248 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
X17 · Uncapped recursion over a caller-supplied document · Recursive walk over a caller-supplied document has no depth cap · ×13
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/config_store.py:168 — `map_annotation` is public and takes `annotation: Any` from its caller, and it calls itself at line 168 (`map_annotation`) with a piece of `annotation` — and nowhere in `map_annotation` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `map_annotation` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/device.py:35 — `device` is public and takes `device: Any` from its caller, and it calls itself at line 35 (`device`) with a piece of `device` — and nowhere in `device` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `device` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/inspector.py:475 — `type_repr` is public and takes `obj: Any` from its caller, and it calls itself at line 475 (`type_repr`) with a piece of `obj` — and nowhere in `type_repr` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `type_repr` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/profile/benchmark.py:15 — `require_grad` is public and takes `x: Any` from its caller, and it calls itself at line 15 (`require_grad`) with a piece of `x` (and at line 17, line 19) — and nowhere in `require_grad` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `require_grad` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/nn/inits.py:14 — `uniform` is public and takes `value: Any` from its caller, and it calls itself at line 14 (`uniform`) with a piece of `value` (and at line 16) — and nowhere in `uniform` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `uniform` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/nn/inits.py:25 — `kaiming_uniform` is public and takes `value: Any` from its caller, and it calls itself at line 25 (`kaiming_uniform`) with a piece of `value` (and at line 27) — and nowhere in `kaiming_uniform` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `kaiming_uniform` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/nn/inits.py:36 — `glorot` is public and takes `value: Any` from its caller, and it calls itself at line 36 (`glorot`) with a piece of `value` (and at line 38) — and nowhere in `glorot` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `glorot` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/nn/inits.py:53 — `constant` is public and takes `value: Any` from its caller, and it calls itself at line 53 (`constant`) with a piece of `value` (and at line 55) — and nowhere in `constant` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `constant` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/nn/inits.py:71 — `normal` is public and takes `value: Any` from its caller, and it calls itself at line 71 (`normal`) with a piece of `value` (and at line 73) — and nowhere in `normal` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `normal` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/nn/inits.py:81 — `reset` is public and takes `value: Any` from its caller, and it calls itself at line 81 (`reset`) with a piece of `value` — and nowhere in `reset` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `reset` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/loader/cache.py:12 — `to_device` is public and takes `inputs: Any` from its caller, and it calls itself at line 12 (`to_device`) with a piece of `inputs` (and at line 14, line 16) — and nowhere in `to_device` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `to_device` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/loader/prefetch.py:73 — `non_blocking_transfer` is public and takes `batch: Any` from its caller, and it calls itself at line 73 (`self.non_blocking_transfer`) with a piece of `batch` (and at line 75) — and nowhere in `non_blocking_transfer` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `non_blocking_transfer` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
  • Recursive walk over a caller-supplied document has no depth cap torch_geometric/data/separate.py:117 — `separate` is public, takes a document from its caller (line 15) and hands it to `_separate`, which calls itself at line 117 (`_separate`) with a piece of `values` (and at line 142) — and nowhere in `_separate` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_separate` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
X3 · Exception handling · Swallowed exception (empty catch) · ×11
  • Swallowed exception (empty catch) torch_geometric/_onnx.py:130 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/_onnx.py:164 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/_onnx.py:186 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/utils/convert.py:279 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/profile/utils.py:80 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/profile/utils.py:99 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/llm/models/llm_judge.py:144 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/llm/models/llm_judge.py:155 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:1501 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/llm/models/txt2kg.py:416 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) torch_geometric/data/storage.py:899 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×10
  • Duplicated block (13 lines × 2) graphgym/custom_graphgym/layer/example.py:20 — graphgym/custom_graphgym/layer/example.py:20-32 | graphgym/custom_graphgym/layer/example.py:60-72 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) torch_geometric/data/data.py:1162 — torch_geometric/data/data.py:1162-1174 | torch_geometric/data/hetero_data.py:1167-1179 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) torch_geometric/explain/algorithm/attention_explainer.py:292 — torch_geometric/explain/algorithm/attention_explainer.py:292-304 | torch_geometric/explain/algorithm/pg_explainer.py:340-352 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) torch_geometric/nn/conv/gat_conv.py:342 — torch_geometric/nn/conv/gat_conv.py:342-354 | torch_geometric/nn/conv/gatv2_conv.py:313-325 — before extracting anything, compare `torch_geometric/nn/conv/gat_conv.py` and `torch_geometric/nn/conv/gatv2_conv.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/conv/gat_conv.py:341` calls `min` and `torch_geometric/nn/conv/gatv2_conv.py:312` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) torch_geometric/nn/conv/rgcn_conv.py:183 — torch_geometric/nn/conv/rgcn_conv.py:183-195 | torch_geometric/nn/conv/rgcn_conv.py:311-323 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) torch_geometric/nn/models/polynormer.py:82 — torch_geometric/nn/models/polynormer.py:82-94 | torch_geometric/nn/models/polynormer.py:101-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) torch_geometric/nn/pool/sag_pool.py:129 — torch_geometric/nn/pool/sag_pool.py:129-141 | torch_geometric/nn/pool/topk_pool.py:115-127 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/pool/sag_pool.py:126` calls `view`, `dim`, `gnn` and `torch_geometric/nn/pool/topk_pool.py:114` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) examples/colors_topk_pool.py:72 — examples/colors_topk_pool.py:72-84 | examples/triangles_sag_pool.py:75-87 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) examples/hetero/bipartite_sage_unsup.py:228 — examples/hetero/bipartite_sage_unsup.py:228-240 | examples/multi_gpu/taobao.py:174-186 — before extracting anything, compare `examples/hetero/bipartite_sage_unsup.py` and `examples/multi_gpu/taobao.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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. Read the line range as the matched WINDOW rather than a finished unit: at `examples/hetero/bipartite_sage_unsup.py:228` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (13 lines × 2) examples/quiver/multi_gpu_quiver.py:50 — examples/quiver/multi_gpu_quiver.py:50-62 | examples/quiver/single_gpu_quiver.py:78-90 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D17 · Explicit Debt · HackComment · ×9
  • HackComment torch_geometric/nn/models/gpse.py:884 — # HACK: We need to reset virtual node features to zeros to match the — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/loader/link_loader.py:238 — # Hack to detect whether we are in a distributed setting. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/loader/link_loader.py:288 — # Hack to detect whether we are in a distributed setting. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/loader/node_loader.py:173 — # Hack to detect whether we are in a distributed setting. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/loader/node_loader.py:217 — # Hack to detect whether we are in a distributed setting. — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/llm/utils/backend_utils.py:168 — # HACK Added so that the subset of nodes and edges selected can be tracked — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/llm/utils/backend_utils.py:176 — # HACK: track subset of selected nodes/edges — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/llm/utils/graph_store.py:133 — # HACK — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
  • HackComment torch_geometric/llm/utils/graph_store.py:139 — # HACKY — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D31 · IaC & Container Security · Medium IaC · ×9
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×9
  • Duplicated block (16 lines × 2) torch_geometric/data/data.py:1211 — torch_geometric/data/data.py:1211-1226 | torch_geometric/data/hetero_data.py:1225-1241 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note first that the copies are not typed on the same thing: the declarations holding them bind `node` to `int` in one and `Tuple[str, int]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) torch_geometric/datasets/instruct_mol_dataset.py:100 — torch_geometric/datasets/instruct_mol_dataset.py:100-115 | torch_geometric/datasets/molecule_gpt_dataset.py:456-471 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) torch_geometric/datasets/movie_lens_100k.py:147 — torch_geometric/datasets/movie_lens_100k.py:147-162 | torch_geometric/datasets/movie_lens_1m.py:149-164 — before extracting anything, compare `torch_geometric/datasets/movie_lens_100k.py` and `torch_geometric/datasets/movie_lens_1m.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/datasets/movie_lens_100k.py:147` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) torch_geometric/distributed/partition.py:160 — torch_geometric/distributed/partition.py:160-175 | torch_geometric/distributed/partition.py:274-289 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) torch_geometric/edge_index.py:262 — torch_geometric/edge_index.py:262-277 | torch_geometric/index.py:162-177 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/edge_index.py:278` calls `sparse_size` and `torch_geometric/index.py:178` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (16 lines × 2) torch_geometric/edge_index.py:1590 — torch_geometric/edge_index.py:1590-1605 | torch_geometric/edge_index.py:1687-1702 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/edge_index.py:1590` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) torch_geometric/nn/attention/performer.py:148 — torch_geometric/nn/attention/performer.py:148-163 | torch_geometric/nn/attention/sgformer.py:43-58 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/attention/performer.py:148` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) torch_geometric/nn/to_hetero_transformer.py:154 — torch_geometric/nn/to_hetero_transformer.py:154-169 | torch_geometric/nn/to_hetero_with_bases_transformer.py:162-177 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (16 lines × 2) torch_geometric/sampler/neighbor_sampler.py:454 — torch_geometric/sampler/neighbor_sampler.py:454-469 | torch_geometric/sampler/neighbor_sampler.py:559-574 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/sampler/neighbor_sampler.py:454` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D3 · God Classes · TooManyMethods · ×6
  • TooManyMethods: BaseData torch_geometric/data/data.py:48 — TooManyMethods — 55 methods. The bar is 30 methods; this is 25 over it, 1.83× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HeteroData torch_geometric/data/hetero_data.py:43 — TooManyMethods — 48 methods. The bar is 30 methods; this is 18 over it, 1.60× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: BaseStorage torch_geometric/data/storage.py:54 — TooManyMethods — 41 methods. The bar is 30 methods; this is 11 over it, 1.37× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: EdgeIndex torch_geometric/edge_index.py:153 — TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Data torch_geometric/data/data.py:472 — TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MessagePassing torch_geometric/nn/conv/message_passing.py:39 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D36 · Supply-chain Provenance & Signing · REDACTED · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D6 · Cohesion (LCOM4) · Low cohesion · ×6
  • Low cohesion: HeteroData (LCOM4 16) torch_geometric/data/hetero_data.py:43 — HeteroData's methods fall into 16 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 16 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: BaseData (LCOM4 10) torch_geometric/data/data.py:48 — BaseData's methods fall into 10 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 10 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: TemporalData (LCOM4 9) torch_geometric/data/temporal.py:26 — TemporalData's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Dataset (LCOM4 7) torch_geometric/data/dataset.py:30 — Dataset's methods fall into 7 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 7 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Model (LCOM4 4) examples/pytorch_lightning/gin.py:14 — Model's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: LoggerCallback (LCOM4 4) torch_geometric/graphgym/logger.py:247 — LoggerCallback's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D35 · Change Coupling · Change coupling · ×5
  • Change coupling: cartesian.py ↔ spherical.py torch_geometric/transforms/cartesian.py:1 — `torch_geometric/transforms/cartesian.py` and `torch_geometric/transforms/spherical.py` change together 67% of the time (8 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `e038f094` Support `mypy` in `torch_geometric.transforms` [1/n] (#8614); `5c227f24` clearer spatial relation transforms; `8313ae15` doctests — run `git show` on any of them.
  • Change coupling: knn_graph.py ↔ radius_graph.py torch_geometric/transforms/knn_graph.py:1 — `torch_geometric/transforms/knn_graph.py` and `torch_geometric/transforms/radius_graph.py` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `331e5d1a` Support `mypy` in `torch_geometric.transforms` [2/n] (#8616); `2d267457` Re-structure `torch_geometric.transforms` documentation (#6443); `b9b1c1c1` `@functional_transform` for PyG `transforms` (#4371) — run `git show` on any of them.
  • Change coupling: _coalesce.py ↔ _sort_edge_index.py torch_geometric/utils/_coalesce.py:1 — `torch_geometric/utils/_coalesce.py` and `torch_geometric/utils/_sort_edge_index.py` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `ccda397f` Account for integer overflows in `sort_edge_index` (#8812); `e0f7920d` Expose `EdgeIndex` in `Planetoid` (#8641); `447f5a5e` `mypy` support in `torch_geometric.utils` [4/n] (#8558) — run `git show` on any of them.
  • Change coupling: collate.py ↔ separate.py torch_geometric/data/collate.py:1 — `torch_geometric/data/collate.py` and `torch_geometric/data/separate.py` change together 61% of the time (11 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 11 shared commits counted here, the most recent 3 are `8eeb27ea` Integrate `Index` into common data utils (#9293); `0e526ab5` Support `mypy` in `torch_geometric.data` [3/n] (#8673); `7b7fdc14` Add `TensorFrame` support in `DataLoader` (#8151) — run `git show` on any of them.
  • Change coupling: inference_benchmark.py ↔ training_benchmark.py benchmark/inference/inference_benchmark.py:1 — `benchmark/inference/inference_benchmark.py` and `benchmark/training/training_benchmark.py` change together 59% of the time (13 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 13 shared commits counted here, the most recent 3 are `1a8debf5` Explicitly chain exceptions (#10242); `f8c6beaa` [FutureWarning] Fixing warning generated by the use of `torch.cuda.am…; `9236cb70` Save PyTorch profile data to CSV (#7114) — run `git show` on any of them.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) torch_geometric/distributed/utils.py:44 — torch_geometric/distributed/utils.py:44-55 | torch_geometric/distributed/utils.py:71-82 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) torch_geometric/nn/conv/gat_conv.py:146 — torch_geometric/nn/conv/gat_conv.py:146-157 | torch_geometric/nn/conv/gatv2_conv.py:149-160 — before extracting anything, compare `torch_geometric/nn/conv/gat_conv.py` and `torch_geometric/nn/conv/gatv2_conv.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/conv/gat_conv.py:145` calls `setdefault` and `torch_geometric/nn/conv/gatv2_conv.py:148` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (12 lines × 2) torch_geometric/sampler/neighbor_sampler.py:505 — torch_geometric/sampler/neighbor_sampler.py:505-516 | torch_geometric/sampler/neighbor_sampler.py:599-610 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/sampler/neighbor_sampler.py:505` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) examples/dgcnn_segmentation.py:60 — examples/dgcnn_segmentation.py:60-71 | examples/pointnet2_segmentation.py:89-100 — before extracting anything, compare `examples/dgcnn_segmentation.py` and `examples/pointnet2_segmentation.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 61 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) examples/multi_gpu/papers100m_gcn.py:101 — examples/multi_gpu/papers100m_gcn.py:101-112 | examples/multi_gpu/papers100m_gcn.py:116-127 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×5
  • Duplicated block (6 lines × 3) torch_geometric/datasets/actor.py:97 — torch_geometric/datasets/actor.py:97-102 | torch_geometric/datasets/webkb.py:118-123 | torch_geometric/datasets/wikipedia_network.py:120-125 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) torch_geometric/datasets/dblp.py:141 — torch_geometric/datasets/dblp.py:141-146 | torch_geometric/datasets/imdb.py:92-97 | torch_geometric/datasets/last_fm.py:99-104 — before extracting anything, compare `torch_geometric/datasets/dblp.py` and `torch_geometric/datasets/imdb.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 3) torch_geometric/datasets/opf.py:169 — torch_geometric/datasets/opf.py:169-174 | torch_geometric/datasets/opf.py:175-180 | torch_geometric/datasets/opf.py:182-187 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/datasets/opf.py:169` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/datasets/opf.py:180` calls `extract_edge_index` and `torch_geometric/datasets/opf.py:174` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (6 lines × 3) examples/explain/captum_explainer_hetero_link.py:57 — examples/explain/captum_explainer_hetero_link.py:57-62 | examples/hetero/hetero_link_pred.py:74-79 | examples/hetero/temporal_link_pred.py:82-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (6 lines × 3) examples/hetero/bipartite_sage.py:99 — examples/hetero/bipartite_sage.py:99-104 | examples/hetero/bipartite_sage_unsup.py:156-161 | examples/multi_gpu/taobao.py:70-75 — before extracting anything, compare `examples/hetero/bipartite_sage_unsup.py` and `examples/multi_gpu/taobao.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) torch_geometric/nn/models/deep_graph_infomax.py:104 — torch_geometric/nn/models/deep_graph_infomax.py:104-111 | torch_geometric/nn/models/metapath2vec.py:231-238 | torch_geometric/nn/models/node2vec.py:171-178 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (8 lines × 3) torch_geometric/nn/to_hetero_transformer.py:338 — torch_geometric/nn/to_hetero_transformer.py:338-345 | torch_geometric/nn/to_hetero_transformer.py:409-416 | torch_geometric/nn/to_hetero_with_bases_transformer.py:282-289 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/to_hetero_transformer.py:338` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) examples/hetero/han_imdb.py:52 — examples/hetero/han_imdb.py:52-59 | examples/hetero/hetero_conv_dblp.py:55-62 | examples/hetero/hgt_dblp.py:61-68 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (8 lines × 3) examples/mnist_graclus.py:87 — examples/mnist_graclus.py:87-94 | examples/mnist_nn_conv.py:100-107 | examples/mnist_voxel_grid.py:82-89 — before extracting anything, compare `examples/mnist_graclus.py` and `examples/mnist_nn_conv.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D17 · Explicit Debt · FixmeComment · ×3
  • FixmeComment REDACTED:214 — # FIXME Needs to merge node attrs and edge attrs? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment torch_geometric/io/fs.py:181 — # FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • FixmeComment test/io/test_fs.py:13 — # FIXME — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D3 · God Classes · FileTooLong · ×3
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2816 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 2316 over it, 5.63× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: torch_geometric/edge_index.py torch_geometric/edge_index.py — FileTooLong — 962 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 462 over it, 1.92× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: loader/ibmb_loader.py torch_geometric/loader/ibmb_loader.py — FileTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 23 over it, 1.05× 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.
D4 · Code Duplication · Members sharing a duplicated core (7 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (7 members, 50+ identical tokens) torch_geometric/transforms/cartesian.py:40 — torch_geometric/transforms/cartesian.py:40-60 | torch_geometric/transforms/distance.py:40-58 | torch_geometric/transforms/local_cartesian.py:37-58 | torch_geometric/transforms/point_pair_features.py:32-50 | torch_geometric/transforms/polar.py:37-61 | torch_geometric/transforms/spherical.py:37-64 | torch_geometric/transforms/target_indegree.py:37-54 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) examples/agnn.py:48 — examples/agnn.py:48-54 | examples/arma.py:57-63 | examples/graph_unet.py:47-53 | examples/jit/gat.py:50-56 | examples/sgc.py:51-57 | examples/tagcn.py:50-56 | examples/tensorboard_logging.py:53-59 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
  • Members sharing a duplicated core (7 members, 50+ identical tokens) examples/compile/gcn.py:70 — examples/compile/gcn.py:70-76 | examples/dir_gnn.py:79-85 | examples/gat.py:71-77 | examples/gcn.py:89-95 | examples/jit/gcn.py:53-59 | examples/mixhop.py:72-78 | examples/pmlp.py:40-47 — These 7 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 7 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 7 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (5 members, 50+ identical tokens) torch_geometric/datasets/bitcoin_otc.py:90 — torch_geometric/datasets/bitcoin_otc.py:90-130 | torch_geometric/datasets/dynamic_faust.py:118-144 | torch_geometric/datasets/malnet_tiny.py:97-127 | REDACTED:81-145 | torch_geometric/datasets/qm7.py:74-96 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) torch_geometric/datasets/git_mol_dataset.py:100 — torch_geometric/datasets/git_mol_dataset.py:100-263 | torch_geometric/datasets/instruct_mol_dataset.py:62-134 | torch_geometric/datasets/molecule_gpt_dataset.py:319-492 | torch_geometric/datasets/qm9.py:201-320 | torch_geometric/datasets/upfd.py:132-168 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
  • Members sharing a duplicated core (5 members, 50+ identical tokens) examples/cluster_gcn_ppi.py:72 — examples/cluster_gcn_ppi.py:72-81 | examples/film.py:75-84 | examples/geniepath.py:132-142 | examples/jit/film.py:71-80 | examples/ppi.py:59-68 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×3
  • Duplicated block (19 lines × 2) REDACTED:258 — REDACTED:258-276 | torch_geometric/datasets/willow_object_class.py:153-171 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:258` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) torch_geometric/nn/conv/gat_conv.py:184 — torch_geometric/nn/conv/gat_conv.py:184-202 | torch_geometric/nn/conv/gatv2_conv.py:189-207 — before extracting anything, compare `torch_geometric/nn/conv/gat_conv.py` and `torch_geometric/nn/conv/gatv2_conv.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/conv/gat_conv.py:181` calls `register_parameter` and `torch_geometric/nn/conv/gatv2_conv.py:186` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (19 lines × 2) torch_geometric/nn/models/correct_and_smooth.py:83 — torch_geometric/nn/models/correct_and_smooth.py:83-101 | torch_geometric/nn/models/correct_and_smooth.py:128-146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×3
  • Duplicated block (18 lines × 2) torch_geometric/data/storage.py:799 — torch_geometric/data/storage.py:799-816 | torch_geometric/data/storage.py:849-866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (18 lines × 2) torch_geometric/datasets/graphland.py:488 — torch_geometric/datasets/graphland.py:488-505 | torch_geometric/datasets/graphland.py:588-605 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) torch_geometric/io/tu.py:27 — torch_geometric/io/tu.py:27-44 | torch_geometric/io/tu.py:46-63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×3
  • Duplicated block (14 lines × 2) torch_geometric/datasets/movie_lens_100k.py:133 — torch_geometric/datasets/movie_lens_100k.py:133-146 | torch_geometric/datasets/movie_lens_1m.py:133-146 — before extracting anything, compare `torch_geometric/datasets/movie_lens_100k.py` and `torch_geometric/datasets/movie_lens_1m.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 36 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/datasets/movie_lens_100k.py:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) torch_geometric/graphgym/contrib/layer/generalconv.py:45 — torch_geometric/graphgym/contrib/layer/generalconv.py:45-58 | torch_geometric/graphgym/contrib/layer/generalconv.py:161-174 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (14 lines × 2) torch_geometric/nn/aggr/fused.py:145 — torch_geometric/nn/aggr/fused.py:145-158 | torch_geometric/nn/aggr/fused.py:169-182 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×3
  • Duplicated block (10–11 lines × 2) torch_geometric/llm/models/molecule_gpt.py:143 — torch_geometric/llm/models/molecule_gpt.py:143-152 | torch_geometric/llm/models/molecule_gpt.py:183-193 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) torch_geometric/nn/models/dimenet.py:641 — torch_geometric/nn/models/dimenet.py:641-650 | torch_geometric/nn/models/dimenet.py:927-937 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) torch_geometric/utils/_subgraph.py:138 — torch_geometric/utils/_subgraph.py:138-148 | torch_geometric/utils/_subgraph.py:227-236 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/utils/_subgraph.py:138` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×3
  • Duplicated block (10 lines × 3) REDACTED:119 — REDACTED:119-128 | REDACTED:228-238 | REDACTED:159-168 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) torch_geometric/metrics/link_pred.py:228 — torch_geometric/metrics/link_pred.py:228-237 | torch_geometric/metrics/link_pred.py:691-700 | torch_geometric/metrics/link_pred.py:854-863 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/metrics/link_pred.py:704` calls `register_buffer` and `torch_geometric/metrics/link_pred.py:240` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (10 lines × 3) examples/dgcnn_segmentation.py:99 — examples/dgcnn_segmentation.py:99-108 | examples/point_transformer_segmentation.py:211-220 | examples/pointnet2_segmentation.py:128-137 — before extracting anything, compare `examples/dgcnn_segmentation.py` and `examples/point_transformer_segmentation.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×3
  • Duplicated block (5 lines × 4) torch_geometric/datasets/amazon_products.py:73 — torch_geometric/datasets/amazon_products.py:73-77 | torch_geometric/datasets/flickr.py:75-79 | torch_geometric/datasets/reddit2.py:83-87 | torch_geometric/datasets/yelp.py:75-79 — before extracting anything, compare `torch_geometric/datasets/flickr.py` and `torch_geometric/datasets/reddit2.py` as WHOLE FILES: 85% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 4) torch_geometric/nn/models/metapath2vec.py:209 — torch_geometric/nn/models/metapath2vec.py:209-213 | torch_geometric/nn/models/metapath2vec.py:220-224 | torch_geometric/nn/models/node2vec.py:141-145 | torch_geometric/nn/models/node2vec.py:152-156 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/models/node2vec.py:141` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 4) torch_geometric/graphgym/models/layer.py:185 — torch_geometric/graphgym/models/layer.py:185-189 | torch_geometric/graphgym/models/layer.py:260-264 | torch_geometric/nn/models/gpse.py:39-43 | torch_geometric/nn/models/gpse.py:210-214 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×2
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×2
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:103 — REDACTED:103-130 | REDACTED:174-241 | REDACTED:261-298 | REDACTED:135-173 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) torch_geometric/nn/conv/fa_conv.py:158 — torch_geometric/nn/conv/fa_conv.py:158-231 | torch_geometric/nn/conv/gat_conv.py:266-385 | torch_geometric/nn/conv/gatv2_conv.py:261-356 | torch_geometric/nn/conv/rgat_conv.py:325-371 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) torch_geometric/edge_index.py:1058 — torch_geometric/edge_index.py:1058-1079 | torch_geometric/edge_index.py:1099-1120 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/edge_index.py:1058` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (22 lines × 2) torch_geometric/nn/models/dimenet.py:606 — torch_geometric/nn/models/dimenet.py:606-627 | torch_geometric/nn/models/dimenet.py:883-904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/models/dimenet.py:606` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/nn/models/dimenet.py:905` calls `copy_` and `torch_geometric/nn/models/dimenet.py:628` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) torch_geometric/data/data.py:1140 — torch_geometric/data/data.py:1140-1159 | torch_geometric/data/hetero_data.py:1139-1158 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
  • Duplicated block (20 lines × 2) torch_geometric/nn/models/dimenet.py:651 — torch_geometric/nn/models/dimenet.py:651-670 | torch_geometric/nn/models/dimenet.py:938-957 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) torch_geometric/loader/link_loader.py:240 — torch_geometric/loader/link_loader.py:240-256 | torch_geometric/loader/node_loader.py:175-191 — before extracting anything, compare `torch_geometric/loader/link_loader.py` and `torch_geometric/loader/node_loader.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/loader/link_loader.py:240` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) examples/contrib/pgm_explainer_graph_classification.py:41 — examples/contrib/pgm_explainer_graph_classification.py:41-57 | examples/mnist_nn_conv.py:40-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×2
  • Duplicated block (11–12 lines × 2) torch_geometric/explain/algorithm/pg_explainer.py:156 — torch_geometric/explain/algorithm/pg_explainer.py:156-167 | torch_geometric/explain/algorithm/pg_explainer.py:271-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11–12 lines × 2) examples/multi_gpu/distributed_sampling_multinode.py:126 — examples/multi_gpu/distributed_sampling_multinode.py:126-137 | examples/quiver/multi_gpu_quiver.py:100-110 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `examples/multi_gpu/distributed_sampling_multinode.py:126` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 4) · ×2
  • Duplicated block (9 lines × 4) torch_geometric/nn/conv/fa_conv.py:221 — torch_geometric/nn/conv/fa_conv.py:221-229 | torch_geometric/nn/conv/gat_conv.py:375-383 | torch_geometric/nn/conv/gatv2_conv.py:346-354 | torch_geometric/nn/conv/rgat_conv.py:361-369 — before extracting anything, compare `torch_geometric/nn/conv/gat_conv.py` and `torch_geometric/nn/conv/gatv2_conv.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 4) examples/dgcnn_segmentation.py:101 — examples/dgcnn_segmentation.py:101-109 | examples/point_transformer_segmentation.py:213-221 | examples/pointnet2_segmentation.py:130-138 | examples/randlanet_segmentation.py:188-197 — before extracting anything, compare `examples/dgcnn_segmentation.py` and `examples/point_transformer_segmentation.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/randlanet_segmentation.py:188` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×2
  • Duplicated block (8–9 lines × 2) torch_geometric/datasets/dynamic_faust.py:88 — torch_geometric/datasets/dynamic_faust.py:88-96 | torch_geometric/datasets/tosca.py:74-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8–9 lines × 2) torch_geometric/distributed/dist_neighbor_sampler.py:654 — torch_geometric/distributed/dist_neighbor_sampler.py:654-662 | torch_geometric/sampler/neighbor_sampler.py:942-949 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×2
  • Duplicated block (8 lines × 4) torch_geometric/datasets/amazon_products.py:102 — torch_geometric/datasets/amazon_products.py:102-109 | torch_geometric/datasets/flickr.py:104-111 | torch_geometric/datasets/reddit2.py:112-119 | torch_geometric/datasets/yelp.py:104-111 — before extracting anything, compare `torch_geometric/datasets/flickr.py` and `torch_geometric/datasets/reddit2.py` as WHOLE FILES: 85% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 4) torch_geometric/nn/models/dimenet.py:642 — torch_geometric/nn/models/dimenet.py:642-649 | torch_geometric/nn/models/dimenet.py:653-660 | torch_geometric/nn/models/dimenet.py:928-935 | torch_geometric/nn/models/dimenet.py:941-948 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/nn/models/dimenet.py:640` calls `copy_` and `torch_geometric/nn/models/dimenet.py:651` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×2
  • Duplicated block (7 lines × 4) torch_geometric/datasets/bitcoin_otc.py:124 — torch_geometric/datasets/bitcoin_otc.py:124-130 | torch_geometric/datasets/dynamic_faust.py:138-144 | torch_geometric/datasets/malnet_tiny.py:120-126 | torch_geometric/datasets/qm7.py:90-96 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 4 call sites, so a change lands once.
  • Duplicated block (7 lines × 4) torch_geometric/nn/conv/appnp.py:94 — torch_geometric/nn/conv/appnp.py:94-100 | torch_geometric/nn/conv/dna_conv.py:283-289 | torch_geometric/nn/conv/fa_conv.py:181-187 | torch_geometric/nn/conv/gcn2_conv.py:120-126 — before extracting anything, compare `torch_geometric/nn/conv/appnp.py` and `torch_geometric/nn/conv/dna_conv.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/conv/appnp.py:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `torch_geometric/nn/conv/fa_conv.py:188` calls `has_value` and `torch_geometric/nn/conv/appnp.py:101` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) torch_geometric/datasets/dblp.py:154 — torch_geometric/datasets/dblp.py:154-160 | torch_geometric/datasets/imdb.py:104-110 | torch_geometric/datasets/last_fm.py:111-117 — before extracting anything, compare `torch_geometric/datasets/dblp.py` and `torch_geometric/datasets/imdb.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 3) examples/contrib/pgm_explainer_graph_classification.py:71 — examples/contrib/pgm_explainer_graph_classification.py:71-77 | examples/mnist_graclus.py:53-59 | examples/mnist_nn_conv.py:66-72 — before extracting anything, compare `examples/mnist_graclus.py` and `examples/mnist_nn_conv.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D1 · Cyclomatic Complexity · NeighborSampler.__init__ (cyclomatic 56) · ×1
  • NeighborSampler.__init__ (cyclomatic 56) torch_geometric/sampler/neighbor_sampler.py:44 — NeighborSampler.__init__ has cyclomatic complexity 56 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DistNeighborSampler.node_sample (cyclomatic 43) · ×1
  • DistNeighborSampler.node_sample (cyclomatic 43) torch_geometric/distributed/dist_neighbor_sampler.py:212 — DistNeighborSampler.node_sample has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · collate._collate (cyclomatic 39) · ×1
  • collate._collate (cyclomatic 39) torch_geometric/data/collate.py:149 — collate._collate has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · profiler._layer_trace (cyclomatic 37) · ×1
  • profiler._layer_trace (cyclomatic 37) torch_geometric/profile/profiler.py:149 — profiler._layer_trace has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DistNeighborSampler.edge_sample (cyclomatic 36) · ×1
  • DistNeighborSampler.edge_sample (cyclomatic 36) torch_geometric/distributed/dist_neighbor_sampler.py:512 — DistNeighborSampler.edge_sample has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MessagePassing.propagate (cyclomatic 36) · ×1
  • MessagePassing.propagate (cyclomatic 36) torch_geometric/nn/conv/message_passing.py:421 — MessagePassing.propagate has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · neighbor_sampler.edge_sample (cyclomatic 36) · ×1
  • neighbor_sampler.edge_sample (cyclomatic 36) torch_geometric/sampler/neighbor_sampler.py:821 — neighbor_sampler.edge_sample has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · convert.from_networkx (cyclomatic 33) · ×1
  • convert.from_networkx (cyclomatic 33) torch_geometric/utils/convert.py:193 — convert.from_networkx 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.
D1 · Cyclomatic Complexity · Data.to_heterogeneous (cyclomatic 32) · ×1
  • Data.to_heterogeneous (cyclomatic 32) torch_geometric/data/data.py:784 — Data.to_heterogeneous has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SamplerOutput.merge_with (cyclomatic 32) · ×1
  • SamplerOutput.merge_with (cyclomatic 32) torch_geometric/sampler/base.py:313 — SamplerOutput.merge_with has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeStorage.num_nodes (cyclomatic 31) · ×1
  • NodeStorage.num_nodes (cyclomatic 31) torch_geometric/data/storage.py:421 — NodeStorage.num_nodes has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _tree_decomposition.tree_decomposition (cyclomatic 31) · ×1
  • _tree_decomposition.tree_decomposition (cyclomatic 31) torch_geometric/utils/_tree_decomposition.py:35 — _tree_decomposition.tree_decomposition has cyclomatic complexity 31 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · config_store.to_dataclass (cyclomatic 30) · ×1
  • config_store.to_dataclass (cyclomatic 30) torch_geometric/config_store.py:196 — config_store.to_dataclass has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Partitioner.generate_partition (cyclomatic 30) · ×1
  • Partitioner.generate_partition (cyclomatic 30) torch_geometric/distributed/partition.py:121 — Partitioner.generate_partition has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EdgeIndex.__new__ (cyclomatic 30) · ×1
  • EdgeIndex.__new__ (cyclomatic 30) torch_geometric/edge_index.py:253 — EdgeIndex.__new__ has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · qa_gen.store_results (cyclomatic 28) · ×1
  • qa_gen.store_results (cyclomatic 28) REDACTED:4134 — qa_gen.store_results has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinkLoader.filter_fn (cyclomatic 28) · ×1
  • LinkLoader.filter_fn (cyclomatic 28) torch_geometric/loader/link_loader.py:219 — LinkLoader.filter_fn has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.validate_timeline_events (cyclomatic 27) · ×1
  • qa_gen.validate_timeline_events (cyclomatic 27) REDACTED:1529 — qa_gen.validate_timeline_events has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RGATConv.message (cyclomatic 27) · ×1
  • RGATConv.message (cyclomatic 27) torch_geometric/nn/conv/rgat_conv.py:373 — RGATConv.message has cyclomatic complexity 27 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · _spmm.spmm (cyclomatic 27) · ×1
  • _spmm.spmm (cyclomatic 27) torch_geometric/utils/_spmm.py:12 — _spmm.spmm has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NodeLoader.filter_fn (cyclomatic 26) · ×1
  • NodeLoader.filter_fn (cyclomatic 26) torch_geometric/loader/node_loader.py:154 — NodeLoader.filter_fn has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _coalesce.coalesce (cyclomatic 26) · ×1
  • _coalesce.coalesce (cyclomatic 26) torch_geometric/utils/_coalesce.py:70 — _coalesce.coalesce has cyclomatic complexity 26 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · HGBDataset.process (cyclomatic 25) · ×1
  • HGBDataset.process (cyclomatic 25) torch_geometric/datasets/hgb_dataset.py:96 — HGBDataset.process has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalFeatureStore.from_partition (cyclomatic 25) · ×1
  • LocalFeatureStore.from_partition (cyclomatic 25) torch_geometric/distributed/local_feature_store.py:400 — LocalFeatureStore.from_partition has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · fs.cp (cyclomatic 25) · ×1
  • fs.cp (cyclomatic 25) torch_geometric/io/fs.py:105 — fs.cp has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GATConv.forward (cyclomatic 25) · ×1
  • GATConv.forward (cyclomatic 25) torch_geometric/nn/conv/gat_conv.py:254 — GATConv.forward has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MessagePassing._collect (cyclomatic 25) · ×1
  • MessagePassing._collect (cyclomatic 25) torch_geometric/nn/conv/message_passing.py:335 — MessagePassing._collect has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Transformer.transform (cyclomatic 25) · ×1
  • Transformer.transform (cyclomatic 25) torch_geometric/nn/fx.py:114 — Transformer.transform has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MLP.__init__ (cyclomatic 25) · ×1
  • MLP.__init__ (cyclomatic 25) torch_geometric/nn/models/mlp.py:78 — MLP.__init__ has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NeighborSampler._sample (cyclomatic 25) · ×1
  • NeighborSampler._sample (cyclomatic 25) torch_geometric/sampler/neighbor_sampler.py:429 — NeighborSampler._sample has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · _scatter.scatter (cyclomatic 25) · ×1
  • _scatter.scatter (cyclomatic 25) torch_geometric/utils/_scatter.py:14 — _scatter.scatter has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · convert.to_networkx (cyclomatic 25) · ×1
  • convert.to_networkx (cyclomatic 25) torch_geometric/utils/convert.py:78 — convert.to_networkx has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · benchmark.benchmark (cyclomatic 24) · ×1
  • benchmark.benchmark (cyclomatic 24) torch_geometric/profile/benchmark.py:23 — benchmark.benchmark has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · remote_backend_utils._internal_num_nodes (cyclomatic 23) · ×1
  • remote_backend_utils._internal_num_nodes (cyclomatic 23) torch_geometric/data/remote_backend_utils.py:30 — remote_backend_utils._internal_num_nodes has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · separate._separate (cyclomatic 23) · ×1
  • separate._separate (cyclomatic 23) torch_geometric/data/separate.py:59 — separate._separate has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphMaskExplainer._train_explainer (cyclomatic 23) · ×1
  • GraphMaskExplainer._train_explainer (cyclomatic 23) torch_geometric/explain/algorithm/graphmask_explainer.py:331 — GraphMaskExplainer._train_explainer has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ToSparseTensor.forward (cyclomatic 23) · ×1
  • ToSparseTensor.forward (cyclomatic 23) torch_geometric/transforms/to_sparse_tensor.py:71 — ToSparseTensor.forward has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeteroData.to_homogeneous (cyclomatic 22) · ×1
  • HeteroData.to_homogeneous (cyclomatic 22) torch_geometric/data/hetero_data.py:877 — HeteroData.to_homogeneous has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MoleculeGPTDataset.process (cyclomatic 22) · ×1
  • MoleculeGPTDataset.process (cyclomatic 22) torch_geometric/datasets/molecule_gpt_dataset.py:318 — MoleculeGPTDataset.process has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.generate_qa_pairs (cyclomatic 22) · ×1
  • qa_gen.generate_qa_pairs (cyclomatic 22) REDACTED:2850 — qa_gen.generate_qa_pairs has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FusedAggregation.forward (cyclomatic 22) · ×1
  • FusedAggregation.forward (cyclomatic 22) torch_geometric/nn/aggr/fused.py:191 — FusedAggregation.forward has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · BasicGNN.forward (cyclomatic 22) · ×1
  • BasicGNN.forward (cyclomatic 22) torch_geometric/nn/models/basic_gnn.py:178 — BasicGNN.forward has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LightningData.__init__ (cyclomatic 21) · ×1
  • LightningData.__init__ (cyclomatic 21) torch_geometric/data/lightning/datamodule.py:63 — LightningData.__init__ has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · agg_runs.agg_batch (cyclomatic 21) · ×1
  • agg_runs.agg_batch (cyclomatic 21) REDACTED:162 — agg_runs.agg_batch has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.mine_hard_negative_segments (cyclomatic 21) · ×1
  • qa_gen.mine_hard_negative_segments (cyclomatic 21) REDACTED:3335 — qa_gen.mine_hard_negative_segments has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · map.map_index (cyclomatic 21) · ×1
  • map.map_index (cyclomatic 21) torch_geometric/utils/map.py:13 — map.map_index has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · edge_index._spmm (cyclomatic 20) · ×1
  • edge_index._spmm (cyclomatic 20) torch_geometric/edge_index.py:1925 — edge_index._spmm has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · agg_runs.agg_runs (cyclomatic 20) · ×1
  • agg_runs.agg_runs (cyclomatic 20) REDACTED:82 — agg_runs.agg_runs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.validate_hop_context_time_ranges (cyclomatic 20) · ×1
  • qa_gen.validate_hop_context_time_ranges (cyclomatic 20) REDACTED:2350 — qa_gen.validate_hop_context_time_ranges has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.generate_hard_question_answer_with_timestamps (cyclomatic 20) · ×1
  • qa_gen.generate_hard_question_answer_with_timestamps (cyclomatic 20) REDACTED:2414 — qa_gen.generate_hard_question_answer_with_timestamps has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FusedAggregation.__init__ (cyclomatic 20) · ×1
  • FusedAggregation.__init__ (cyclomatic 20) torch_geometric/nn/aggr/fused.py:87 — FusedAggregation.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RGCNConv.forward (cyclomatic 20) · ×1
  • RGCNConv.forward (cyclomatic 20) torch_geometric/nn/conv/rgcn_conv.py:164 — RGCNConv.forward has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Sequential.__init__ (cyclomatic 20) · ×1
  • Sequential.__init__ (cyclomatic 20) torch_geometric/nn/sequential.py:87 — Sequential.__init__ has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · asserts.assert_module (cyclomatic 20) · ×1
  • asserts.assert_module (cyclomatic 20) torch_geometric/testing/asserts.py:16 — asserts.assert_module has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · graph._visualize_hetero_graph_via_networkx (cyclomatic 20) · ×1
  • graph._visualize_hetero_graph_via_networkx (cyclomatic 20) torch_geometric/visualization/graph.py:227 — graph._visualize_hetero_graph_via_networkx has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · collate.collate (cyclomatic 19) · ×1
  • collate.collate (cyclomatic 19) torch_geometric/data/collate.py:37 — collate.collate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EdgeStorage.num_edges (cyclomatic 19) · ×1
  • EdgeStorage.num_edges (cyclomatic 19) torch_geometric/data/storage.py:574 — EdgeStorage.num_edges has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.build_cross_part_contexts_from_segments (cyclomatic 19) · ×1
  • qa_gen.build_cross_part_contexts_from_segments (cyclomatic 19) REDACTED:1715 — qa_gen.build_cross_part_contexts_from_segments has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GATv2Conv.forward (cyclomatic 19) · ×1
  • GATv2Conv.forward (cyclomatic 19) torch_geometric/nn/conv/gatv2_conv.py:250 — GATv2Conv.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · RGATConv.__init__ (cyclomatic 19) · ×1
  • RGATConv.__init__ (cyclomatic 19) torch_geometric/nn/conv/rgat_conv.py:174 — RGATConv.__init__ has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · BasicGNN.__init__ (cyclomatic 19) · ×1
  • BasicGNN.__init__ (cyclomatic 19) torch_geometric/nn/models/basic_gnn.py:70 — BasicGNN.__init__ has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RandomLinkSplit.forward (cyclomatic 19) · ×1
  • RandomLinkSplit.forward (cyclomatic 19) torch_geometric/transforms/random_link_split.py:122 — RandomLinkSplit.forward has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SQLiteDatabase._deserialize (cyclomatic 18) · ×1
  • SQLiteDatabase._deserialize (cyclomatic 18) torch_geometric/data/database.py:509 — SQLiteDatabase._deserialize has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiAggregation.__init__ (cyclomatic 18) · ×1
  • MultiAggregation.__init__ (cyclomatic 18) torch_geometric/nn/aggr/multi.py:44 — MultiAggregation.__init__ has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EGConv.forward (cyclomatic 18) · ×1
  • EGConv.forward (cyclomatic 18) torch_geometric/nn/conv/eg_conv.py:132 — EGConv.forward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeteroConv.forward (cyclomatic 18) · ×1
  • HeteroConv.forward (cyclomatic 18) torch_geometric/nn/conv/hetero_conv.py:91 — HeteroConv.forward has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphStore._edge_to_layout (cyclomatic 17) · ×1
  • GraphStore._edge_to_layout (cyclomatic 17) torch_geometric/data/graph_store.py:244 — GraphStore._edge_to_layout has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PascalVOCKeypoints.process (cyclomatic 17) · ×1
  • PascalVOCKeypoints.process (cyclomatic 17) REDACTED:132 — PascalVOCKeypoints.process has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · QM9.process (cyclomatic 17) · ×1
  • QM9.process (cyclomatic 17) torch_geometric/datasets/qm9.py:200 — QM9.process has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · index._add (cyclomatic 17) · ×1
  • index._add (cyclomatic 17) torch_geometric/index.py:696 — index._add has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Inspector.get_params_from_method_call (cyclomatic 17) · ×1
  • Inspector.get_params_from_method_call (cyclomatic 17) torch_geometric/inspector.py:336 — Inspector.get_params_from_method_call has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.evaluate_qa_pairs (cyclomatic 17) · ×1
  • qa_gen.evaluate_qa_pairs (cyclomatic 17) REDACTED:3781 — qa_gen.evaluate_qa_pairs has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · configs_gen.gen_grid_sample (cyclomatic 16) · ×1
  • configs_gen.gen_grid_sample (cyclomatic 16) graphgym/configs_gen.py:166 — configs_gen.gen_grid_sample has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · HeteroData.validate (cyclomatic 16) · ×1
  • HeteroData.validate (cyclomatic 16) torch_geometric/data/hetero_data.py:411 — HeteroData.validate has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · qa_gen.compute_metrics (cyclomatic 16) · ×1
  • qa_gen.compute_metrics (cyclomatic 16) REDACTED:4435 — qa_gen.compute_metrics has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LinkPredMetricCollection.update (cyclomatic 16) · ×1
  • LinkPredMetricCollection.update (cyclomatic 16) torch_geometric/metrics/link_pred.py:361 — LinkPredMetricCollection.update has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FAConv.forward (cyclomatic 16) · ×1
  • FAConv.forward (cyclomatic 16) torch_geometric/nn/conv/fa_conv.py:146 — FAConv.forward has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GENConv.__init__ (cyclomatic 16) · ×1
  • GENConv.__init__ (cyclomatic 16) torch_geometric/nn/conv/gen_conv.py:120 — GENConv.__init__ has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dimenet_utils.real_sph_harm (cyclomatic 16) · ×1
  • dimenet_utils.real_sph_harm (cyclomatic 16) torch_geometric/nn/models/dimenet_utils.py:104 — dimenet_utils.real_sph_harm has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · resolver.lr_scheduler_resolver (cyclomatic 16) · ×1
  • resolver.lr_scheduler_resolver (cyclomatic 16) torch_geometric/nn/resolver.py:95 — resolver.lr_scheduler_resolver has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · convert.to_dgl (cyclomatic 16) · ×1
  • convert.to_dgl (cyclomatic 16) torch_geometric/utils/convert.py:497 — convert.to_dgl 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.
D2 · Cognitive Complexity · NeighborSampler.__init__ (cognitive 130) · ×1
  • NeighborSampler.__init__ (cognitive 130) torch_geometric/sampler/neighbor_sampler.py:44 — NeighborSampler.__init__ has cognitive complexity 130 (threshold 15). Drivers by points: if/else 44 (105 pts), loops 6 (19 pts), boolean chains 6 (nesting depth added 74). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DistNeighborSampler.node_sample (cognitive 128) · ×1
  • DistNeighborSampler.node_sample (cognitive 128) torch_geometric/distributed/dist_neighbor_sampler.py:212 — DistNeighborSampler.node_sample has cognitive complexity 128 (threshold 15). Drivers by points: if/else 29 (75 pts), loops 7 (22 pts), ternaries 9 (22 pts), error handling 1 (7 pts), boolean chains 2 (nesting depth added 80). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · MessagePassing.propagate (cognitive 88) · ×1
  • MessagePassing.propagate (cognitive 88) torch_geometric/nn/conv/message_passing.py:421 — MessagePassing.propagate has cognitive complexity 88 (threshold 15). Drivers by points: if/else 19 (50 pts), loops 10 (24 pts), ternaries 3 (11 pts), boolean chains 3 (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DistNeighborSampler.edge_sample (cognitive 85) · ×1
  • DistNeighborSampler.edge_sample (cognitive 85) torch_geometric/distributed/dist_neighbor_sampler.py:512 — DistNeighborSampler.edge_sample has cognitive complexity 85 (threshold 15). Drivers by points: if/else 38 (79 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · neighbor_sampler.edge_sample (cognitive 85) · ×1
  • neighbor_sampler.edge_sample (cognitive 85) torch_geometric/sampler/neighbor_sampler.py:821 — neighbor_sampler.edge_sample has cognitive complexity 85 (threshold 15). Drivers by points: if/else 38 (79 pts), boolean chains 3, loops 1 (3 pts) (nesting depth added 43). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · profiler._layer_trace (cognitive 69) · ×1
  • profiler._layer_trace (cognitive 69) torch_geometric/profile/profiler.py:149 — profiler._layer_trace has cognitive complexity 69 (threshold 15). Drivers by points: if/else 18 (37 pts), loops 8 (16 pts), boolean chains 10, ternaries 2 (6 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Partitioner.generate_partition (cognitive 68) · ×1
  • Partitioner.generate_partition (cognitive 68) torch_geometric/distributed/partition.py:121 — Partitioner.generate_partition has cognitive complexity 68 (threshold 15). Drivers by points: if/else 14 (43 pts), loops 8 (18 pts), ternaries 3 (6 pts), boolean chains 1 (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.
D2 · Cognitive Complexity · collate._collate (cognitive 63) · ×1
  • collate._collate (cognitive 63) torch_geometric/data/collate.py:149 — collate._collate has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (41 pts), boolean chains 13, loops 3 (7 pts), ternaries 1 (2 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.store_results (cognitive 59) · ×1
  • qa_gen.store_results (cognitive 59) REDACTED:4134 — qa_gen.store_results has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (40 pts), loops 4 (8 pts), ternaries 3 (5 pts), boolean chains 3, error handling 2 (3 pts) (nesting depth added 31). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeighborSampler._sample (cognitive 59) · ×1
  • NeighborSampler._sample (cognitive 59) torch_geometric/sampler/neighbor_sampler.py:429 — NeighborSampler._sample has cognitive complexity 59 (threshold 15). Drivers by points: if/else 23 (54 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 33). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _tree_decomposition.tree_decomposition (cognitive 58) · ×1
  • _tree_decomposition.tree_decomposition (cognitive 58) torch_geometric/utils/_tree_decomposition.py:35 — _tree_decomposition.tree_decomposition has cognitive complexity 58 (threshold 15). Drivers by points: loops 15 (30 pts), if/else 14 (25 pts), boolean chains 3 (nesting depth added 26). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · benchmark.benchmark (cognitive 56) · ×1
  • benchmark.benchmark (cognitive 56) torch_geometric/profile/benchmark.py:23 — benchmark.benchmark has cognitive complexity 56 (threshold 15). Drivers by points: if/else 20 (49 pts), ternaries 2 (4 pts), loops 2 (3 pts) (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HGBDataset.process (cognitive 55) · ×1
  • HGBDataset.process (cognitive 55) torch_geometric/datasets/hgb_dataset.py:96 — HGBDataset.process has cognitive complexity 55 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 10 (20 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphMaskExplainer._train_explainer (cognitive 55) · ×1
  • GraphMaskExplainer._train_explainer (cognitive 55) torch_geometric/explain/algorithm/graphmask_explainer.py:331 — GraphMaskExplainer._train_explainer has cognitive complexity 55 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 6 (14 pts), error handling 2 (11 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · SamplerOutput.merge_with (cognitive 54) · ×1
  • SamplerOutput.merge_with (cognitive 54) torch_geometric/sampler/base.py:313 — SamplerOutput.merge_with has cognitive complexity 54 (threshold 15). Drivers by points: if/else 12 (21 pts), ternaries 7 (14 pts), boolean chains 13, loops 2 (6 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agg_runs.agg_runs (cognitive 53) · ×1
  • agg_runs.agg_runs (cognitive 53) REDACTED:82 — agg_runs.agg_runs has cognitive complexity 53 (threshold 15). Drivers by points: if/else 14 (38 pts), loops 7 (10 pts), ternaries 1 (5 pts) (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · config_store.to_dataclass (cognitive 52) · ×1
  • config_store.to_dataclass (cognitive 52) torch_geometric/config_store.py:196 — config_store.to_dataclass has cognitive complexity 52 (threshold 15). Drivers by points: if/else 19 (43 pts), boolean chains 4, ternaries 3 (4 pts), loops 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert.from_networkx (cognitive 52) · ×1
  • convert.from_networkx (cognitive 52) torch_geometric/utils/convert.py:193 — convert.from_networkx has cognitive complexity 52 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 6 (15 pts), loops 9 (13 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · agg_runs.agg_batch (cognitive 51) · ×1
  • agg_runs.agg_batch (cognitive 51) REDACTED:162 — agg_runs.agg_batch has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (27 pts), loops 9 (18 pts), ternaries 1 (6 pts) (nesting depth added 30). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · LocalFeatureStore.from_partition (cognitive 46) · ×1
  • LocalFeatureStore.from_partition (cognitive 46) torch_geometric/distributed/local_feature_store.py:400 — LocalFeatureStore.from_partition has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (26 pts), loops 6 (16 pts), boolean chains 4 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GATConv.forward (cognitive 46) · ×1
  • GATConv.forward (cognitive 46) torch_geometric/nn/conv/gat_conv.py:254 — GATConv.forward has cognitive complexity 46 (threshold 15). Drivers by points: if/else 23 (39 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MoleculeGPTDataset.process (cognitive 44) · ×1
  • MoleculeGPTDataset.process (cognitive 44) torch_geometric/datasets/molecule_gpt_dataset.py:318 — MoleculeGPTDataset.process has cognitive complexity 44 (threshold 15). Drivers by points: if/else 12 (26 pts), loops 5 (10 pts), error handling 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.generate_hard_question_answer_with_timestamps (cognitive 44) · ×1
  • qa_gen.generate_hard_question_answer_with_timestamps (cognitive 44) REDACTED:2414 — qa_gen.generate_hard_question_answer_with_timestamps has cognitive complexity 44 (threshold 15). Drivers by points: if/else 11 (28 pts), loops 3 (7 pts), boolean chains 5, error handling 1 (4 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinkLoader.filter_fn (cognitive 44) · ×1
  • LinkLoader.filter_fn (cognitive 44) torch_geometric/loader/link_loader.py:219 — LinkLoader.filter_fn has cognitive complexity 44 (threshold 15). Drivers by points: if/else 15 (30 pts), boolean chains 6, loops 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeLoader.filter_fn (cognitive 44) · ×1
  • NodeLoader.filter_fn (cognitive 44) torch_geometric/loader/node_loader.py:154 — NodeLoader.filter_fn has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 3 (7 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessagePassing._collect (cognitive 43) · ×1
  • MessagePassing._collect (cognitive 43) torch_geometric/nn/conv/message_passing.py:335 — MessagePassing._collect has cognitive complexity 43 (threshold 15). Drivers by points: if/else 14 (31 pts), ternaries 5 (9 pts), boolean chains 2, loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.validate_timeline_events (cognitive 42) · ×1
  • qa_gen.validate_timeline_events (cognitive 42) REDACTED:1529 — qa_gen.validate_timeline_events has cognitive complexity 42 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 11, error handling 2 (4 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.validate_hop_context_time_ranges (cognitive 42) · ×1
  • qa_gen.validate_hop_context_time_ranges (cognitive 42) REDACTED:2350 — qa_gen.validate_hop_context_time_ranges has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 3 (8 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · configs_gen.gen_grid_sample (cognitive 41) · ×1
  • configs_gen.gen_grid_sample (cognitive 41) graphgym/configs_gen.py:166 — configs_gen.gen_grid_sample has cognitive complexity 41 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 8 (20 pts) (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FusedAggregation.forward (cognitive 41) · ×1
  • FusedAggregation.forward (cognitive 41) torch_geometric/nn/aggr/fused.py:191 — FusedAggregation.forward has cognitive complexity 41 (threshold 15). Drivers by points: if/else 23 (36 pts), ternaries 1 (3 pts), loops 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NodeStorage.num_nodes (cognitive 40) · ×1
  • NodeStorage.num_nodes (cognitive 40) torch_geometric/data/storage.py:421 — NodeStorage.num_nodes has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 11, loops 2, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.generate_qa_pairs (cognitive 40) · ×1
  • qa_gen.generate_qa_pairs (cognitive 40) REDACTED:2850 — qa_gen.generate_qa_pairs has cognitive complexity 40 (threshold 15). Drivers by points: if/else 13 (22 pts), loops 4 (7 pts), error handling 3 (6 pts), ternaries 2 (4 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EGConv.forward (cognitive 40) · ×1
  • EGConv.forward (cognitive 40) torch_geometric/nn/conv/eg_conv.py:132 — EGConv.forward has cognitive complexity 40 (threshold 15). Drivers by points: if/else 16 (38 pts), boolean chains 2 (nesting depth added 22). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DistNeighborSampler._collate_fn (cognitive 39) · ×1
  • DistNeighborSampler._collate_fn (cognitive 39) torch_geometric/distributed/dist_neighbor_sampler.py:1003 — DistNeighborSampler._collate_fn has cognitive complexity 39 (threshold 15). Drivers by points: if/else 17 (31 pts), loops 2 (6 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.build_cross_part_contexts_from_segments (cognitive 39) · ×1
  • qa_gen.build_cross_part_contexts_from_segments (cognitive 39) REDACTED:1715 — qa_gen.build_cross_part_contexts_from_segments has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (29 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RGCNConv.forward (cognitive 39) · ×1
  • RGCNConv.forward (cognitive 39) torch_geometric/nn/conv/rgcn_conv.py:164 — RGCNConv.forward has cognitive complexity 39 (threshold 15). Drivers by points: if/else 20 (32 pts), loops 2 (5 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · comp_budget.match_computation (cognitive 38) · ×1
  • comp_budget.match_computation (cognitive 38) torch_geometric/graphgym/utils/comp_budget.py:21 — comp_budget.match_computation has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (28 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 24). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · _spmm.spmm (cognitive 38) · ×1
  • _spmm.spmm (cognitive 38) torch_geometric/utils/_spmm.py:12 — _spmm.spmm has cognitive complexity 38 (threshold 15). Drivers by points: if/else 19 (31 pts), boolean chains 6, ternaries 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · map.map_index (cognitive 38) · ×1
  • map.map_index (cognitive 38) torch_geometric/utils/map.py:13 — map.map_index has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (30 pts), error handling 2 (5 pts), boolean chains 2, ternaries 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Data.to_heterogeneous (cognitive 37) · ×1
  • Data.to_heterogeneous (cognitive 37) torch_geometric/data/data.py:784 — Data.to_heterogeneous has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 8 (11 pts), boolean chains 5 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeteroData.to_homogeneous (cognitive 37) · ×1
  • HeteroData.to_homogeneous (cognitive 37) torch_geometric/data/hetero_data.py:877 — HeteroData.to_homogeneous has cognitive complexity 37 (threshold 15). Drivers by points: if/else 13 (21 pts), loops 4 (8 pts), ternaries 3 (6 pts), boolean chains 2 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · remote_backend_utils._internal_num_nodes (cognitive 37) · ×1
  • remote_backend_utils._internal_num_nodes (cognitive 37) torch_geometric/data/remote_backend_utils.py:30 — remote_backend_utils._internal_num_nodes has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 7, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BasicGNN.forward (cognitive 37) · ×1
  • BasicGNN.forward (cognitive 37) torch_geometric/nn/models/basic_gnn.py:178 — BasicGNN.forward has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (25 pts), boolean chains 6, ternaries 3 (5 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert.to_networkx (cognitive 37) · ×1
  • convert.to_networkx (cognitive 37) torch_geometric/utils/convert.py:78 — convert.to_networkx has cognitive complexity 37 (threshold 15). Drivers by points: loops 7 (13 pts), if/else 6 (12 pts), boolean chains 8, ternaries 2 (4 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Inspector.get_params_from_method_call (cognitive 36) · ×1
  • Inspector.get_params_from_method_call (cognitive 36) torch_geometric/inspector.py:336 — Inspector.get_params_from_method_call has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 5 (10 pts), boolean chains 2, ternaries 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.
D2 · Cognitive Complexity · fs.cp (cognitive 36) · ×1
  • fs.cp (cognitive 36) torch_geometric/io/fs.py:105 — fs.cp has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (24 pts), boolean chains 7, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · collate.collate (cognitive 35) · ×1
  • collate.collate (cognitive 35) torch_geometric/data/collate.py:37 — collate.collate has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 4 (6 pts), boolean chains 5 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SQLiteDatabase._deserialize (cognitive 35) · ×1
  • SQLiteDatabase._deserialize (cognitive 35) torch_geometric/data/database.py:509 — SQLiteDatabase._deserialize has cognitive complexity 35 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 4 (12 pts), boolean chains 2, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.mine_hard_negative_segments (cognitive 35) · ×1
  • qa_gen.mine_hard_negative_segments (cognitive 35) REDACTED:3335 — qa_gen.mine_hard_negative_segments has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 6 (11 pts), error handling 2 (3 pts), boolean chains 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Transformer.transform (cognitive 35) · ×1
  • Transformer.transform (cognitive 35) torch_geometric/nn/fx.py:114 — Transformer.transform has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 4, ternaries 2 (4 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RandomLinkSplit.forward (cognitive 35) · ×1
  • RandomLinkSplit.forward (cognitive 35) torch_geometric/transforms/random_link_split.py:122 — RandomLinkSplit.forward has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (31 pts), boolean chains 3, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _scatter.scatter (cognitive 35) · ×1
  • _scatter.scatter (cognitive 35) torch_geometric/utils/_scatter.py:14 — _scatter.scatter has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 8, ternaries 3 (6 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ppr._get_ppr (cognitive 35) · ×1
  • ppr._get_ppr (cognitive 35) torch_geometric/utils/ppr.py:18 — ppr._get_ppr has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (21 pts), ternaries 3 (8 pts), loops 3 (6 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LRGBDataset.process (cognitive 34) · ×1
  • LRGBDataset.process (cognitive 34) REDACTED:173 — LRGBDataset.process has cognitive complexity 34 (threshold 15). Drivers by points: if/else 8 (23 pts), loops 3 (10 pts), boolean chains 1 (nesting depth added 22). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ToUndirected.forward (cognitive 34) · ×1
  • ToUndirected.forward (cognitive 34) torch_geometric/transforms/to_undirected.py:37 — ToUndirected.forward has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 4 (10 pts), boolean chains 3 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · QM9.process (cognitive 33) · ×1
  • QM9.process (cognitive 33) torch_geometric/datasets/qm9.py:200 — QM9.process has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 4 (12 pts), loops 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GATv2Conv.forward (cognitive 33) · ×1
  • GATv2Conv.forward (cognitive 33) torch_geometric/nn/conv/gatv2_conv.py:250 — GATv2Conv.forward has cognitive complexity 33 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dimenet_utils.real_sph_harm (cognitive 33) · ×1
  • dimenet_utils.real_sph_harm (cognitive 33) torch_geometric/nn/models/dimenet_utils.py:104 — dimenet_utils.real_sph_harm has cognitive complexity 33 (threshold 15). Drivers by points: loops 10 (24 pts), if/else 5 (9 pts) (nesting depth added 18). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ToSparseTensor.forward (cognitive 33) · ×1
  • ToSparseTensor.forward (cognitive 33) torch_geometric/transforms/to_sparse_tensor.py:71 — ToSparseTensor.forward has cognitive complexity 33 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 9, loops 3 (5 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · APPNP.forward (cognitive 32) · ×1
  • APPNP.forward (cognitive 32) torch_geometric/nn/conv/appnp.py:81 — APPNP.forward has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (30 pts), boolean chains 1, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · RGATConv.message (cognitive 32) · ×1
  • RGATConv.message (cognitive 32) torch_geometric/nn/conv/rgat_conv.py:373 — RGATConv.message has cognitive complexity 32 (threshold 15). Drivers by points: if/else 20 (28 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolver.lr_scheduler_resolver (cognitive 32) · ×1
  • resolver.lr_scheduler_resolver (cognitive 32) torch_geometric/nn/resolver.py:95 — resolver.lr_scheduler_resolver has cognitive complexity 32 (threshold 15). Drivers by points: if/else 12 (29 pts), boolean chains 2, loops 1 (nesting depth added 17). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · NumNeighbors._get_values (cognitive 32) · ×1
  • NumNeighbors._get_values (cognitive 32) torch_geometric/sampler/base.py:733 — NumNeighbors._get_values has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (21 pts), ternaries 2 (8 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · convert.to_dgl (cognitive 32) · ×1
  • convert.to_dgl (cognitive 32) torch_geometric/utils/convert.py:497 — convert.to_dgl has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 7 (16 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph._visualize_hetero_graph_via_networkx (cognitive 32) · ×1
  • graph._visualize_hetero_graph_via_networkx (cognitive 32) torch_geometric/visualization/graph.py:227 — graph._visualize_hetero_graph_via_networkx has cognitive complexity 32 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 9 (11 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EdgeIndex.__new__ (cognitive 31) · ×1
  • EdgeIndex.__new__ (cognitive 31) torch_geometric/edge_index.py:253 — EdgeIndex.__new__ has cognitive complexity 31 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 12, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.process_segments_info (cognitive 31) · ×1
  • qa_gen.process_segments_info (cognitive 31) REDACTED:2765 — qa_gen.process_segments_info has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MLP.__init__ (cognitive 31) · ×1
  • MLP.__init__ (cognitive 31) torch_geometric/nn/models/mlp.py:78 — MLP.__init__ has cognitive complexity 31 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 7, ternaries 2 (3 pts), loops 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeteroSamplerOutput.to_bidirectional (cognitive 31) · ×1
  • HeteroSamplerOutput.to_bidirectional (cognitive 31) torch_geometric/sampler/base.py:596 — HeteroSamplerOutput.to_bidirectional has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 3 (7 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.
D2 · Cognitive Complexity · _coalesce.coalesce (cognitive 31) · ×1
  • _coalesce.coalesce (cognitive 31) torch_geometric/utils/_coalesce.py:70 — _coalesce.coalesce has cognitive complexity 31 (threshold 15). Drivers by points: if/else 18 (24 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProteinMPNNDataset._process_pdb2 (cognitive 30) · ×1
  • ProteinMPNNDataset._process_pdb2 (cognitive 30) REDACTED:317 — ProteinMPNNDataset._process_pdb2 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArtifactExtractor._parse_artifacts_response (cognitive 30) · ×1
  • ArtifactExtractor._parse_artifacts_response (cognitive 30) REDACTED:798 — ArtifactExtractor._parse_artifacts_response has cognitive complexity 30 (threshold 15). Drivers by points: if/else 8 (15 pts), error handling 4 (7 pts), loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Sequential.__init__ (cognitive 30) · ×1
  • Sequential.__init__ (cognitive 30) torch_geometric/nn/sequential.py:87 — Sequential.__init__ has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 2, loops 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sparse.cat_coo (cognitive 30) · ×1
  • sparse.cat_coo (cognitive 30) torch_geometric/utils/sparse.py:488 — sparse.cat_coo has cognitive complexity 30 (threshold 15). Drivers by points: if/else 12 (23 pts), loops 3 (6 pts), ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PascalVOCKeypoints.process (cognitive 29) · ×1
  • PascalVOCKeypoints.process (cognitive 29) REDACTED:132 — PascalVOCKeypoints.process has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (21 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FAConv.forward (cognitive 29) · ×1
  • FAConv.forward (cognitive 29) torch_geometric/nn/conv/fa_conv.py:146 — FAConv.forward has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.evaluate_qa_pairs (cognitive 28) · ×1
  • qa_gen.evaluate_qa_pairs (cognitive 28) REDACTED:3781 — qa_gen.evaluate_qa_pairs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 4 (7 pts), error handling 2 (4 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FusedAggregation.__init__ (cognitive 28) · ×1
  • FusedAggregation.__init__ (cognitive 28) torch_geometric/nn/aggr/fused.py:87 — FusedAggregation.__init__ has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 4, boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GraphStore._edge_to_layout (cognitive 27) · ×1
  • GraphStore._edge_to_layout (cognitive 27) torch_geometric/data/graph_store.py:244 — GraphStore._edge_to_layout has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (22 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeteroData.validate (cognitive 27) · ×1
  • HeteroData.validate (cognitive 27) torch_geometric/data/hetero_data.py:411 — HeteroData.validate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (22 pts), boolean chains 4, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MoleculeGPTDataset.download (cognitive 27) · ×1
  • MoleculeGPTDataset.download (cognitive 27) torch_geometric/datasets/molecule_gpt_dataset.py:236 — MoleculeGPTDataset.download has cognitive complexity 27 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 4 (11 pts), error handling 1 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · backend_utils.retrieval_via_pcst (cognitive 27) · ×1
  • backend_utils.retrieval_via_pcst (cognitive 27) torch_geometric/llm/utils/backend_utils.py:54 — backend_utils.retrieval_via_pcst has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 2 (5 pts), boolean chains 3 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · BasicGNN.__init__ (cognitive 27) · ×1
  • BasicGNN.__init__ (cognitive 27) torch_geometric/nn/models/basic_gnn.py:70 — BasicGNN.__init__ has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (20 pts), boolean chains 4, loops 2, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · _negative_sampling.negative_sampling (cognitive 27) · ×1
  • _negative_sampling.negative_sampling (cognitive 27) torch_geometric/utils/_negative_sampling.py:12 — _negative_sampling.negative_sampling has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 2 (6 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · separate._separate (cognitive 26) · ×1
  • separate._separate (cognitive 26) torch_geometric/data/separate.py:59 — separate._separate has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 8, if/else 5 (8 pts), ternaries 4 (8 pts), loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · graph.visualize_hetero_graph (cognitive 26) · ×1
  • graph.visualize_hetero_graph (cognitive 26) torch_geometric/visualization/graph.py:155 — graph.visualize_hetero_graph has cognitive complexity 26 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MGNAN.__init__ (cognitive 25) · ×1
  • MGNAN.__init__ (cognitive 25) torch_geometric/contrib/nn/models/mgnan.py:186 — MGNAN.__init__ has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeteroData.subgraph (cognitive 25) · ×1
  • HeteroData.subgraph (cognitive 25) torch_geometric/data/hetero_data.py:724 — HeteroData.subgraph has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GitMolDataset.process (cognitive 25) · ×1
  • GitMolDataset.process (cognitive 25) torch_geometric/datasets/git_mol_dataset.py:99 — GitMolDataset.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (7 pts), boolean chains 1, error handling 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InstructMolDataset.process (cognitive 25) · ×1
  • InstructMolDataset.process (cognitive 25) torch_geometric/datasets/instruct_mol_dataset.py:61 — InstructMolDataset.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (16 pts), loops 3 (5 pts), ternaries 1 (2 pts), boolean chains 1, error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProteinMPNNDataset.process (cognitive 25) · ×1
  • ProteinMPNNDataset.process (cognitive 25) REDACTED:120 — ProteinMPNNDataset.process has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (21 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.filter_edge_store_ (cognitive 25) · ×1
  • utils.filter_edge_store_ (cognitive 25) torch_geometric/loader/utils.py:101 — utils.filter_edge_store_ has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (24 pts), loops 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · InvertibleFunction.backward (cognitive 25) · ×1
  • InvertibleFunction.backward (cognitive 25) torch_geometric/nn/models/rev_gnn.py:72 — InvertibleFunction.backward has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (19 pts), loops 5 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _relbench.from_relbench (cognitive 24) · ×1
  • _relbench.from_relbench (cognitive 24) torch_geometric/contrib/utils/_relbench.py:10 — _relbench.from_relbench has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 3 (5 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LightningData.__init__ (cognitive 24) · ×1
  • LightningData.__init__ (cognitive 24) torch_geometric/data/lightning/datamodule.py:63 — LightningData.__init__ has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, loops 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · EdgeStorage.num_edges (cognitive 24) · ×1
  • EdgeStorage.num_edges (cognitive 24) torch_geometric/data/storage.py:574 — EdgeStorage.num_edges has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 6, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GEDDataset.process (cognitive 24) · ×1
  • GEDDataset.process (cognitive 24) REDACTED:178 — GEDDataset.process has cognitive complexity 24 (threshold 15). Drivers by points: if/else 4 (12 pts), loops 4 (8 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.build_cross_part_contexts_with_timeline (cognitive 24) · ×1
  • qa_gen.build_cross_part_contexts_with_timeline (cognitive 24) REDACTED:1825 — qa_gen.build_cross_part_contexts_with_timeline has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (4 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.
D2 · Cognitive Complexity · HeteroConv.forward (cognitive 24) · ×1
  • HeteroConv.forward (cognitive 24) torch_geometric/nn/conv/hetero_conv.py:91 — HeteroConv.forward has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.to_csc (cognitive 24) · ×1
  • utils.to_csc (cognitive 24) torch_geometric/sampler/utils.py:46 — utils.to_csc has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (20 pts), ternaries 2 (3 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.
D2 · Cognitive Complexity · configs_gen.gen_grid (cognitive 23) · ×1
  • configs_gen.gen_grid (cognitive 23) graphgym/configs_gen.py:124 — configs_gen.gen_grid has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 3 (6 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · separate.separate (cognitive 23) · ×1
  • separate.separate (cognitive 23) torch_geometric/data/separate.py:15 — separate.separate has cognitive complexity 23 (threshold 15). Drivers by points: if/else 6 (12 pts), ternaries 2 (8 pts), loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · edge_index._spmm (cognitive 23) · ×1
  • edge_index._spmm (cognitive 23) torch_geometric/edge_index.py:1925 — edge_index._spmm has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Inspector.get_flat_param_dict (cognitive 23) · ×1
  • Inspector.get_flat_param_dict (cognitive 23) torch_geometric/inspector.py:207 — Inspector.get_flat_param_dict has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (17 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.normalize_hop_contexts (cognitive 23) · ×1
  • qa_gen.normalize_hop_contexts (cognitive 23) REDACTED:2239 — qa_gen.normalize_hop_contexts has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 2 (6 pts), boolean chains 4, loops 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · asserts.assert_module (cognitive 23) · ×1
  • asserts.assert_module (cognitive 23) torch_geometric/testing/asserts.py:16 — asserts.assert_module has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _TorchSPMM.backward (cognitive 22) · ×1
  • _TorchSPMM.backward (cognitive 22) torch_geometric/edge_index.py:1849 — _TorchSPMM.backward has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 4 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · captum.to_captum_input (cognitive 22) · ×1
  • captum.to_captum_input (cognitive 22) torch_geometric/explain/algorithm/captum.py:179 — captum.to_captum_input has cognitive complexity 22 (threshold 15). Drivers by points: loops 4 (12 pts), if/else 6 (8 pts), boolean chains 2 (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · DummyExplainer.forward (cognitive 22) · ×1
  • DummyExplainer.forward (cognitive 22) torch_geometric/explain/algorithm/dummy_explainer.py:17 — DummyExplainer.forward has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 2 (4 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · inspector.type_repr (cognitive 22) · ×1
  • inspector.type_repr (cognitive 22) torch_geometric/inspector.py:436 — inspector.type_repr has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (20 pts), boolean chains 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DynamicBatchSampler.__iter__ (cognitive 22) · ×1
  • DynamicBatchSampler.__iter__ (cognitive 22) torch_geometric/loader/dynamic_batch_sampler.py:66 — DynamicBatchSampler.__iter__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LinkPredMetricCollection.update (cognitive 22) · ×1
  • LinkPredMetricCollection.update (cognitive 22) torch_geometric/metrics/link_pred.py:361 — LinkPredMetricCollection.update has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 3, loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiAggregation.__init__ (cognitive 22) · ×1
  • MultiAggregation.__init__ (cognitive 22) torch_geometric/nn/aggr/multi.py:44 — MultiAggregation.__init__ has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13 (18 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · summary.summary (cognitive 22) · ×1
  • summary.summary (cognitive 22) torch_geometric/nn/summary.py:13 — summary.summary has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 1 (3 pts), loops 2, boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoMA.process (cognitive 21) · ×1
  • CoMA.process (cognitive 21) torch_geometric/datasets/coma.py:108 — CoMA.process has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.filter_dist_store (cognitive 21) · ×1
  • utils.filter_dist_store (cognitive 21) torch_geometric/distributed/utils.py:118 — utils.filter_dist_store has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 4 (6 pts), boolean chains 1, ternaries 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.compute_metrics (cognitive 21) · ×1
  • qa_gen.compute_metrics (cognitive 21) REDACTED:4435 — qa_gen.compute_metrics has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GCN2Conv.forward (cognitive 21) · ×1
  • GCN2Conv.forward (cognitive 21) torch_geometric/nn/conv/gcn2_conv.py:111 — GCN2Conv.forward has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (21 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GCNConv.forward (cognitive 21) · ×1
  • GCNConv.forward (cognitive 21) torch_geometric/nn/conv/gcn_conv.py:227 — GCNConv.forward has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (21 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HeteroDictLinear.forward (cognitive 21) · ×1
  • HeteroDictLinear.forward (cognitive 21) torch_geometric/nn/dense/linear.py:419 — HeteroDictLinear.forward has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (6 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RemoveIsolatedNodes.forward (cognitive 21) · ×1
  • RemoveIsolatedNodes.forward (cognitive 21) torch_geometric/transforms/remove_isolated_nodes.py:17 — RemoveIsolatedNodes.forward has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 5 (6 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ProteinMPNNDataset._process_pdb3 (cognitive 20) · ×1
  • ProteinMPNNDataset._process_pdb3 (cognitive 20) REDACTED:374 — ProteinMPNNDataset._process_pdb3 has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (15 pts), loops 4 (5 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EdgeIndex.sparse_narrow (cognitive 20) · ×1
  • EdgeIndex.sparse_narrow (cognitive 20) torch_geometric/edge_index.py:1028 — EdgeIndex.sparse_narrow has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (18 pts), boolean chains 1, ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · tu.read_tu_data (cognitive 20) · ×1
  • tu.read_tu_data (cognitive 20) torch_geometric/io/tu.py:17 — tu.read_tu_data has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (19 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · txt2kg._chunk_text (cognitive 20) · ×1
  • txt2kg._chunk_text (cognitive 20) torch_geometric/llm/models/txt2kg.py:425 — txt2kg._chunk_text has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 1 (4 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · DNAConv.forward (cognitive 20) · ×1
  • DNAConv.forward (cognitive 20) torch_geometric/nn/conv/dna_conv.py:258 — DNAConv.forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (20 pts) (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · DeepGCNLayer.forward (cognitive 20) · ×1
  • DeepGCNLayer.forward (cognitive 20) torch_geometric/nn/models/deepgcn.py:79 — DeepGCNLayer.forward has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · sparse.cat_csr (cognitive 20) · ×1
  • sparse.cat_csr (cognitive 20) torch_geometric/utils/sparse.py:555 — sparse.cat_csr has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sparse.cat_csc) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · sparse.cat_csc (cognitive 20) · ×1
  • sparse.cat_csc (cognitive 20) torch_geometric/utils/sparse.py:622 — sparse.cat_csc has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 3 (6 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (sparse.cat_csr) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · ConfigMixin.from_config (cognitive 19) · ×1
  • ConfigMixin.from_config (cognitive 19) torch_geometric/config_mixin.py:33 — ConfigMixin.from_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Explainer.__call__ (cognitive 19) · ×1
  • Explainer.__call__ (cognitive 19) torch_geometric/explain/explainer.py:147 — Explainer.__call__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (11 pts), loops 2 (4 pts), ternaries 1 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ExplanationMixin.validate_masks (cognitive 19) · ×1
  • ExplanationMixin.validate_masks (cognitive 19) torch_geometric/explain/explanation.py:23 — ExplanationMixin.validate_masks has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), loops 2 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessagePassing._set_jittable_templates (cognitive 19) · ×1
  • MessagePassing._set_jittable_templates (cognitive 19) torch_geometric/nn/conv/message_passing.py:926 — MessagePassing._set_jittable_templates has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), error handling 2 (4 pts), boolean chains 3 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RGATConv.__init__ (cognitive 19) · ×1
  • RGATConv.__init__ (cognitive 19) torch_geometric/nn/conv/rgat_conv.py:174 — RGATConv.__init__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, boolean chains 8. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · BidirectionalNeighborSampler._sample (cognitive 19) · ×1
  • BidirectionalNeighborSampler._sample (cognitive 19) torch_geometric/sampler/neighbor_sampler.py:715 — BidirectionalNeighborSampler._sample has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 2 (8 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SQLiteDatabase._serialize (cognitive 18) · ×1
  • SQLiteDatabase._serialize (cognitive 18) torch_geometric/data/database.py:451 — SQLiteDatabase._serialize has cognitive complexity 18 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GNNExplainer._collect_parameters (cognitive 18) · ×1
  • GNNExplainer._collect_parameters (cognitive 18) torch_geometric/explain/algorithm/gnn_explainer.py:245 — GNNExplainer._collect_parameters has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (4 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · txt2kg._parse_n_check_triples (cognitive 18) · ×1
  • txt2kg._parse_n_check_triples (cognitive 18) torch_geometric/llm/models/txt2kg.py:281 — txt2kg._parse_n_check_triples has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Aggregation.__call__ (cognitive 18) · ×1
  • Aggregation.__call__ (cognitive 18) torch_geometric/nn/aggr/base.py:102 — Aggregation.__call__ has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, ternaries 1 (2 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessagePassing._lift (cognitive 18) · ×1
  • MessagePassing._lift (cognitive 18) torch_geometric/nn/conv/message_passing.py:292 — MessagePassing._lift has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · gpse.precompute_GPSE (cognitive 18) · ×1
  • gpse.precompute_GPSE (cognitive 18) torch_geometric/nn/models/gpse.py:923 — gpse.precompute_GPSE has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (8 pts), loops 4 (5 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · IndexToMask.forward (cognitive 18) · ×1
  • IndexToMask.forward (cognitive 18) torch_geometric/transforms/mask.py:59 — IndexToMask.forward has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _onnx._apply_onnx_allowzero_workaround (cognitive 17) · ×1
  • _onnx._apply_onnx_allowzero_workaround (cognitive 17) torch_geometric/_onnx.py:103 — _onnx._apply_onnx_allowzero_workaround has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), error handling 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GraphLandDataset._get_transductive_data (cognitive 17) · ×1
  • GraphLandDataset._get_transductive_data (cognitive 17) torch_geometric/datasets/graphland.py:439 — GraphLandDataset._get_transductive_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (GraphLandDataset._get_inductive_data) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GraphLandDataset._get_inductive_data (cognitive 17) · ×1
  • GraphLandDataset._get_inductive_data (cognitive 17) torch_geometric/datasets/graphland.py:535 — GraphLandDataset._get_inductive_data has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: one other method here (GraphLandDataset._get_transductive_data) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · MedShapeNet.process (cognitive 17) · ×1
  • MedShapeNet.process (cognitive 17) REDACTED:80 — MedShapeNet.process has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 4 (6 pts), ternaries 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TAGDataset.tokenize_graph (cognitive 17) · ×1
  • TAGDataset.tokenize_graph (cognitive 17) torch_geometric/datasets/tag_dataset.py:335 — TAGDataset.tokenize_graph has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · LocalFeatureStore.from_hetero_data (cognitive 17) · ×1
  • LocalFeatureStore.from_hetero_data (cognitive 17) torch_geometric/distributed/local_feature_store.py:353 — LocalFeatureStore.from_hetero_data has cognitive complexity 17 (threshold 15). Drivers by points: loops 5 (9 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · GraphMaskExplainer._explain (cognitive 17) · ×1
  • GraphMaskExplainer._explain (cognitive 17) torch_geometric/explain/algorithm/graphmask_explainer.py:474 — GraphMaskExplainer._explain has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PGExplainer.train (cognitive 17) · ×1
  • PGExplainer.train (cognitive 17) torch_geometric/explain/algorithm/pg_explainer.py:124 — PGExplainer.train has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · index._add (cognitive 17) · ×1
  • index._add (cognitive 17) torch_geometric/index.py:696 — index._add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · LLM.__init__ (cognitive 17) · ×1
  • LLM.__init__ (cognitive 17) torch_geometric/llm/models/llm.py:70 — LLM.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · mixin.get_numa_nodes_cores (cognitive 17) · ×1
  • mixin.get_numa_nodes_cores (cognitive 17) torch_geometric/loader/mixin.py:15 — mixin.get_numa_nodes_cores has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), error handling 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utils.get_input_nodes (cognitive 17) · ×1
  • utils.get_input_nodes (cognitive 17) torch_geometric/loader/utils.py:289 — utils.get_input_nodes has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (17 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ARMAConv.forward (cognitive 17) · ×1
  • ARMAConv.forward (cognitive 17) torch_geometric/nn/conv/arma_conv.py:105 — ARMAConv.forward has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 3 (8 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.
D2 · Cognitive Complexity · GATv2Conv.__init__ (cognitive 17) · ×1
  • GATv2Conv.__init__ (cognitive 17) torch_geometric/nn/conv/gatv2_conv.py:133 — GATv2Conv.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · RandomLinkSplit._split (cognitive 17) · ×1
  • RandomLinkSplit._split (cognitive 17) torch_geometric/transforms/random_link_split.py:277 — RandomLinkSplit._split has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (14 pts), loops 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SMILESParser.__iter__ (cognitive 16) · ×1
  • SMILESParser.__iter__ (cognitive 16) torch_geometric/data/datapipes.py:48 — SMILESParser.__iter__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 1 (5 pts), loops 1 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · GlobalStorage.is_node_attr (cognitive 16) · ×1
  • GlobalStorage.is_node_attr (cognitive 16) torch_geometric/data/storage.py:783 — GlobalStorage.is_node_attr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (GlobalStorage.is_edge_attr) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · GlobalStorage.is_edge_attr (cognitive 16) · ×1
  • GlobalStorage.is_edge_attr (cognitive 16) torch_geometric/data/storage.py:833 — GlobalStorage.is_edge_attr has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14 (15 pts), boolean chains 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: one other method here (GlobalStorage.is_node_attr) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · snap_dataset.read_ego (cognitive 16) · ×1
  • snap_dataset.read_ego (cognitive 16) torch_geometric/datasets/snap_dataset.py:23 — snap_dataset.read_ego has cognitive complexity 16 (threshold 15). Drivers by points: if/else 3 (6 pts), loops 4 (6 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TAGDataset.process (cognitive 16) · ×1
  • TAGDataset.process (cognitive 16) torch_geometric/datasets/tag_dataset.py:270 — TAGDataset.process has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), loops 3 (7 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AttentionExplainer._collect_attention_coefficients (cognitive 16) · ×1
  • AttentionExplainer._collect_attention_coefficients (cognitive 16) torch_geometric/explain/algorithm/attention_explainer.py:103 — AttentionExplainer._collect_attention_coefficients has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 2, boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PGExplainer.forward (cognitive 16) · ×1
  • PGExplainer.forward (cognitive 16) torch_geometric/explain/algorithm/pg_explainer.py:252 — PGExplainer.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeteroExplanation.visualize_graph (cognitive 16) · ×1
  • HeteroExplanation.visualize_graph (cognitive 16) torch_geometric/explain/explanation.py:368 — HeteroExplanation.visualize_graph has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · LargeGraphIndexer.__init__ (cognitive 16) · ×1
  • LargeGraphIndexer.__init__ (cognitive 16) REDACTED:78 — LargeGraphIndexer.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (10 pts), loops 4 (6 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · qa_gen._normalize_segment_metadata (cognitive 16) · ×1
  • qa_gen._normalize_segment_metadata (cognitive 16) REDACTED:1349 — qa_gen._normalize_segment_metadata has cognitive complexity 16 (threshold 15). Drivers by points: error handling 2 (6 pts), if/else 2 (4 pts), ternaries 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · qa_gen.validate_answer_spans_hybrid (cognitive 16) · ×1
  • qa_gen.validate_answer_spans_hybrid (cognitive 16) REDACTED:3102 — qa_gen.validate_answer_spans_hybrid has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), loops 2 (3 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GENConv.__init__ (cognitive 16) · ×1
  • GENConv.__init__ (cognitive 16) torch_geometric/nn/conv/gen_conv.py:120 — GENConv.__init__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (11 pts), ternaries 3, boolean chains 1, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · GPSConv.forward (cognitive 16) · ×1
  • GPSConv.forward (cognitive 16) torch_geometric/nn/conv/gps_conv.py:132 — GPSConv.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (16 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MessagePassing._check_input (cognitive 16) · ×1
  • MessagePassing._check_input (cognitive 16) torch_geometric/nn/conv/message_passing.py:204 — MessagePassing._check_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SimpleConv.forward (cognitive 16) · ×1
  • SimpleConv.forward (cognitive 16) torch_geometric/nn/conv/simple_conv.py:64 — SimpleConv.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · dimenet_utils.associated_legendre_polynomials (cognitive 16) · ×1
  • dimenet_utils.associated_legendre_polynomials (cognitive 16) torch_geometric/nn/models/dimenet_utils.py:71 — dimenet_utils.associated_legendre_polynomials has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (7 pts) (nesting depth added 10). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · gpse.gpse_process_batch (cognitive 16) · ×1
  • gpse.gpse_process_batch (cognitive 16) torch_geometric/nn/models/gpse.py:818 — gpse.gpse_process_batch has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 2 (4 pts), boolean chains 2, ternaries 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · InstanceNorm.forward (cognitive 16) · ×1
  • InstanceNorm.forward (cognitive 16) torch_geometric/nn/norm/instance_norm.py:59 — InstanceNorm.forward has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · resolver.resolver (cognitive 16) · ×1
  • resolver.resolver (cognitive 16) torch_geometric/resolver.py:9 — resolver.resolver has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 2, ternaries 1 (2 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · add_metapaths.postprocess (cognitive 16) · ×1
  • add_metapaths.postprocess (cognitive 16) torch_geometric/transforms/add_metapaths.py:326 — add_metapaths.postprocess has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _sort_edge_index.sort_edge_index (cognitive 16) · ×1
  • _sort_edge_index.sort_edge_index (cognitive 16) torch_geometric/utils/_sort_edge_index.py:62 — _sort_edge_index.sort_edge_index has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (5 members, 9 shared lines) · ×1
  • Near-duplicate member family (5 members, 9 shared lines) torch_geometric/datasets/deezer_europe.py:56 — torch_geometric/datasets/deezer_europe.py:56-67 | torch_geometric/datasets/facebook.py:55-66 | torch_geometric/datasets/github.py:70-81 | torch_geometric/datasets/lastfm_asia.py:55-66 | torch_geometric/datasets/twitch.py:112-124 — These 5 members are variants of one another: a block of 9 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 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (4 members, 29 shared lines) · ×1
  • Near-duplicate member family (4 members, 29 shared lines) torch_geometric/datasets/amazon_products.py:73 — torch_geometric/datasets/amazon_products.py:73-109 | torch_geometric/datasets/flickr.py:75-111 | torch_geometric/datasets/reddit2.py:83-119 | torch_geometric/datasets/yelp.py:75-111 — These 4 members are variants of one another: a block of 29 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 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Near-duplicate member family (3 members, 22 shared lines) · ×1
  • Near-duplicate member family (3 members, 22 shared lines) torch_geometric/nn/conv/appnp.py:88 — torch_geometric/nn/conv/appnp.py:88-133 | torch_geometric/nn/conv/dna_conv.py:264-301 | torch_geometric/nn/conv/gcn2_conv.py:114-153 — These 3 members are variants of one another: a block of 22 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 3 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 3 times.
D4 · Code Duplication · Near-duplicate member pair (160 shared lines) · ×1
  • Near-duplicate member pair (160 shared lines) torch_geometric/distributed/dist_neighbor_sampler.py:521 — torch_geometric/distributed/dist_neighbor_sampler.py:521-770 | torch_geometric/sampler/neighbor_sampler.py:829-1048 — These two members are variants of one another: 160 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (86 shared lines) · ×1
  • Near-duplicate member pair (86 shared lines) torch_geometric/nn/models/dimenet.py:574 — torch_geometric/nn/models/dimenet.py:574-670 | torch_geometric/nn/models/dimenet.py:846-957 — These two members are variants of one another: 86 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (42 shared lines) · ×1
  • Near-duplicate member pair (42 shared lines) torch_geometric/loader/link_loader.py:223 — torch_geometric/loader/link_loader.py:223-340 | torch_geometric/loader/node_loader.py:158-263 — These two members are variants of one another: 42 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (36 shared lines) · ×1
  • Near-duplicate member pair (36 shared lines) torch_geometric/nn/models/gpse.py:731 — torch_geometric/nn/models/gpse.py:731-814 | torch_geometric/nn/models/gpse.py:830-919 — These two members are variants of one another: 36 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (32 shared lines) · ×1
  • Near-duplicate member pair (32 shared lines) torch_geometric/datasets/graphland.py:440 — torch_geometric/datasets/graphland.py:440-533 | torch_geometric/datasets/graphland.py:536-695 — These two members are variants of one another: 32 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (29 shared lines) · ×1
  • Near-duplicate member pair (29 shared lines) torch_geometric/edge_index.py:1589 — torch_geometric/edge_index.py:1589-1627 | torch_geometric/edge_index.py:1686-1719 — These two members are variants of one another: 29 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×1
  • Edited copy of a member (22 corresponding lines) torch_geometric/datasets/actor.py:77 — torch_geometric/datasets/actor.py:77-113 | torch_geometric/datasets/webkb.py:105-134 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (59–60 lines × 2) · ×1
  • Duplicated block (59–60 lines × 2) torch_geometric/distributed/dist_neighbor_sampler.py:667 — torch_geometric/distributed/dist_neighbor_sampler.py:667-726 | torch_geometric/sampler/neighbor_sampler.py:953-1011 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (47–51 lines × 2) · ×1
  • Duplicated block (47–51 lines × 2) torch_geometric/utils/_subgraph.py:94 — torch_geometric/utils/_subgraph.py:94-140 | torch_geometric/utils/_subgraph.py:423-473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (40–46 lines × 2) · ×1
  • Duplicated block (40–46 lines × 2) torch_geometric/distributed/dist_neighbor_sampler.py:521 — torch_geometric/distributed/dist_neighbor_sampler.py:521-566 | torch_geometric/sampler/neighbor_sampler.py:829-868 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/distributed/dist_neighbor_sampler.py:521` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (43 lines × 3) · ×1
  • Duplicated block (43 lines × 3) torch_geometric/utils/sparse.py:149 — torch_geometric/utils/sparse.py:149-191 | torch_geometric/utils/sparse.py:225-267 | torch_geometric/utils/sparse.py:293-335 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) torch_geometric/distributed/dist_link_neighbor_loader.py:79 — torch_geometric/distributed/dist_link_neighbor_loader.py:79-116 | torch_geometric/distributed/dist_neighbor_loader.py:71-109 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/distributed/dist_link_neighbor_loader.py:79` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (34–35 lines × 2) · ×1
  • Duplicated block (34–35 lines × 2) torch_geometric/llm/models/g_retriever.py:126 — torch_geometric/llm/models/g_retriever.py:126-159 | torch_geometric/llm/models/g_retriever.py:190-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (33–34 lines × 2) · ×1
  • Duplicated block (33–34 lines × 2) torch_geometric/distributed/dist_neighbor_sampler.py:737 — torch_geometric/distributed/dist_neighbor_sampler.py:737-770 | torch_geometric/sampler/neighbor_sampler.py:1016-1048 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (28–30 lines × 2) · ×1
  • Duplicated block (28–30 lines × 2) torch_geometric/nn/models/dimenet.py:574 — torch_geometric/nn/models/dimenet.py:574-601 | torch_geometric/nn/models/dimenet.py:846-875 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/models/dimenet.py:574` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 3) · ×1
  • Duplicated block (24 lines × 3) torch_geometric/datasets/graphland.py:613 — torch_geometric/datasets/graphland.py:613-636 | torch_geometric/datasets/graphland.py:641-664 | torch_geometric/datasets/graphland.py:670-693 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (22–24 lines × 2) · ×1
  • Duplicated block (22–24 lines × 2) torch_geometric/graphgym/contrib/layer/generalconv.py:65 — torch_geometric/graphgym/contrib/layer/generalconv.py:65-86 | torch_geometric/graphgym/contrib/layer/generalconv.py:177-200 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `torch_geometric/graphgym/contrib/layer/generalconv.py:62` calls `matmul` and `torch_geometric/graphgym/contrib/layer/generalconv.py:176` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×1
  • Duplicated block (23 lines × 2) torch_geometric/nn/conv/gat_conv.py:363 — torch_geometric/nn/conv/gat_conv.py:363-385 | torch_geometric/nn/conv/gatv2_conv.py:334-356 — before extracting anything, compare `torch_geometric/nn/conv/gat_conv.py` and `torch_geometric/nn/conv/gatv2_conv.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 3) · ×1
  • Duplicated block (22 lines × 3) torch_geometric/nn/conv/appnp.py:88 — torch_geometric/nn/conv/appnp.py:88-109 | torch_geometric/nn/conv/dna_conv.py:277-298 | torch_geometric/nn/conv/gcn2_conv.py:114-135 — before extracting anything, compare `torch_geometric/nn/conv/appnp.py` and `torch_geometric/nn/conv/dna_conv.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (21–22 lines × 2) · ×1
  • Duplicated block (21–22 lines × 2) torch_geometric/data/data.py:1229 — torch_geometric/data/data.py:1229-1249 | torch_geometric/data/hetero_data.py:1244-1265 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note first that the copies are not typed on the same thing: the declarations holding them bind `node1` to `int` in one and `Tuple[str, int]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
D4 · Code Duplication · Duplicated block (4–21 lines × 5) · ×1
  • Duplicated block (4–21 lines × 5) torch_geometric/datasets/git_mol_dataset.py:106 — torch_geometric/datasets/git_mol_dataset.py:106-126 | torch_geometric/datasets/instruct_mol_dataset.py:65-85 | torch_geometric/datasets/molecule_gpt_dataset.py:322-342 | torch_geometric/datasets/qm9.py:206-226 | torch_geometric/datasets/upfd.py:164-167 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) torch_geometric/distributed/dist_neighbor_sampler.py:577 — torch_geometric/distributed/dist_neighbor_sampler.py:577-597 | torch_geometric/sampler/neighbor_sampler.py:879-898 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/distributed/dist_neighbor_sampler.py:577` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) torch_geometric/nn/models/gpse.py:790 — torch_geometric/nn/models/gpse.py:790-810 | torch_geometric/nn/models/gpse.py:895-915 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (19–20 lines × 2) · ×1
  • Duplicated block (19–20 lines × 2) torch_geometric/loader/link_neighbor_loader.py:249 — torch_geometric/loader/link_neighbor_loader.py:249-267 | torch_geometric/loader/neighbor_loader.py:225-244 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/loader/link_neighbor_loader.py:249` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) torch_geometric/loader/link_loader.py:290 — torch_geometric/loader/link_loader.py:290-307 | torch_geometric/loader/node_loader.py:219-237 — before extracting anything, compare `torch_geometric/loader/link_loader.py` and `torch_geometric/loader/node_loader.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/loader/link_loader.py:290` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–19 lines × 2) · ×1
  • Duplicated block (9–19 lines × 2) torch_geometric/nn/models/dimenet.py:678 — torch_geometric/nn/models/dimenet.py:678-696 | torch_geometric/nn/models/gnnff.py:188-196 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (16–18 lines × 2) · ×1
  • Duplicated block (16–18 lines × 2) torch_geometric/contrib/nn/models/mgnan.py:44 — torch_geometric/contrib/nn/models/mgnan.py:44-61 | torch_geometric/contrib/nn/models/mgnan.py:130-145 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–17 lines × 3) · ×1
  • Duplicated block (15–17 lines × 3) torch_geometric/contrib/nn/models/mgnan.py:48 — torch_geometric/contrib/nn/models/mgnan.py:48-64 | torch_geometric/contrib/nn/models/mgnan.py:97-113 | torch_geometric/contrib/nn/models/mgnan.py:134-148 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/contrib/nn/models/mgnan.py:48` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (15–17 lines × 2) · ×1
  • Duplicated block (15–17 lines × 2) graphgym/configs_gen.py:145 — graphgym/configs_gen.py:145-159 | graphgym/configs_gen.py:216-232 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) torch_geometric/datasets/amazon_products.py:83 — torch_geometric/datasets/amazon_products.py:83-98 | torch_geometric/datasets/flickr.py:85-100 | torch_geometric/datasets/reddit2.py:93-108 | torch_geometric/datasets/yelp.py:85-100 — before extracting anything, compare `torch_geometric/datasets/flickr.py` and `torch_geometric/datasets/reddit2.py` as WHOLE FILES: 85% of the shorter file's 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 3 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) torch_geometric/data/data.py:750 — torch_geometric/data/data.py:750-764 | torch_geometric/data/hypergraph_data.py:143-157 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (13–14 lines × 4) · ×1
  • Duplicated block (13–14 lines × 4) torch_geometric/distributed/dist_neighbor_sampler.py:700 — torch_geometric/distributed/dist_neighbor_sampler.py:700-713 | torch_geometric/distributed/dist_neighbor_sampler.py:756-768 | torch_geometric/sampler/neighbor_sampler.py:985-998 | torch_geometric/sampler/neighbor_sampler.py:1034-1046 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/distributed/dist_neighbor_sampler.py:700` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–14 lines × 2) · ×1
  • Duplicated block (10–14 lines × 2) torch_geometric/datasets/word_net.py:89 — torch_geometric/datasets/word_net.py:89-102 | torch_geometric/datasets/word_net.py:205-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/datasets/word_net.py:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) torch_geometric/nn/pool/avg_pool.py:100 — torch_geometric/nn/pool/avg_pool.py:100-113 | torch_geometric/nn/pool/max_pool.py:104-116 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) torch_geometric/llm/models/g_retriever.py:153 — torch_geometric/llm/models/g_retriever.py:153-164 | torch_geometric/llm/models/molecule_gpt.py:147-159 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–13 lines × 2) · ×1
  • Duplicated block (11–13 lines × 2) REDACTED:4494 — REDACTED:4494-4504 | REDACTED:4508-4520 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:4494` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–11 lines × 3) · ×1
  • Duplicated block (9–11 lines × 3) REDACTED:172 — REDACTED:172-180 | REDACTED:196-204 | REDACTED:219-229 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) torch_geometric/nn/conv/appnp.py:95 — torch_geometric/nn/conv/appnp.py:95-103 | torch_geometric/nn/conv/dna_conv.py:284-292 | torch_geometric/nn/conv/gcn2_conv.py:121-129 | torch_geometric/nn/conv/gcn_conv.py:244-253 — before extracting anything, compare `torch_geometric/nn/conv/appnp.py` and `torch_geometric/nn/conv/dna_conv.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 39 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/conv/appnp.py:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (2–10 lines × 3) · ×1
  • Duplicated block (2–10 lines × 3) torch_geometric/datasets/dblp.py:149 — torch_geometric/datasets/dblp.py:149-150 | torch_geometric/datasets/imdb.py:91-100 | torch_geometric/datasets/last_fm.py:98-107 — before extracting anything, compare `torch_geometric/datasets/dblp.py` and `torch_geometric/datasets/imdb.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 37 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×1
  • Duplicated block (8–10 lines × 2) torch_geometric/distributed/local_feature_store.py:225 — torch_geometric/distributed/local_feature_store.py:225-232 | torch_geometric/distributed/local_feature_store.py:302-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) torch_geometric/explain/algorithm/gnn_explainer.py:485 — torch_geometric/explain/algorithm/gnn_explainer.py:485-493 | torch_geometric/explain/algorithm/pg_explainer.py:479-488 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 5) · ×1
  • Duplicated block (9 lines × 5) torch_geometric/datasets/deezer_europe.py:59 — torch_geometric/datasets/deezer_europe.py:59-67 | torch_geometric/datasets/facebook.py:58-66 | torch_geometric/datasets/github.py:73-81 | torch_geometric/datasets/lastfm_asia.py:58-66 | torch_geometric/datasets/twitch.py:116-124 — before extracting anything, compare `torch_geometric/datasets/deezer_europe.py` and `torch_geometric/datasets/facebook.py` as WHOLE FILES: 84% of the shorter file's 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 1 duplicated block(s) this scan matched between them are fragments of that copy, not the extent of it — treat the file pair as the unit. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (4–8 lines × 3) · ×1
  • Duplicated block (4–8 lines × 3) REDACTED:188 — REDACTED:188-191 | REDACTED:207-214 | REDACTED:239-246 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:188` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6–8 lines × 2) · ×1
  • Duplicated block (6–8 lines × 2) torch_geometric/nn/conv/rgcn_conv.py:203 — torch_geometric/nn/conv/rgcn_conv.py:203-210 | torch_geometric/nn/conv/rgcn_conv.py:342-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `torch_geometric/nn/conv/rgcn_conv.py:203` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 7) · ×1
  • Duplicated block (6 lines × 7) torch_geometric/transforms/cartesian.py:55 — torch_geometric/transforms/cartesian.py:55-60 | torch_geometric/transforms/distance.py:53-58 | torch_geometric/transforms/local_cartesian.py:53-58 | torch_geometric/transforms/point_pair_features.py:45-50 | torch_geometric/transforms/polar.py:56-61 | torch_geometric/transforms/spherical.py:59-64 | torch_geometric/transforms/target_indegree.py:49-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 7 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Near-duplicate member family (4 members, 19 shared lines) · ×1
  • Near-duplicate member family (4 members, 19 shared lines) examples/dgcnn_segmentation.py:82 — examples/dgcnn_segmentation.py:82-109 | examples/point_transformer_segmentation.py:194-221 | examples/pointnet2_segmentation.py:111-138 | examples/randlanet_segmentation.py:166-197 — These 4 members are variants of one another: a block of 19 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 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) examples/mnist_graclus.py:46 — examples/mnist_graclus.py:46-60 | examples/mnist_nn_conv.py:59-73 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) examples/ogbn_proteins_deepgcn.py:114 — examples/ogbn_proteins_deepgcn.py:114-137 | examples/rev_gnn.py:154-177 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×1
  • Duplicated block (16 lines × 3) examples/hetero/bipartite_sage.py:74 — examples/hetero/bipartite_sage.py:74-89 | examples/hetero/bipartite_sage_unsup.py:131-146 | examples/multi_gpu/taobao.py:45-60 — before extracting anything, compare `examples/hetero/bipartite_sage_unsup.py` and `examples/multi_gpu/taobao.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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 `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (15 lines × 3) · ×1
  • Duplicated block (15 lines × 3) examples/mnist_graclus.py:69 — examples/mnist_graclus.py:69-83 | examples/mnist_nn_conv.py:82-96 | examples/mnist_voxel_grid.py:64-78 — before extracting anything, compare `examples/mnist_graclus.py` and `examples/mnist_nn_conv.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 30 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–15 lines × 2) · ×1
  • Duplicated block (9–15 lines × 2) examples/llm/g_retriever.py:60 — examples/llm/g_retriever.py:60-74 | REDACTED:21-29 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (13–15 lines × 2) · ×1
  • Duplicated block (13–15 lines × 2) REDACTED:390 — REDACTED:390-402 | REDACTED:483-497 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11 lines × 4) · ×1
  • Duplicated block (11 lines × 4) examples/dgcnn_segmentation.py:67 — examples/dgcnn_segmentation.py:67-77 | examples/point_transformer_segmentation.py:180-190 | examples/pointnet2_segmentation.py:96-106 | examples/randlanet_segmentation.py:151-161 — before extracting anything, compare `examples/dgcnn_segmentation.py` and `examples/point_transformer_segmentation.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/dgcnn_segmentation.py:80` calls `no_grad` and `examples/point_transformer_segmentation.py:193` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (9–11 lines × 2) · ×1
  • Duplicated block (9–11 lines × 2) examples/graph_sage_unsup.py:48 — examples/graph_sage_unsup.py:48-56 | examples/graph_sage_unsup_ppi.py:53-63 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (8–10 lines × 3) · ×1
  • Duplicated block (8–10 lines × 3) examples/pytorch_ignite/gin.py:88 — examples/pytorch_ignite/gin.py:88-97 | examples/pytorch_ignite/gin.py:99-108 | examples/pytorch_ignite/gin.py:109-116 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `examples/pytorch_ignite/gin.py:88` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7–9 lines × 4) · ×1
  • Duplicated block (7–9 lines × 4) examples/dgcnn_segmentation.py:93 — examples/dgcnn_segmentation.py:93-99 | examples/point_transformer_segmentation.py:205-211 | examples/pointnet2_segmentation.py:122-128 | examples/randlanet_segmentation.py:177-185 — before extracting anything, compare `examples/dgcnn_segmentation.py` and `examples/point_transformer_segmentation.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `examples/dgcnn_segmentation.py:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×1
  • Duplicated block (9 lines × 3) examples/hetero/han_imdb.py:64 — examples/hetero/han_imdb.py:64-72 | examples/hetero/hetero_conv_dblp.py:67-75 | examples/hetero/hgt_dblp.py:73-81 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (3–9 lines × 4) · ×1
  • Duplicated block (3–9 lines × 4) examples/dgcnn_segmentation.py:82 — examples/dgcnn_segmentation.py:82-90 | examples/point_transformer_segmentation.py:202-204 | examples/pointnet2_segmentation.py:111-119 | examples/randlanet_segmentation.py:174-176 — before extracting anything, compare `examples/dgcnn_segmentation.py` and `examples/point_transformer_segmentation.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 49 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/dgcnn_segmentation.py:90` calls `tolist`, `zip`, `split` and `examples/point_transformer_segmentation.py:204` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) examples/multi_gpu/mag240m_graphsage.py:173 — examples/multi_gpu/mag240m_graphsage.py:173-180 | examples/multi_gpu/mag240m_graphsage.py:203-209 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (2–6 lines × 5) · ×1
  • Duplicated block (2–6 lines × 5) examples/cluster_gcn_ppi.py:72 — examples/cluster_gcn_ppi.py:72-77 | examples/film.py:75-80 | examples/geniepath.py:138-139 | examples/jit/film.py:71-76 | examples/ppi.py:59-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 5 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 5 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/cluster_gcn_ppi.py:77` calls `model`, `to` and `examples/geniepath.py:139` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (4–5 lines × 7) · ×1
  • Duplicated block (4–5 lines × 7) examples/compile/gcn.py:73 — examples/compile/gcn.py:73-76 | examples/dir_gnn.py:79-83 | examples/gat.py:71-75 | examples/gcn.py:92-95 | examples/jit/gcn.py:53-57 | examples/mixhop.py:72-76 | examples/pmlp.py:44-47 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `examples/compile/gcn.py:71` calls `model`, `argmax` and `examples/dir_gnn.py:79` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 7) · ×1
  • Duplicated block (5 lines × 7) examples/agnn.py:50 — examples/agnn.py:50-54 | examples/arma.py:59-63 | examples/graph_unet.py:49-53 | examples/jit/gat.py:52-56 | examples/sgc.py:53-57 | examples/tagcn.py:52-56 | examples/tensorboard_logging.py:55-59 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 7 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 7 times. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `examples/tensorboard_logging.py:62` calls `model`, `SummaryWriter`, `add_graph` and `examples/agnn.py:57` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×1
  • Duplicated block (5 lines × 3) examples/hetero/bipartite_sage.py:67 — examples/hetero/bipartite_sage.py:67-71 | examples/hetero/bipartite_sage_unsup.py:124-128 | examples/multi_gpu/taobao.py:38-42 — before extracting anything, compare `examples/hetero/bipartite_sage_unsup.py` and `examples/multi_gpu/taobao.py` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 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.
Minor — 541 finding(s)
D34 · Knowledge Freshness · Orphaned file · ×462
  • Orphaned file torch_geometric/data/hetero_data.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/data/data.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/conv/message_passing.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/models/visnet.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/distributed/dist_neighbor_sampler.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/models/gpse.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/sampler/base.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/models/dimenet.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/contrib/nn/models/rbcd_attack.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/data/storage.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/metrics/link_pred.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/loader/ibmb_loader.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/models/basic_gnn.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/models/lpformer.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/data/lightning/datamodule.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file REDACTED:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/datasets/graphland.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/utils/sparse.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/explain/algorithm/gnn_explainer.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/index.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/data/database.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/utils/loop.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/to_hetero_with_bases_transformer.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/conv/rgat_conv.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file torch_geometric/nn/conv/meshcnn_conv.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • + 437 more in this group — see findings.md.
X4 · Structured logging · Interpolated log message defeats structured logging · ×40
  • Interpolated log message defeats structured logging torch_geometric/nn/models/gpse.py:1000 — `info` at line 1000 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging torch_geometric/loader/ibmb_loader.py:203 — `info` at line 203 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging torch_geometric/loader/mixin.py:85 — `debug` at line 85 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging torch_geometric/loader/mixin.py:167 — `debug` at line 167 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging torch_geometric/loader/mixin.py:286 — `debug` at line 286 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging torch_geometric/loader/utils.py:413 — `debug` at line 413 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:614 — `warning` at line 614 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:1813 — `debug` at line 1813 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:1818 — `debug` at line 1818 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:2511 — `warning` at line 2511 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:2903 — `info` at line 2903 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:2906 — `warning` at line 2906 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:2958 — `debug` at line 2958 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:2964 — `debug` at line 2964 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:2968 — `info` at line 2968 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3024 — `warning` at line 3024 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.warning("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.warning("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3122 — `info` at line 3122 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3311 — `info` at line 3311 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3416 — `info` at line 3416 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3489 — `debug` at line 3489 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3503 — `info` at line 3503 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3587 — `error` at line 3587 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.error("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.error("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3616 — `info` at line 3616 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3791 — `debug` at line 3791 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.debug("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.debug("order moved", order_id=order_id, status=status)` with structlog.
  • Interpolated log message defeats structured logging REDACTED:3795 — `info` at line 3795 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
  • + 15 more in this group — see findings.md.
X10 · Duplicated predicate · Duplicated predicate · ×25
  • Duplicated predicate torch_geometric/data/data.py:658 — `'batch' in key and isinstance(value, Tensor)` appears character-identically in 3 files — torch_geometric/data/data.py, torch_geometric/data/hetero_data.py, torch_geometric/data/temporal.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/loader/link_loader.py:306 — `edge is not None and 'e_id' not in data[key]` appears character-identically in 2 files — torch_geometric/loader/link_loader.py, torch_geometric/loader/node_loader.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/distributed/dist_neighbor_loader.py:69 — `input_time is not None and time_attr is None` appears character-identically in 2 files — torch_geometric/distributed/dist_neighbor_loader.py, torch_geometric/loader/neighbor_loader.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate graphgym/custom_graphgym/act/__init__.py:7 — `isfile(f) and not f.endswith('__init__.py')` appears character-identically in 26 files — graphgym/custom_graphgym/act/__init__.py, graphgym/custom_graphgym/config/__init__.py, graphgym/custom_graphgym/encoder/__init__.py, graphgym/custom_graphgym/head/__init__.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:162 — `isinstance(idx, Sequence) and not isinstance(idx, str)` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:175 — `isinstance(idx, Tensor) and idx.dim() == 0` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:153 — `isinstance(idx, Tensor) and idx.dtype == torch.bool` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:150 — `isinstance(idx, Tensor) and idx.dtype == torch.long` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:159 — `isinstance(idx, np.ndarray) and idx.dtype == bool` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:156 — `isinstance(idx, np.ndarray) and idx.dtype == np.int64` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/batch.py:176 — `isinstance(idx, np.ndarray) and np.isscalar(idx)` appears character-identically in 2 files — torch_geometric/data/batch.py, torch_geometric/data/dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/edge_index.py:1602 — `isinstance(other, Tensor) and other.numel() <= 1` appears character-identically in 2 files — torch_geometric/edge_index.py, torch_geometric/index.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/data.py:1257 — `isinstance(value, Tensor) and value.dim() == 0` appears character-identically in 2 files — torch_geometric/data/data.py, torch_geometric/data/in_memory_dataset.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/data/collate.py:114 — `isinstance(value, Tensor) and value.is_cuda` appears character-identically in 2 files — torch_geometric/data/collate.py, torch_geometric/data/data.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/module_dict.py:48 — `key[0] == '<' and key[-1] == '>' and '___' in key` appears character-identically in 2 files — torch_geometric/nn/module_dict.py, torch_geometric/nn/parameter_dict.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/module_dict.py:45 — `key[0] == '<' and key[-1] == '>' and key[1:-1] in cls.CLASS_ATTRS` appears character-identically in 2 files — torch_geometric/nn/module_dict.py, torch_geometric/nn/parameter_dict.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/to_hetero_transformer.py:148 — `len(metadata[0]) > 0 and len(metadata[1]) > 0` appears character-identically in 2 files — torch_geometric/nn/to_hetero_transformer.py, torch_geometric/nn/to_hetero_with_bases_transformer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:37 — `log and 'PYTEST_CURRENT_TEST' not in os.environ` appears character-identically in 3 files — REDACTED, torch_geometric/data/extract.py, torch_geometric/io/fs.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/distributed/dist_neighbor_sampler.py:658 — `neg_sampling is None or neg_sampling.is_binary()` appears character-identically in 2 files — torch_geometric/distributed/dist_neighbor_sampler.py, torch_geometric/sampler/neighbor_sampler.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/to_hetero_transformer.py:347 — `node.type is not None and isinstance(node.args[0], Node)` appears character-identically in 2 files — torch_geometric/nn/to_hetero_transformer.py, torch_geometric/nn/to_hetero_with_bases_transformer.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/conv/graph_conv.py:104 — `not torch.jit.is_scripting() and isinstance(edge_index, EdgeIndex)` appears character-identically in 7 files — torch_geometric/nn/conv/graph_conv.py, torch_geometric/nn/conv/message_passing.py, torch_geometric/utils/_coalesce.py, torch_geometric/utils/_sort_edge_index.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/to_hetero_module.py:57 — `not torch_geometric.typing.WITH_PYG_LIB or is_compiling()` appears character-identically in 2 files — torch_geometric/nn/to_hetero_module.py, torch_geometric/utils/dropout.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/nn/conv/rgat_conv.py:236 — `num_bases is not None and num_blocks is not None` appears character-identically in 2 files — torch_geometric/nn/conv/rgat_conv.py, torch_geometric/nn/conv/rgcn_conv.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/loader/link_loader.py:255 — `out.edge is not None and 'e_id' not in data` appears character-identically in 2 files — torch_geometric/loader/link_loader.py, torch_geometric/loader/node_loader.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate torch_geometric/loader/link_loader.py:309 — `perm is not None and perm.get(key, None) is not None` appears character-identically in 2 files — torch_geometric/loader/link_loader.py, torch_geometric/loader/node_loader.py. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D34 · Knowledge Freshness · Most significant orphaned file · ×3
  • Most significant orphaned file REDACTED:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file torch_geometric/edge_index.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
  • Most significant orphaned file torch_geometric/sampler/neighbor_sampler.py:1 — One of the orphaned files carrying the most lost knowledge — ranked by size weighted by the file's role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: torch_geometric/metrics/link_pred.py. Pair on, review, or document these before any departure.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 5 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (6 single-owned of 495 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; 495 of the 745 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (1 file(s)), anonymized user #6 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: torch_geometric/nn/aggr/basic.py, torch_geometric/llm/utils/feature_store.py, torch_geometric/nn/pool/cluster_pool.py, torch_geometric/utils/_to_dense_batch.py, torch_geometric/datasets/movie_lens.py.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 1 of 2 project(s) overshoot their size bounds, lowering Project Cohesion to 0.0/10. The most over is `(repository root)` (116470 LoC, 1318 module-visible types across 72 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Concentrated knowledge decay · ×1
  • Concentrated knowledge decay — 465 of 495 significant files have no living knowledge, while the repository is still being changed at a low rate (9 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 465 separate risks. Counted over 495 of the 745 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. The code moved on without the people who understood these files: document them or schedule a read-through before the next change lands in them.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M3 · Folder & project structure · No src/ separation · ×1
  • No src/ separation — Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST REDACTED:4 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 13855 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · Dependabot does not watch pip · ×1
  • Dependabot does not watch pip REDACTED:3 — `REDACTED` schedules updates, but no `package-ecosystem` entry covers `pip`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entry to the `updates:` list.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency — This repository's Python dependencies were read: 9 shipped distribution(s) across 2 manifest(s) (47 development or optional declaration(s) excluded, because a consumer does not install them). Whether any of them is behind its current release is the dependency-CURRENCY question, and no declaration here carries an EXACT pin to ask it about — every one is a floor or a range, which installs the newest release it admits and therefore cannot be behind one. That is a healthy declaration style, NOT a defect and NOT a gap in this analyzer; there is simply no currency question to answer. This is NOT a finding that these dependencies are current or healthy. Lockfiles are deliberately not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock): the four disagree about dev/optional membership, and misreading one would charge a test-only package a consumer never receives. Known CVEs in the same dependency graph are a separate question, reported under D30.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-65e9173ffee9449582c15a3f94f364f5/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-65e9173ffee9449582c15a3f94f364f5/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt .71artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .15artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1a6b6-a540-7582-b274-bf9af456b657 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md