Public report of pyg-team/pytorch_geometric, published 16 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). 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, 16 November 2026, 15:52 UTC · Survey ID cd_cc24d47c26544e15ae0ec6af5d6a831d
pyg-team/pytorch_geometric
Measured 16 November 2026, 15:52 UTC, at code version d1f2f86
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 scoreAt riskUp 0.1 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, 63.1
Findings by how serious they are
46 critical987 serious558 minor
18 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 15:52 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 ▸
44of 44 dimensions measured by tools.
1585of 1591 findings point to an exact file and line, so you can open each one in the code. The other 6 concern the repository as a whole, such as missing documentation.
44dimensions across 6 lenses, read from 120,445 lines of product code in 2 projects.
pyg-team/pytorch_geometric is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 66.1 out of 100, which the At risk rating leaves unchanged.
Code Health, at 63.1, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is writing log messages as searchable templates, worth about 2.1 points. Fixing the password or key in the code's history comes next, worth about 1.0 points.
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 forThe 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.
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%
New since the last survey: 202 findings
These 202 critical or serious findings weren't in the previous survey, on 4 November 2026. The first 100 are listed here, and the findings file in the download package lists them all.
Code Duplication · Near-duplicate member pair (86 shared lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) torch_geometric/datasets/amazon_products.py
Code Duplication · Edited copy of a member (64 corresponding lines) torch_geometric/utils/sparse.py
Code Duplication · Edited copy of a member (74 corresponding lines) torch_geometric/datasets/movie_lens_100k.py
Code Duplication · Edited copy of a member (42 corresponding lines) torch_geometric/datasets/word_net.py
Code Duplication · Edited copy of a member (84 corresponding lines) torch_geometric/nn/models/gpse.py
Code Duplication · Edited copy of a member (48 corresponding lines) torch_geometric/data/storage.py
Code Duplication · Edited copy of a member (58 corresponding lines) torch_geometric/nn/conv/gat_conv.py
Code Duplication · Edited copy of a member (24 corresponding lines) torch_geometric/nn/models/metapath2vec.py
Code Duplication · Edited copy of a member (52 corresponding lines) torch_geometric/loader/ibmb_loader.py
Code Duplication · Edited copy of a member (30 corresponding lines) torch_geometric/data/storage.py
Code Duplication · Edited copy of a member (33 corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (34 corresponding lines) torch_geometric/data/data.py
Code Duplication · Edited copy of a member (57 corresponding lines) torch_geometric/distributed/dist_link_neighbor_loader.py
Code Duplication · Edited copy of a member (27 corresponding lines) torch_geometric/nn/to_hetero_transformer.py
Code Duplication · Edited copies of one member (3 members, 60+ corresponding lines) torch_geometric/utils/sparse.py
Code Duplication · Edited copy of a member (19 corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (30 corresponding lines) torch_geometric/graphgym/contrib/layer/generalconv.py
Code Duplication · Edited copy of a member (40 corresponding lines) torch_geometric/data/data.py
Code Duplication · Edited copy of a member (52 corresponding lines) torch_geometric/llm/models/g_retriever.py
Code Duplication · Edited copy of a member (19 corresponding lines) torch_geometric/datasets/geometry.py
Code Duplication · Edited copy of a member (26 corresponding lines) torch_geometric/data/data.py
Code Duplication · Edited copy of a member (17 corresponding lines) torch_geometric/nn/models/metapath2vec.py
Code Duplication · Edited copy of a member (20 corresponding lines) torch_geometric/nn/conv/sg_conv.py
Code Duplication · Edited copy of a member (23 corresponding lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Edited copy of a member (22 corresponding lines) torch_geometric/nn/conv/mixhop_conv.py
Code Duplication · Edited copy of a member (15 corresponding lines) torch_geometric/hash_tensor.py
Code Duplication · Edited copy of a member (31 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (13 corresponding lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Edited copy of a member (14 corresponding lines) torch_geometric/datasets/email_eu_core.py
Code Duplication · Edited copy of a member (27 corresponding lines) torch_geometric/llm/models/molecule_gpt.py
Code Duplication · Edited copy of a member (17 corresponding lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Edited copy of a member (21 corresponding lines) torch_geometric/nn/conv/point_conv.py
Code Duplication · Edited copy of a member (16 corresponding lines) torch_geometric/data/data.py
Code Duplication · Edited copy of a member (11 corresponding lines) torch_geometric/nn/models/rev_gnn.py
Code Duplication · Edited copy of a member (31 corresponding lines) torch_geometric/nn/pool/sag_pool.py
Code Duplication · Edited copy of a member (19 corresponding lines) torch_geometric/nn/conv/cugraph/gat_conv.py
Code Duplication · Edited copy of a member (31 corresponding lines) torch_geometric/nn/pool/avg_pool.py
Code Duplication · Edited copy of a member (14 corresponding lines) torch_geometric/nn/models/sgformer.py
Code Duplication · Edited copy of a member (16 corresponding lines) torch_geometric/nn/attention/performer.py
Code Duplication · Edited copy of a member (11 corresponding lines) graphgym/custom_graphgym/train/example.py
Code Duplication · Edited copy of a member (14 corresponding lines) torch_geometric/metrics/link_pred.py
Code Duplication · Edited copy of a member (15 corresponding lines) torch_geometric/nn/conv/gat_conv.py
Code Duplication · Edited copy of a member (12 corresponding lines) torch_geometric/distributed/utils.py
Code Duplication · Edited copy of a member (23 corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (52 corresponding lines) torch_geometric/nn/pool/__init__.py
Code Duplication · Edited copy of a member (12 corresponding lines) REDACTED
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) examples/gpse.py
Code Duplication · Edited copy of a member (11 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (19 corresponding lines) torch_geometric/contrib/nn/models/mgnan.py
Code Duplication · Edited copy of a member (17 corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (19 corresponding lines) torch_geometric/index.py
Code Duplication · Edited copy of a member (14 corresponding lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Edited copy of a member (11 corresponding lines) torch_geometric/nn/models/node2vec.py
Code Duplication · Edited copies of one member (3 members, 18+ corresponding lines) torch_geometric/nn/conv/cheb_conv.py
Code Duplication · Edited copy of a member (10 corresponding lines) torch_geometric/graphgym/models/layer.py
Code Duplication · Edited copy of a member (15 corresponding lines) torch_geometric/nn/norm/layer_norm.py
Code Duplication · Edited copy of a member (11 corresponding lines) torch_geometric/nn/models/signed_gcn.py
Code Duplication · Edited copy of a member (22 corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (8 corresponding lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Edited copy of a member (5 corresponding lines) torch_geometric/explain/algorithm/pg_explainer.py
Code Duplication · Edited copy of a member (23 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (10 corresponding lines) torch_geometric/data/dataset.py
Code Duplication · Edited copy of a member (13 corresponding lines) torch_geometric/index.py
Code Duplication · Edited copy of a member (12 corresponding lines) torch_geometric/llm/models/glem.py
Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) torch_geometric/nn/inits.py
Code Duplication · Edited copies of one member (3 members, 8+ corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (12 corresponding lines) torch_geometric/nn/conv/graph_conv.py
Code Duplication · Edited copy of a member (9 corresponding lines) examples/gpse.py
Code Duplication · Edited copy of a member (13 corresponding lines) torch_geometric/data/extract.py
Code Duplication · Edited copy of a member (7 corresponding lines) torch_geometric/edge_index.py
Code Duplication · Edited copy of a member (9 corresponding lines) torch_geometric/nn/lr_scheduler.py
Code Duplication · Edited copy of a member (9 corresponding lines) torch_geometric/sampler/base.py
Code Duplication · Edited copy of a member (13 corresponding lines) torch_geometric/explain/explanation.py
Code Duplication · Edited copy of a member (30 corresponding lines) torch_geometric/nn/pool/avg_pool.py
Code Duplication · Edited copy of a member (8 corresponding lines) torch_geometric/datasets/aminer.py
Code Duplication · Edited copy of a member (14 corresponding lines) torch_geometric/nn/conv/sg_conv.py
Code Duplication · Edited copy of a member (7 corresponding lines) torch_geometric/nn/inits.py
Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) torch_geometric/nn/pool/glob.py
Code Duplication · Edited copy of a member (11 corresponding lines) torch_geometric/hash_tensor.py
Code Duplication · Edited copy of a member (11 corresponding lines) torch_geometric/nn/conv/dna_conv.py
Code Duplication · Edited copy of a member (15 corresponding lines) torch_geometric/nn/models/lpformer.py
Code Duplication · Edited copy of a member (10 corresponding lines) torch_geometric/nn/resolver.py
Code Duplication · Edited copy of a member (12 corresponding lines) torch_geometric/nn/pool/pan_pool.py
Code Duplication · Edited copy of a member (9 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (4 corresponding lines) torch_geometric/datasets/webkb.py
Code Duplication · Edited copy of a member (9 corresponding lines) torch_geometric/nn/conv/gin_conv.py
Code Duplication · Edited copy of a member (8 corresponding lines) torch_geometric/nn/models/autoencoder.py
Code Duplication · Edited copies of one member (3 members, 11+ corresponding lines) torch_geometric/nn/conv/gin_conv.py
Code Duplication · Edited copies of one member (3 members, 9+ corresponding lines) graphgym/custom_graphgym/encoder/example.py
Code Duplication · Edited copy of a member (3 corresponding lines) torch_geometric/datasets/utils/cheatsheet.py
Code Duplication · Edited copy of a member (14 corresponding lines) torch_geometric/metrics/link_pred.py
Code Duplication · Edited copies of one member (3 members, 10+ corresponding lines) torch_geometric/transforms/add_remaining_self_loops.py
Code Duplication · Edited copies of one member (3 members, 5+ corresponding lines) REDACTED
Code Duplication · Edited copy of a member (5 corresponding lines) REDACTED
Code Duplication · Edited copy of a member (5 corresponding lines) torch_geometric/nn/pool/sag_pool.py
Code Duplication · Edited copies of one member (4 members, 4+ corresponding lines) torch_geometric/datasets/amazon_products.py
Code Duplication · Edited copy of a member (4 corresponding lines) torch_geometric/nn/models/gnnff.py
Code Duplication · Edited copy of a member (3 corresponding lines) torch_geometric/datasets/amazon.py
Code Duplication · Edited copy of a member (4 corresponding lines) torch_geometric/datasets/dbp15k.py
We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.
Fixed since the last survey: 20 findings
These 20 critical or serious findings were in the previous survey, on 4 November 2026, and are gone from this one.
Code Duplication · Near-duplicate member family (4 members, 29 shared lines) torch_geometric/datasets/amazon_products.py
Code Duplication · Near-duplicate member pair (86 shared lines) torch_geometric/nn/models/dimenet.py
Code Duplication · Near-duplicate member pair (36 shared lines) torch_geometric/nn/models/gpse.py
€63,000 to €310,000, for 1,042 to 3,306 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problem
Standard, 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.
Size
Large: 120,445 lines of product code
What it is not
Not 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.
Raises the score by about 2.1 points · Medium effort · Structured logging
2
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED.
Raises the score by about 1.0 point · 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.
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 63.1 (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 2.1 points 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 6.9 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 3% to 6% on every change. The history of the code shows how much it changes: about 451 lines over the last 90 days, which is about 1,829 lines a year. At that pace, the extra work comes to an estimated 0.1 to 0.7 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.
data.feature_store uses utils.mixin, so a change to utils.mixin can break data.feature_store, while a change to data.feature_store can't break utils.mixin.
Position
Below the diagonal: data.feature_store uses a module listed above it, which is the healthy direction.
nn.conv.cugraph.base uses edge_index, so a change to edge_index can break nn.conv.cugraph.base, while a change to nn.conv.cugraph.base can't break edge_index.
Position
Below the diagonal: nn.conv.cugraph.base uses a module listed above it, which is the healthy direction.
distributed.dist_neighbor_sampler uses distributed.dist_context, so a change to distributed.dist_context can break distributed.dist_neighbor_sampler, while a change to distributed.dist_neighbor_sampler can't break distributed.dist_context.
Position
Below the diagonal: distributed.dist_neighbor_sampler uses a module listed above it, which is the healthy direction.
distributed.dist_neighbor_sampler uses distributed.rpc, so a change to distributed.rpc can break distributed.dist_neighbor_sampler, while a change to distributed.dist_neighbor_sampler can't break distributed.rpc.
Position
Below the diagonal: distributed.dist_neighbor_sampler uses a module listed above it, which is the healthy direction.
distributed.dist_neighbor_sampler uses sampler.base, so a change to sampler.base can break distributed.dist_neighbor_sampler, while a change to distributed.dist_neighbor_sampler can't break sampler.base.
Position
Below the diagonal: distributed.dist_neighbor_sampler uses a module listed above it, which is the healthy direction.
distributed.local_feature_store uses distributed.rpc, so a change to distributed.rpc can break distributed.local_feature_store, while a change to distributed.local_feature_store can't break distributed.rpc.
Position
Below the diagonal: distributed.local_feature_store uses a module listed above it, which is the healthy direction.
distributed.local_feature_store uses data.feature_store, so a change to data.feature_store can break distributed.local_feature_store, while a change to distributed.local_feature_store can't break data.feature_store.
Position
Below the diagonal: distributed.local_feature_store uses a module listed above it, which is the healthy direction.
distributed.local_graph_store uses data.graph_store, so a change to data.graph_store can break distributed.local_graph_store, while a change to distributed.local_graph_store can't break data.graph_store.
Position
Below the diagonal: distributed.local_graph_store uses a module listed above it, which is the healthy direction.
explain.algorithm.base uses explain.config, so a change to explain.config can break explain.algorithm.base, while a change to explain.algorithm.base can't break explain.config.
Position
Below the diagonal: explain.algorithm.base uses a module listed above it, which is the healthy direction.
llm.utils.backend_utils uses data.feature_store, so a change to data.feature_store can break llm.utils.backend_utils, while a change to llm.utils.backend_utils can't break data.feature_store.
Position
Below the diagonal: llm.utils.backend_utils uses a module listed above it, which is the healthy direction.
llm.utils.backend_utils uses data.graph_store, so a change to data.graph_store can break llm.utils.backend_utils, while a change to llm.utils.backend_utils can't break data.graph_store.
Position
Below the diagonal: llm.utils.backend_utils uses a module listed above it, which is the healthy direction.
loader.link_loader uses sampler.base, so a change to sampler.base can break loader.link_loader, while a change to loader.link_loader can't break sampler.base.
Position
Below the diagonal: loader.link_loader uses a module listed above it, which is the healthy direction.
loader.node_loader uses sampler.base, so a change to sampler.base can break loader.node_loader, while a change to loader.node_loader can't break sampler.base.
Position
Below the diagonal: loader.node_loader uses a module listed above it, which is the healthy direction.
data.hetero_data uses data.storage, so a change to data.storage can break data.hetero_data, while a change to data.hetero_data can't break data.storage.
Position
Below the diagonal: data.hetero_data uses a module listed above it, which is the healthy direction.
data.hetero_data uses data.feature_store, so a change to data.feature_store can break data.hetero_data, while a change to data.hetero_data can't break data.feature_store.
Position
Below the diagonal: data.hetero_data uses a module listed above it, which is the healthy direction.
data.hetero_data uses data.graph_store, so a change to data.graph_store can break data.hetero_data, while a change to data.hetero_data can't break data.graph_store.
Position
Below the diagonal: data.hetero_data uses a module listed above it, which is the healthy direction.
datasets.graph_generator.base uses data.data, so a change to data.data can break datasets.graph_generator.base, while a change to datasets.graph_generator.base can't break data.data.
Position
Below the diagonal: datasets.graph_generator.base uses a module listed above it, which is the healthy direction.
datasets.motif_generator.custom uses data.data, so a change to data.data can break datasets.motif_generator.custom, while a change to datasets.motif_generator.custom can't break data.data.
Position
Below the diagonal: datasets.motif_generator.custom uses a module listed above it, which is the healthy direction.
distributed.dist_loader uses distributed.dist_context, so a change to distributed.dist_context can break distributed.dist_loader, while a change to distributed.dist_loader can't break distributed.dist_context.
Position
Below the diagonal: distributed.dist_loader uses a module listed above it, which is the healthy direction.
distributed.dist_loader uses distributed.dist_neighbor_sampler, so a change to distributed.dist_neighbor_sampler can break distributed.dist_loader, while a change to distributed.dist_loader can't break distributed.dist_neighbor_sampler.
Position
Below the diagonal: distributed.dist_loader uses a module listed above it, which is the healthy direction.
llm.utils uses llm.utils.backend_utils, so a change to llm.utils.backend_utils can break llm.utils, while a change to llm.utils can't break llm.utils.backend_utils.
Position
Below the diagonal: llm.utils uses a module listed above it, which is the healthy direction.
llm.utils.graph_store uses data.feature_store, so a change to data.feature_store can break llm.utils.graph_store, while a change to llm.utils.graph_store can't break data.feature_store.
Position
Below the diagonal: llm.utils.graph_store uses a module listed above it, which is the healthy direction.
llm.utils.graph_store uses sampler.base, so a change to sampler.base can break llm.utils.graph_store, while a change to llm.utils.graph_store can't break sampler.base.
Position
Below the diagonal: llm.utils.graph_store uses a module listed above it, which is the healthy direction.
llm.utils.graph_store uses distributed.local_graph_store, so a change to distributed.local_graph_store can break llm.utils.graph_store, while a change to llm.utils.graph_store can't break distributed.local_graph_store.
Position
Below the diagonal: llm.utils.graph_store uses a module listed above it, which is the healthy direction.
data.in_memory_dataset uses data.data, so a change to data.data can break data.in_memory_dataset, while a change to data.in_memory_dataset can't break data.data.
Position
Below the diagonal: data.in_memory_dataset uses a module listed above it, which is the healthy direction.
data.in_memory_dataset uses data.dataset, so a change to data.dataset can break data.in_memory_dataset, while a change to data.in_memory_dataset can't break data.dataset.
Position
Below the diagonal: data.in_memory_dataset uses a module listed above it, which is the healthy direction.
data.lightning.datamodule uses data.dataset, so a change to data.dataset can break data.lightning.datamodule, while a change to data.lightning.datamodule can't break data.dataset.
Position
Below the diagonal: data.lightning.datamodule uses a module listed above it, which is the healthy direction.
data.on_disk_dataset uses data.data, so a change to data.data can break data.on_disk_dataset, while a change to data.on_disk_dataset can't break data.data.
Position
Below the diagonal: data.on_disk_dataset uses a module listed above it, which is the healthy direction.
data.on_disk_dataset uses data.dataset, so a change to data.dataset can break data.on_disk_dataset, while a change to data.on_disk_dataset can't break data.dataset.
Position
Below the diagonal: data.on_disk_dataset uses a module listed above it, which is the healthy direction.
distributed uses distributed.dist_context, so a change to distributed.dist_context can break distributed, while a change to distributed can't break distributed.dist_context.
Position
Below the diagonal: distributed uses a module listed above it, which is the healthy direction.
distributed uses distributed.local_feature_store, so a change to distributed.local_feature_store can break distributed, while a change to distributed can't break distributed.local_feature_store.
Position
Below the diagonal: distributed uses a module listed above it, which is the healthy direction.
distributed uses distributed.local_graph_store, so a change to distributed.local_graph_store can break distributed, while a change to distributed can't break distributed.local_graph_store.
Position
Below the diagonal: distributed uses a module listed above it, which is the healthy direction.
distributed.dist_link_neighbor_loader uses distributed.dist_context, so a change to distributed.dist_context can break distributed.dist_link_neighbor_loader, while a change to distributed.dist_link_neighbor_loader can't break distributed.dist_context.
Position
Below the diagonal: distributed.dist_link_neighbor_loader uses a module listed above it, which is the healthy direction.
distributed.dist_link_neighbor_loader uses loader.link_loader, so a change to loader.link_loader can break distributed.dist_link_neighbor_loader, while a change to distributed.dist_link_neighbor_loader can't break loader.link_loader.
Position
Below the diagonal: distributed.dist_link_neighbor_loader uses a module listed above it, which is the healthy direction.
distributed.dist_link_neighbor_loader uses distributed.dist_loader, so a change to distributed.dist_loader can break distributed.dist_link_neighbor_loader, while a change to distributed.dist_link_neighbor_loader can't break distributed.dist_loader.
Position
Below the diagonal: distributed.dist_link_neighbor_loader uses a module listed above it, which is the healthy direction.
distributed.dist_neighbor_loader uses distributed.dist_context, so a change to distributed.dist_context can break distributed.dist_neighbor_loader, while a change to distributed.dist_neighbor_loader can't break distributed.dist_context.
Position
Below the diagonal: distributed.dist_neighbor_loader uses a module listed above it, which is the healthy direction.
distributed.dist_neighbor_loader uses loader.node_loader, so a change to loader.node_loader can break distributed.dist_neighbor_loader, while a change to distributed.dist_neighbor_loader can't break loader.node_loader.
Position
Below the diagonal: distributed.dist_neighbor_loader uses a module listed above it, which is the healthy direction.
distributed.dist_neighbor_loader uses distributed.dist_loader, so a change to distributed.dist_loader can break distributed.dist_neighbor_loader, while a change to distributed.dist_neighbor_loader can't break distributed.dist_loader.
Position
Below the diagonal: distributed.dist_neighbor_loader uses a module listed above it, which is the healthy direction.
explain.explanation uses explain.config, so a change to explain.config can break explain.explanation, while a change to explain.explanation can't break explain.config.
Position
Below the diagonal: explain.explanation uses a module listed above it, which is the healthy direction.
explain.explanation uses data.data, so a change to data.data can break explain.explanation, while a change to explain.explanation can't break data.data.
Position
Below the diagonal: explain.explanation uses a module listed above it, which is the healthy direction.
explain.explanation uses data.hetero_data, so a change to data.hetero_data can break explain.explanation, while a change to explain.explanation can't break data.hetero_data.
Position
Below the diagonal: explain.explanation uses a module listed above it, which is the healthy direction.
datasets.fake uses data.hetero_data, so a change to data.hetero_data can break datasets.fake, while a change to datasets.fake can't break data.hetero_data.
Position
Below the diagonal: datasets.fake uses a module listed above it, which is the healthy direction.
datasets.fake uses data.in_memory_dataset, so a change to data.in_memory_dataset can break datasets.fake, while a change to datasets.fake can't break data.in_memory_dataset.
Position
Below the diagonal: datasets.fake uses a module listed above it, which is the healthy direction.
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 category
Findings
Severity
A05:2025 — Injection
71
High / Critical
A02:2025 — Security Misconfiguration
15
High / Critical
A07:2025 — Authentication Failures
2
High / Critical
Roadmap
Top priorities: Interpolated log message defeats structured logging; Swallowed exception (empty catch); Resolve the 469 Orphaned file finding(s) in Knowledge Freshness — start with base.py (7), utils.py (7), __init__.py (6).
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
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.
Per-file score 0–10 — a quality signature. Of 346 files carrying findings, judged against the Production bar: 3% slop · 57% mixed · 40% near-clean.
File
Score
Band
Worst signal
REDACTED
0.8
Slop
Secrets (history): REDACTED: REDACTED
REDACTED
1.0
Slop
IaC & Container Security: Critical IaC: REDACTED
REDACTED
1.8
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
2.5
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
2.8
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.0
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.6
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.7
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
3.7
Slop
Static Analysis (SAST): High: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.2
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
4.3
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
4.5
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
4.8
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.0
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): Medium: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.1
Mixed
Static Analysis (SAST): High: REDACTED
REDACTED
5.1
Mixed
Static 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 — 987
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 — 558
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 18
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 44 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 — 44 dimensions across the health lenses
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
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, 1585 of 1591 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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 MEASURED: the Python half could not be measured — the pytest suite ran no test, so nothing was measured (no report). Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a coverage step in CI (`pytest -m "not rag and not dataset" --cov --cov`), uploaded by `codecov/codecov-action` and a Codecov configuration (codecov.yml, target 80%) shows coverage is measured in your own CI.
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 naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
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. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these 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.
AXB2 Runtime readiness — 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. An image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository. (rule: registry). The renderer reported: 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; likely cause (our sandbox): an image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository; runtime evidence skipped.
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; likely cause (our sandbox): an image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository; 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, Scala, Rust and Java 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, Scala and Rust 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.
M4 Documentation accuracy — 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
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, Kotlin source, and Rust 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.
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.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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.
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.
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.
+ 76 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 173 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
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.
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).
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).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
252 duplicated block group(s) detected. 7.7 % of the production lines (9,251 of 120,445) are in a reported copy. A further 219 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 140 of the 471 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.
Edited copy of a member (4 corresponding lines) · ×19torch_geometric/datasets/webkb.py:99
+ 158 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with data.py (2), edge_index.py (2), base.py (2). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 21 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), storage.py, geometry.py. — One of this dimension's main actionable groups (21 warning-level).
Resolve the 20 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with malnet_tiny.py, edge_index.py, hash_tensor.py. — One of this dimension's main actionable groups (20 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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).
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
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.
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.
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.
1 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is torch_geometric/utils/_to_dense_batch.py. Counted over 490 of the 745 production source files in this repository: 250 are under the ~2,400-byte size floor this dimension measures over, and the remaining 5 have no attributable history left to measure.
Off-boarding risk: anonymized user #1
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
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).
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).
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).
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 of 2 build units (Python) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesionpyproject.toml:1
What to do
Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion — start with pyproject.toml. — 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.
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.
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
Resolve the 1 REDACTED finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
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).
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
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).
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).
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.
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).
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).
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.
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.
472 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.
Resolve the 469 Orphaned file finding(s) in Knowledge Freshness — start with base.py (7), utils.py (7), __init__.py (6). — One of this dimension's main actionable groups (469 recommendation-level).
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).
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.
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.
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.
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.
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.
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.
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.
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.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
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.
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.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
docker/README.md names Python 3.7, but pyproject.toml:13 requires `requires-python=">=3.10"`: the package does not install on Python 3.7. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docker/README.md:31
What to do
Reconcile the README with reality: docker/README.md names Python 3.7, but pyproject.toml:13 requires `requires-python=">=3.10"`: the package does not install on Python 3.7.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
P2 · Observability7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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 10 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.
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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
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
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
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.
Unscored — 3 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 publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). 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.
P12 CI test-gate honesty — 1 observation(s) recorded · 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.
X10 Duplicated predicate — 35 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 — 66 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 (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (6 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (6 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
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; likely cause (our sandbox): an image the REDACTED builds FROM could not be fetched: our sandbox reaches registries only through its pull-through mirror, and the mirror did not serve it. This is a limit of our sandbox, not of your repository; 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 — ~36085 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 does not read html yet; 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.
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 measured — Python suite
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, Scala, Rust and Java, 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
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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
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.
X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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.
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.
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/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/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/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/datasets/s3dis.py:79— torch_geometric/datasets/s3dis.py:79-84 | torch_geometric/datasets/shapenet.py:181-186 — 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/dense/diff_pool.py:70— torch_geometric/nn/dense/diff_pool.py:70-75 | torch_geometric/nn/dense/mincut_pool.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 (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/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.
Duplicated block (6 lines × 2) examples/randlanet_classification.py:180— examples/randlanet_classification.py:180-185 | examples/randlanet_segmentation.py:148-153 — 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/tgn.py:128— examples/tgn.py:128-134 | examples/tgn.py:165-170 — 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) examples/multi_gpu/distributed_sampling_multinode.py:33— examples/multi_gpu/distributed_sampling_multinode.py:33-38 | examples/reddit.py:43-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.
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.
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/nn/pool/avg_pool.py:84— torch_geometric/nn/pool/avg_pool.py:84-93 | torch_geometric/nn/pool/max_pool.py:88-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 (10 lines × 2) torch_geometric/transforms/add_metapaths.py:122— torch_geometric/transforms/add_metapaths.py:122-131 | torch_geometric/transforms/add_metapaths.py:251-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 (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/colors_topk_pool.py:88— examples/colors_topk_pool.py:88-97 | examples/triangles_sag_pool.py:91-100 — before extracting anything, compare `examples/colors_topk_pool.py` and `examples/triangles_sag_pool.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.
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) 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) 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/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/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/explain/algorithm/dummy_explainer.py:33— torch_geometric/explain/algorithm/dummy_explainer.py:33-39 | torch_geometric/explain/algorithm/dummy_explainer.py:51-57 — 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 — before extracting anything, compare `examples/colors_topk_pool.py` and `examples/triangles_sag_pool.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.
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/multi_gpu/distributed_sampling.py:101— examples/multi_gpu/distributed_sampling.py:101-107 | examples/multi_gpu/distributed_sampling_multinode.py:114-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 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) examples/quiver/multi_gpu_quiver.py:32— examples/quiver/multi_gpu_quiver.py:32-38 | examples/quiver/single_gpu_quiver.py:58-64 — 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/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.
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/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/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/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.
Duplicated block (5 lines × 2) examples/proteins_dmon_pool.py:55— examples/proteins_dmon_pool.py:55-59 | examples/proteins_mincut_pool.py:57-61 — 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) examples/argva_node_clustering.py:127— examples/argva_node_clustering.py:127-131 | examples/node2vec.py:72-76 — 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· Edited copy of a member (4 corresponding lines) · ×19
Edited copy of a member (4 corresponding lines) torch_geometric/datasets/webkb.py:99— torch_geometric/datasets/webkb.py:99-102 | torch_geometric/datasets/actor.py:71-74 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/nn/models/gnnff.py:15— torch_geometric/nn/models/gnnff.py:15-18 | torch_geometric/nn/models/schnet.py:438-441 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/datasets/dbp15k.py:67— torch_geometric/datasets/dbp15k.py:67-71 | torch_geometric/datasets/pascal_pf.py:80-83 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) graphgym/custom_graphgym/encoder/example.py:19— graphgym/custom_graphgym/encoder/example.py:19-22 | torch_geometric/graphgym/models/encoder.py:24-27 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/nn/aggr/gru.py:54— torch_geometric/nn/aggr/gru.py:54-57 | torch_geometric/nn/aggr/lstm.py:54-57 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/datasets/hgb_dataset.py:91— torch_geometric/datasets/hgb_dataset.py:91-94 | torch_geometric/datasets/upfd.py:126-129 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/llm/models/g_retriever.py:250— torch_geometric/llm/models/g_retriever.py:250-253 | torch_geometric/llm/models/molecule_gpt.py:218-222 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/loader/data_list_loader.py:37— torch_geometric/loader/data_list_loader.py:37-40 | torch_geometric/loader/dense_data_loader.py:42-45 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/edge_index.py:112— torch_geometric/edge_index.py:112-115 | torch_geometric/index.py:57-60 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) torch_geometric/nn/norm/batch_norm.py:176— torch_geometric/nn/norm/batch_norm.py:176-180 | torch_geometric/nn/norm/layer_norm.py:172-175 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/contrib/pgm_explainer_node_classification.py:29— examples/contrib/pgm_explainer_node_classification.py:29-32 | examples/tensorboard_logging.py:24-27 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/pointnet2_segmentation.py:44— examples/pointnet2_segmentation.py:44-48 | examples/randlanet_segmentation.py:62-65 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/pytorch_lightning/gin.py:44— examples/pytorch_lightning/gin.py:44-47 | examples/pytorch_lightning/relational_gnn.py:80-83 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/pytorch_lightning/gin.py:50— examples/pytorch_lightning/gin.py:50-53 | examples/pytorch_lightning/relational_gnn.py:86-89 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/quiver/single_gpu_quiver.py:43— examples/quiver/single_gpu_quiver.py:43-49 | examples/reddit.py:37-40 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/contrib/rbcd_attack.py:83— examples/contrib/rbcd_attack.py:83-86 | examples/rgcn_link_pred.py:43-47 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/multi_gpu/mag240m_graphsage.py:18— examples/multi_gpu/mag240m_graphsage.py:18-22 | examples/pytorch_lightning/relational_gnn.py:66-69 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/compile/gcn.py:30— examples/compile/gcn.py:30-33 | examples/contrib/rbcd_attack.py:22-25 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (4 corresponding lines) examples/compile/gin.py:45— examples/compile/gin.py:45-49 | examples/mutag_gin.py:62-65 — These two members are one piece of code written twice and then edited apart: 4 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
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) torch_geometric/transforms/polar.py:37— torch_geometric/transforms/polar.py:37-47 | torch_geometric/transforms/spherical.py:37-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. ★ 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 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 (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.
Duplicated block (11 lines × 2) REDACTED:116— REDACTED:116-126 | REDACTED:143-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.
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/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/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/edge_index.py:1230— torch_geometric/edge_index.py:1230-1237 | torch_geometric/index.py:401-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.
Duplicated block (8 lines × 2) torch_geometric/nn/conv/rgat_conv.py:461— torch_geometric/nn/conv/rgat_conv.py:461-468 | torch_geometric/nn/conv/rgat_conv.py:473-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:461` 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. 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/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) examples/multi_gpu/distributed_sampling_multinode.py:143— examples/multi_gpu/distributed_sampling_multinode.py:143-150 | examples/quiver/multi_gpu_quiver.py:114-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 (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/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/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/module_dict.py:43— torch_geometric/nn/module_dict.py:43-51 | torch_geometric/nn/parameter_dict.py:44-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 (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/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.
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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×11
Edited copy of a member (9 corresponding lines) examples/gpse.py:117— examples/gpse.py:117-129 | torch_geometric/graphgym/models/gnn.py:73-81 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) torch_geometric/nn/lr_scheduler.py:123— torch_geometric/nn/lr_scheduler.py:123-131 | torch_geometric/nn/lr_scheduler.py:173-183 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) torch_geometric/sampler/base.py:91— torch_geometric/sampler/base.py:91-99 | torch_geometric/sampler/base.py:154-164 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) REDACTED:90— REDACTED:90-99 | torch_geometric/datasets/willow_object_class.py:67-75 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) torch_geometric/nn/conv/gin_conv.py:58— torch_geometric/nn/conv/gin_conv.py:58-66 | torch_geometric/nn/dense/dense_gin_conv.py:18-26 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) torch_geometric/explain/algorithm/gnn_explainer.py:472— torch_geometric/explain/algorithm/gnn_explainer.py:472-482 | torch_geometric/explain/algorithm/pg_explainer.py:468-476 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) examples/graph_saint.py:48— examples/graph_saint.py:48-56 | examples/shadow.py:32-43 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) examples/hetero/load_csv.py:18— examples/hetero/load_csv.py:18-26 | examples/hetero/load_csv.py:31-42 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) examples/llm/g_retriever.py:53— examples/llm/g_retriever.py:53-74 | REDACTED:21-29 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) examples/hetero/bipartite_sage.py:132— examples/hetero/bipartite_sage.py:132-142 | examples/hetero/hetero_link_pred.py:99-107 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) REDACTED:21— REDACTED:21-29 | REDACTED:34-42 — These two members are one piece of code written twice and then edited apart: 9 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.
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.
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.
Duplicated block (16 lines × 2) torch_geometric/nn/models/gpse.py:770— torch_geometric/nn/models/gpse.py:770-785 | torch_geometric/nn/models/gpse.py:868-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.
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 — before extracting anything, compare `examples/colors_topk_pool.py` and `examples/triangles_sag_pool.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.
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.
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.
D4 · Code Duplication· Edited copy of a member (11 corresponding lines) · ×9
Edited copy of a member (11 corresponding lines) torch_geometric/nn/models/rev_gnn.py:272— torch_geometric/nn/models/rev_gnn.py:272-282 | torch_geometric/nn/models/rev_gnn.py:285-299 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) graphgym/custom_graphgym/train/example.py:18— graphgym/custom_graphgym/train/example.py:18-33 | graphgym/custom_graphgym/train/example.py:37-47 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) REDACTED:181— REDACTED:181-195 | torch_geometric/datasets/mnist_superpixels.py:87-97 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) torch_geometric/nn/models/node2vec.py:102— torch_geometric/nn/models/node2vec.py:102-112 | torch_geometric/nn/models/node2vec.py:116-126 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) torch_geometric/nn/models/signed_gcn.py:195— torch_geometric/nn/models/signed_gcn.py:195-205 | torch_geometric/nn/models/signed_gcn.py:208-218 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) torch_geometric/hash_tensor.py:571— torch_geometric/hash_tensor.py:571-583 | torch_geometric/hash_tensor.py:713-723 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) torch_geometric/nn/conv/dna_conv.py:17— torch_geometric/nn/conv/dna_conv.py:17-32 | torch_geometric/nn/models/linkx.py:16-26 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) examples/proteins_dmon_pool.py:85— examples/proteins_dmon_pool.py:85-95 | examples/proteins_mincut_pool.py:87-98 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (11 corresponding lines) examples/hetero/hetero_conv_dblp.py:19— examples/hetero/hetero_conv_dblp.py:19-29 | examples/hetero/hierarchical_sage.py:35-46 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (12 corresponding lines) · ×9
Edited copy of a member (12 corresponding lines) torch_geometric/distributed/utils.py:44— torch_geometric/distributed/utils.py:44-59 | torch_geometric/distributed/utils.py:71-82 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) REDACTED:118— REDACTED:118-130 | torch_geometric/datasets/shrec2016.py:103-114 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) torch_geometric/llm/models/glem.py:120— torch_geometric/llm/models/glem.py:120-133 | torch_geometric/llm/models/glem.py:140-151 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) torch_geometric/nn/conv/graph_conv.py:59— torch_geometric/nn/conv/graph_conv.py:59-70 | torch_geometric/nn/conv/le_conv.py:49-62 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) torch_geometric/nn/pool/pan_pool.py:50— torch_geometric/nn/pool/pan_pool.py:50-62 | torch_geometric/nn/pool/sag_pool.py:82-93 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) examples/gcn2_cora.py:37— examples/gcn2_cora.py:37-48 | examples/gcn2_ppi.py:42-54 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) examples/film.py:24— examples/film.py:24-35 | examples/jit/film.py:25-37 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) examples/proteins_dmon_pool.py:69— examples/proteins_dmon_pool.py:69-80 | examples/proteins_mincut_pool.py:71-82 — These two members are one piece of code written twice and then edited apart: 12 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.
Edited copy of a member (12 corresponding lines) examples/dgcnn_classification.py:118— examples/dgcnn_classification.py:118-129 | examples/proteins_topk_pool.py:68-79 — These two members are one piece of code written twice and then edited apart: 12 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· Edited copy of a member (13 corresponding lines) · ×8
Edited copy of a member (13 corresponding lines) torch_geometric/nn/models/dimenet.py:206— torch_geometric/nn/models/dimenet.py:206-218 | torch_geometric/nn/models/dimenet.py:284-302 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) torch_geometric/index.py:523— torch_geometric/index.py:523-535 | torch_geometric/index.py:547-560 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) torch_geometric/data/extract.py:50— torch_geometric/data/extract.py:50-62 | torch_geometric/data/extract.py:66-78 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) torch_geometric/explain/explanation.py:281— torch_geometric/explain/explanation.py:281-293 | torch_geometric/explain/explanation.py:296-308 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) examples/sign.py:52— examples/sign.py:52-69 | examples/sign.py:74-86 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) examples/gcn2_cora.py:22— examples/gcn2_cora.py:22-34 | examples/gcn2_ppi.py:27-39 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) examples/gpse.py:206— examples/gpse.py:206-221 | examples/gpse.py:226-238 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (13 corresponding lines) examples/hetero/to_hetero_mag.py:61— examples/hetero/to_hetero_mag.py:61-76 | examples/hetero/to_hetero_mag.py:81-93 — These two members are one piece of code written twice and then edited apart: 13 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (14 corresponding lines) · ×7
Edited copy of a member (14 corresponding lines) torch_geometric/datasets/email_eu_core.py:68— torch_geometric/datasets/email_eu_core.py:68-81 | torch_geometric/datasets/polblogs.py:82-96 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (14 corresponding lines) torch_geometric/nn/models/sgformer.py:20— torch_geometric/nn/models/sgformer.py:20-33 | torch_geometric/nn/models/sgformer.py:68-81 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (14 corresponding lines) torch_geometric/metrics/link_pred.py:691— torch_geometric/metrics/link_pred.py:691-704 | torch_geometric/metrics/link_pred.py:854-867 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (14 corresponding lines) torch_geometric/nn/models/dimenet.py:347— torch_geometric/nn/models/dimenet.py:347-360 | torch_geometric/nn/models/dimenet.py:392-408 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (14 corresponding lines) torch_geometric/nn/conv/sg_conv.py:59— torch_geometric/nn/conv/sg_conv.py:59-72 | torch_geometric/nn/conv/ssg_conv.py:67-81 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (14 corresponding lines) torch_geometric/metrics/link_pred.py:93— torch_geometric/metrics/link_pred.py:93-106 | torch_geometric/metrics/link_pred.py:110-126 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (14 corresponding lines) examples/proteins_dmon_pool.py:28— examples/proteins_dmon_pool.py:28-41 | examples/proteins_mincut_pool.py:28-41 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (5 corresponding lines) · ×7
Edited copy of a member (5 corresponding lines) torch_geometric/explain/algorithm/pg_explainer.py:428— torch_geometric/explain/algorithm/pg_explainer.py:428-432 | torch_geometric/explain/algorithm/pg_explainer.py:437-453 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (5 corresponding lines) REDACTED:166— REDACTED:166-171 | REDACTED:96-100 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (5 corresponding lines) torch_geometric/nn/pool/sag_pool.py:144— torch_geometric/nn/pool/sag_pool.py:144-150 | torch_geometric/nn/pool/select/topk.py:146-150 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (5 corresponding lines) examples/rgat.py:49— examples/rgat.py:49-53 | examples/rgcn.py:80-84 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (5 corresponding lines) examples/mnist_graclus.py:39— examples/mnist_graclus.py:39-43 | examples/mnist_voxel_grid.py:26-31 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (5 corresponding lines) examples/film.py:38— examples/film.py:38-42 | examples/jit/film.py:40-44 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (5 corresponding lines) examples/graph_saint.py:34— examples/graph_saint.py:34-40 | examples/shadow.py:25-29 — These two members are one piece of code written twice and then edited apart: 5 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
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.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×6
Edited copy of a member (19 corresponding lines) torch_geometric/edge_index.py:1220— torch_geometric/edge_index.py:1220-1243 | torch_geometric/index.py:394-412 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) torch_geometric/datasets/geometry.py:102— torch_geometric/datasets/geometry.py:102-122 | torch_geometric/datasets/modelnet.py:132-150 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) torch_geometric/nn/conv/cugraph/gat_conv.py:41— torch_geometric/nn/conv/cugraph/gat_conv.py:41-59 | torch_geometric/nn/dense/dense_gat_conv.py:25-48 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) torch_geometric/contrib/nn/models/mgnan.py:44— torch_geometric/contrib/nn/models/mgnan.py:44-64 | torch_geometric/contrib/nn/models/mgnan.py:130-148 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) torch_geometric/index.py:749— torch_geometric/index.py:749-771 | torch_geometric/index.py:817-835 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) examples/hetero/hierarchical_sage.py:94— examples/hetero/hierarchical_sage.py:94-117 | examples/hetero/hierarchical_sage.py:122-140 — These two members are one piece of code written twice and then edited apart: 19 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· Edited copy of a member (2 corresponding lines) · ×6
Edited copy of a member (2 corresponding lines) torch_geometric/nn/to_hetero_transformer.py:424— torch_geometric/nn/to_hetero_transformer.py:424-425 | torch_geometric/nn/to_hetero_with_bases_transformer.py:556-557 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (2 corresponding lines) torch_geometric/nn/models/gnnff.py:24— torch_geometric/nn/models/gnnff.py:24-25 | torch_geometric/nn/models/schnet.py:444-445 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (2 corresponding lines) torch_geometric/datasets/geometry.py:98— torch_geometric/datasets/geometry.py:98-99 | torch_geometric/datasets/modelnet.py:128-129 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (2 corresponding lines) torch_geometric/nn/conv/gmm_conv.py:201— torch_geometric/nn/conv/gmm_conv.py:201-202 | torch_geometric/nn/conv/spline_conv.py:167-168 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (2 corresponding lines) torch_geometric/datasets/nell.py:66— torch_geometric/datasets/nell.py:66-67 | torch_geometric/datasets/planetoid.py:145-146 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (2 corresponding lines) examples/argva_node_clustering.py:43— examples/argva_node_clustering.py:43-44 | examples/autoencoder.py:56-57 — These two members are one piece of code written twice and then edited apart: 2 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
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.
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· Edited copy of a member (15 corresponding lines) · ×5
Edited copy of a member (15 corresponding lines) torch_geometric/hash_tensor.py:680— torch_geometric/hash_tensor.py:680-700 | torch_geometric/hash_tensor.py:737-751 — 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.
Edited copy of a member (15 corresponding lines) torch_geometric/nn/conv/gat_conv.py:392— torch_geometric/nn/conv/gat_conv.py:392-406 | torch_geometric/nn/conv/gatv2_conv.py:361-375 — 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.
Edited copy of a member (15 corresponding lines) torch_geometric/nn/norm/layer_norm.py:49— torch_geometric/nn/norm/layer_norm.py:49-63 | torch_geometric/nn/norm/layer_norm.py:152-169 — 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.
Edited copy of a member (15 corresponding lines) torch_geometric/nn/models/lpformer.py:486— torch_geometric/nn/models/lpformer.py:486-504 | torch_geometric/nn/models/lpformer.py:511-525 — 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.
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· Edited copy of a member (8 corresponding lines) · ×5
Edited copy of a member (8 corresponding lines) torch_geometric/nn/models/dimenet.py:363— torch_geometric/nn/models/dimenet.py:363-370 | torch_geometric/nn/models/dimenet.py:411-419 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (8 corresponding lines) torch_geometric/datasets/aminer.py:65— torch_geometric/datasets/aminer.py:65-72 | REDACTED:125-132 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (8 corresponding lines) torch_geometric/nn/models/autoencoder.py:94— torch_geometric/nn/models/autoencoder.py:94-114 | torch_geometric/nn/models/deep_graph_infomax.py:85-92 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (8 corresponding lines) torch_geometric/data/data.py:1105— torch_geometric/data/data.py:1105-1112 | torch_geometric/data/hetero_data.py:1101-1108 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (8 corresponding lines) examples/graph_gps.py:132— examples/graph_gps.py:132-140 | examples/pna.py:99-106 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (7 corresponding lines) · ×5
Edited copy of a member (7 corresponding lines) torch_geometric/edge_index.py:87— torch_geometric/edge_index.py:87-93 | torch_geometric/edge_index.py:102-108 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (7 corresponding lines) torch_geometric/nn/inits.py:49— torch_geometric/nn/inits.py:49-55 | torch_geometric/nn/inits.py:67-73 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (7 corresponding lines) examples/dgcnn_classification.py:93— examples/dgcnn_classification.py:93-99 | examples/dgcnn_segmentation.py:34-41 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (7 corresponding lines) examples/hetero/bipartite_sage.py:147— examples/hetero/bipartite_sage.py:147-154 | examples/hetero/hetero_link_pred.py:112-118 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (7 corresponding lines) examples/rgat.py:38— examples/rgat.py:38-44 | examples/rgcn.py:69-75 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (3 corresponding lines) · ×5
Edited copy of a member (3 corresponding lines) torch_geometric/datasets/utils/cheatsheet.py:8— torch_geometric/datasets/utils/cheatsheet.py:8-12 | torch_geometric/nn/conv/utils/cheatsheet.py:8-10 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (3 corresponding lines) torch_geometric/datasets/amazon.py:88— torch_geometric/datasets/amazon.py:88-90 | torch_geometric/datasets/coauthor.py:90-92 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (3 corresponding lines) examples/link_pred.py:83— examples/link_pred.py:83-86 | examples/explain/gnn_explainer_link_pred.py:68-70 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (3 corresponding lines) examples/explain/graphmask_explainer.py:65— examples/explain/graphmask_explainer.py:65-67 | examples/jit/gat.py:18-22 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (3 corresponding lines) examples/explain/graphmask_explainer.py:21— examples/explain/graphmask_explainer.py:21-23 | examples/tensorboard_logging.py:19-21 — These two members are one piece of code written twice and then edited apart: 3 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (6 corresponding lines) · ×5
Edited copy of a member (6 corresponding lines) torch_geometric/nn/conv/point_conv.py:112— torch_geometric/nn/conv/point_conv.py:112-117 | torch_geometric/nn/conv/ppf_conv.py:135-140 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (6 corresponding lines) torch_geometric/nn/module_dict.py:20— torch_geometric/nn/module_dict.py:20-25 | torch_geometric/nn/parameter_dict.py:21-26 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (6 corresponding lines) examples/cluster_gcn_reddit.py:32— examples/cluster_gcn_reddit.py:32-37 | examples/multi_gpu/distributed_sampling.py:34-39 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (6 corresponding lines) examples/pytorch_lightning/gin.py:36— examples/pytorch_lightning/gin.py:36-41 | examples/pytorch_lightning/relational_gnn.py:72-77 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (6 corresponding lines) examples/hetero/bipartite_sage_unsup.py:166— examples/hetero/bipartite_sage_unsup.py:166-171 | examples/multi_gpu/taobao.py:80-85 — These two members are one piece of code written twice and then edited apart: 6 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
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 63 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· Edited copy of a member (22 corresponding lines) · ×4
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.
Edited copy of a member (22 corresponding lines) torch_geometric/nn/conv/mixhop_conv.py:92— torch_geometric/nn/conv/mixhop_conv.py:92-114 | torch_geometric/nn/conv/tag_conv.py:75-96 — 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.
Edited copy of a member (22 corresponding lines) torch_geometric/edge_index.py:849— torch_geometric/edge_index.py:849-870 | torch_geometric/edge_index.py:876-897 — 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.
Edited copy of a member (22 corresponding lines) examples/ogbn_proteins_deepgcn.py:75— examples/ogbn_proteins_deepgcn.py:75-96 | examples/rev_gnn.py:113-135 — 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· Edited copy of a member (30 corresponding lines) · ×4
Edited copy of a member (30 corresponding lines) torch_geometric/data/storage.py:495— torch_geometric/data/storage.py:495-524 | torch_geometric/data/storage.py:643-672 — These two members are one piece of code written twice and then edited apart: 30 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.
Edited copy of a member (30 corresponding lines) torch_geometric/graphgym/contrib/layer/generalconv.py:61— torch_geometric/graphgym/contrib/layer/generalconv.py:61-94 | torch_geometric/graphgym/contrib/layer/generalconv.py:177-206 — These two members are one piece of code written twice and then edited apart: 30 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.
Edited copy of a member (30 corresponding lines) torch_geometric/nn/pool/avg_pool.py:26— torch_geometric/nn/pool/avg_pool.py:26-55 | torch_geometric/nn/pool/max_pool.py:26-57 — These two members are one piece of code written twice and then edited apart: 30 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.
Edited copy of a member (30 corresponding lines) examples/tgn.py:118— examples/tgn.py:118-152 | examples/tgn.py:157-186 — These two members are one piece of code written twice and then edited apart: 30 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· Edited copy of a member (17 corresponding lines) · ×4
Edited copy of a member (17 corresponding lines) torch_geometric/nn/models/metapath2vec.py:154— torch_geometric/nn/models/metapath2vec.py:154-177 | torch_geometric/nn/models/metapath2vec.py:180-196 — These two members are one piece of code written twice and then edited apart: 17 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.
Edited copy of a member (17 corresponding lines) torch_geometric/nn/models/dimenet.py:222— torch_geometric/nn/models/dimenet.py:222-238 | torch_geometric/nn/models/dimenet.py:307-334 — These two members are one piece of code written twice and then edited apart: 17 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.
Edited copy of a member (17 corresponding lines) torch_geometric/edge_index.py:627— torch_geometric/edge_index.py:627-643 | torch_geometric/edge_index.py:647-663 — These two members are one piece of code written twice and then edited apart: 17 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.
Edited copy of a member (17 corresponding lines) examples/colors_topk_pool.py:44— examples/colors_topk_pool.py:44-60 | examples/triangles_sag_pool.py:48-66 — These two members are one piece of code written twice and then edited apart: 17 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· Edited copy of a member (10 corresponding lines) · ×4
Edited copy of a member (10 corresponding lines) torch_geometric/graphgym/models/layer.py:119— torch_geometric/graphgym/models/layer.py:119-128 | torch_geometric/nn/models/gpse.py:103-112 — These two members are one piece of code written twice and then edited apart: 10 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.
Edited copy of a member (10 corresponding lines) torch_geometric/data/dataset.py:131— torch_geometric/data/dataset.py:131-140 | torch_geometric/data/dataset.py:151-160 — These two members are one piece of code written twice and then edited apart: 10 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.
Edited copy of a member (10 corresponding lines) torch_geometric/nn/resolver.py:31— torch_geometric/nn/resolver.py:31-42 | torch_geometric/nn/resolver.py:49-58 — These two members are one piece of code written twice and then edited apart: 10 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.
Edited copy of a member (10 corresponding lines) examples/argva_node_clustering.py:122— examples/argva_node_clustering.py:122-131 | examples/node2vec.py:67-76 — These two members are one piece of code written twice and then edited apart: 10 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· Edited copies of one member (3 members, 8+ corresponding lines) · ×4
Edited copies of one member (3 members, 8+ corresponding lines) torch_geometric/nn/inits.py:9— torch_geometric/nn/inits.py:9-16 | torch_geometric/nn/inits.py:20-27 | torch_geometric/nn/inits.py:31-38 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) torch_geometric/edge_index.py:1210— torch_geometric/edge_index.py:1210-1217 | torch_geometric/hash_tensor.py:347-355 | torch_geometric/index.py:384-391 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) examples/pytorch_lightning/gin.py:18— examples/pytorch_lightning/gin.py:18-27 | examples/pytorch_lightning/graph_sage.py:18-25 | examples/pytorch_lightning/relational_gnn.py:46-56 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 8+ corresponding lines) examples/explain/gnn_explainer_ba_shapes.py:33— examples/explain/gnn_explainer_ba_shapes.py:33-40 | examples/linkx.py:27-34 | examples/mixhop.py:60-67 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 5+ corresponding lines) · ×4
Edited copies of one member (3 members, 5+ corresponding lines) REDACTED:78— REDACTED:78-82 | REDACTED:137-144 | REDACTED:101-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 5+ corresponding lines) examples/gcn2_cora.py:73— examples/gcn2_cora.py:73-77 | examples/glnn.py:52-57 | examples/glnn.py:92-97 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 5+ corresponding lines) examples/pytorch_lightning/graph_sage.py:31— examples/pytorch_lightning/graph_sage.py:31-37 | examples/pytorch_lightning/graph_sage.py:40-44 | examples/pytorch_lightning/graph_sage.py:47-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 5+ corresponding lines) examples/arma.py:28— examples/arma.py:28-32 | examples/cora.py:31-36 | examples/tagcn.py:23-27 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
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.
Duplicated block (14 lines × 2) torch_geometric/datasets/actor.py:100— torch_geometric/datasets/actor.py:100-113 | torch_geometric/datasets/webkb.py:121-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 (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/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.
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.
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· Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
Members sharing a duplicated core (4 members, 50+ identical tokens) 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 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) 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· Edited copy of a member (52 corresponding lines) · ×3
Edited copy of a member (52 corresponding lines) torch_geometric/loader/ibmb_loader.py:617— torch_geometric/loader/ibmb_loader.py:617-671 | torch_geometric/loader/ibmb_loader.py:759-810 — These two members are one piece of code written twice and then edited apart: 52 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.
Edited copy of a member (52 corresponding lines) torch_geometric/llm/models/g_retriever.py:126— torch_geometric/llm/models/g_retriever.py:126-177 | torch_geometric/llm/models/g_retriever.py:190-247 — These two members are one piece of code written twice and then edited apart: 52 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.
Edited copy of a member (52 corresponding lines) torch_geometric/nn/pool/__init__.py:153— torch_geometric/nn/pool/__init__.py:153-204 | torch_geometric/nn/pool/__init__.py:279-333 — These two members are one piece of code written twice and then edited apart: 52 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· Edited copy of a member (23 corresponding lines) · ×3
Edited copy of a member (23 corresponding lines) torch_geometric/nn/models/dimenet.py:181— torch_geometric/nn/models/dimenet.py:181-203 | torch_geometric/nn/models/dimenet.py:253-281 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (23 corresponding lines) torch_geometric/edge_index.py:1517— torch_geometric/edge_index.py:1517-1539 | torch_geometric/index.py:670-692 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (23 corresponding lines) REDACTED:280— REDACTED:280-302 | REDACTED:403-426 — These two members are one piece of code written twice and then edited apart: 23 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (31 corresponding lines) · ×3
Edited copy of a member (31 corresponding lines) REDACTED:310— REDACTED:310-340 | REDACTED:434-464 — These two members are one piece of code written twice and then edited apart: 31 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.
Edited copy of a member (31 corresponding lines) torch_geometric/nn/pool/sag_pool.py:108— torch_geometric/nn/pool/sag_pool.py:108-141 | torch_geometric/nn/pool/topk_pool.py:97-127 — These two members are one piece of code written twice and then edited apart: 31 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.
Edited copy of a member (31 corresponding lines) torch_geometric/nn/pool/avg_pool.py:63— torch_geometric/nn/pool/avg_pool.py:63-93 | torch_geometric/nn/pool/max_pool.py:65-97 — These two members are one piece of code written twice and then edited apart: 31 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· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) torch_geometric/data/data.py:1177— torch_geometric/data/data.py:1177-1192 | torch_geometric/data/hetero_data.py:1182-1199 — These two members are one piece of code written twice and then edited apart: 16 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.
Edited copy of a member (16 corresponding lines) torch_geometric/nn/attention/performer.py:129— torch_geometric/nn/attention/performer.py:129-145 | torch_geometric/nn/attention/polynormer.py:37-52 — These two members are one piece of code written twice and then edited apart: 16 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.
Edited copy of a member (16 corresponding lines) examples/graph_sage_unsup.py:44— examples/graph_sage_unsup.py:44-59 | examples/graph_sage_unsup_ppi.py:49-68 — These two members are one piece of code written twice and then edited apart: 16 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· Edited copies of one member (3 members, 11+ corresponding lines) · ×3
Edited copies of one member (3 members, 11+ corresponding lines) examples/gpse.py:132— examples/gpse.py:132-142 | torch_geometric/graphgym/models/gnn.py:84-94 | torch_geometric/nn/models/gpse.py:249-260 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) torch_geometric/nn/conv/gin_conv.py:183— torch_geometric/nn/conv/gin_conv.py:183-193 | torch_geometric/nn/conv/graph_conv.py:80-92 | torch_geometric/nn/conv/nn_conv.py:104-117 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 11+ corresponding lines) examples/cluster_gcn_ppi.py:57— examples/cluster_gcn_ppi.py:57-67 | examples/geniepath.py:116-128 | examples/ppi.py:44-54 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 9+ corresponding lines) · ×3
Edited copies of one member (3 members, 9+ corresponding lines) graphgym/custom_graphgym/encoder/example.py:34— graphgym/custom_graphgym/encoder/example.py:34-42 | torch_geometric/graphgym/models/encoder.py:50-59 | torch_geometric/graphgym/models/encoder.py:84-93 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) examples/multi_gpu/papers100m_gcn.py:19— examples/multi_gpu/papers100m_gcn.py:19-27 | examples/multi_gpu/papers100m_gcn_multinode.py:25-33 | torch_geometric/llm/models/txt2kg.py:412-422 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 9+ corresponding lines) examples/compile/gin.py:82— examples/compile/gin.py:82-90 | examples/mutag_gin.py:94-102 | examples/upfd.py:92-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 9 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 3+ corresponding lines) · ×3
Edited copies of one member (3 members, 3+ corresponding lines) torch_geometric/nn/conv/dna_conv.py:164— torch_geometric/nn/conv/dna_conv.py:164-167 | torch_geometric/nn/conv/supergat_conv.py:317-319 | torch_geometric/nn/pool/mem_pool.py:135-137 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) torch_geometric/nn/attention/performer.py:194— torch_geometric/nn/attention/performer.py:194-197 | torch_geometric/nn/attention/polynormer.py:105-107 | torch_geometric/nn/attention/sgformer.py:97-99 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 3+ corresponding lines) examples/contrib/pgm_explainer_graph_classification.py:34— examples/contrib/pgm_explainer_graph_classification.py:34-36 | examples/mnist_graclus.py:32-34 | examples/mnist_nn_conv.py:33-35 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 2+ corresponding lines) · ×3
Edited copies of one member (3 members, 2+ corresponding lines) torch_geometric/nn/conv/cugraph/rgcn_conv.py:112— torch_geometric/nn/conv/cugraph/rgcn_conv.py:112-113 | torch_geometric/nn/conv/film_conv.py:164-165 | torch_geometric/nn/conv/rgcn_conv.py:298-299 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 2+ corresponding lines) torch_geometric/nn/conv/sg_conv.py:110— torch_geometric/nn/conv/sg_conv.py:110-111 | torch_geometric/nn/conv/ssg_conv.py:121-122 | torch_geometric/nn/conv/tag_conv.py:105-106 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 2+ corresponding lines) torch_geometric/nn/models/basic_gnn.py:385— torch_geometric/nn/models/basic_gnn.py:385-386 | torch_geometric/nn/models/neural_fingerprint.py:71-72 | torch_geometric/nn/models/pmlp.py:100-101 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
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.
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.
Duplicated block (17 lines × 2) examples/rgcn_link_pred.py:138— examples/rgcn_link_pred.py:138-154 | examples/rgcn_link_pred.py:157-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 (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 34 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.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×3
Edited copy of a member (18 corresponding lines) examples/point_transformer_segmentation.py:173— examples/point_transformer_segmentation.py:173-190 | examples/randlanet_segmentation.py:144-161 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (18 corresponding lines) examples/dgcnn_segmentation.py:60— examples/dgcnn_segmentation.py:60-77 | examples/pointnet2_segmentation.py:89-106 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (18 corresponding lines) examples/multi_gpu/distributed_sampling_multinode.py:47— examples/multi_gpu/distributed_sampling_multinode.py:47-66 | examples/reddit.py:52-69 — These two members are one piece of code written twice and then edited apart: 18 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (27 corresponding lines) · ×2
Edited copy of a member (27 corresponding lines) torch_geometric/nn/to_hetero_transformer.py:330— torch_geometric/nn/to_hetero_transformer.py:330-356 | torch_geometric/nn/to_hetero_with_bases_transformer.py:267-298 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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.
Edited copy of a member (27 corresponding lines) torch_geometric/llm/models/molecule_gpt.py:143— torch_geometric/llm/models/molecule_gpt.py:143-169 | torch_geometric/llm/models/molecule_gpt.py:183-215 — These two members are one piece of code written twice and then edited apart: 27 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copies of one member (4 members, 4+ corresponding lines) · ×2
Edited copies of one member (4 members, 4+ corresponding lines) torch_geometric/datasets/amazon_products.py:67— torch_geometric/datasets/amazon_products.py:67-70 | torch_geometric/datasets/flickr.py:69-72 | torch_geometric/datasets/reddit2.py:77-80 | torch_geometric/datasets/yelp.py:69-72 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 4+ corresponding lines) examples/explain/captum_explainer_hetero_link.py:67— examples/explain/captum_explainer_hetero_link.py:67-70 | examples/hetero/hetero_link_pred.py:84-87 | examples/hetero/recommender_system.py:116-119 | examples/hetero/temporal_link_pred.py:92-95 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 3+ corresponding lines) · ×2
Edited copies of one member (4 members, 3+ corresponding lines) torch_geometric/nn/aggr/gmt.py:102— torch_geometric/nn/aggr/gmt.py:102-105 | torch_geometric/nn/aggr/set_transformer.py:113-117 | torch_geometric/nn/aggr/utils.py:85-88 | torch_geometric/nn/conv/gps_conv.py:183-185 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
Edited copies of one member (4 members, 3+ corresponding lines) torch_geometric/nn/conv/gin_conv.py:96— torch_geometric/nn/conv/gin_conv.py:96-98 | torch_geometric/nn/conv/mf_conv.py:119-121 | torch_geometric/nn/conv/sage_conv.py:150-152 | torch_geometric/nn/conv/signed_conv.py:144-146 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 4+ corresponding lines) · ×2
Edited copies of one member (3 members, 4+ corresponding lines) torch_geometric/datasets/bitcoin_otc.py:65— torch_geometric/datasets/bitcoin_otc.py:65-68 | torch_geometric/datasets/hm.py:43-46 | torch_geometric/datasets/movie_lens.py:48-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
Edited copies of one member (3 members, 4+ corresponding lines) examples/hetero/bipartite_sage.py:53— examples/hetero/bipartite_sage.py:53-57 | examples/hetero/bipartite_sage_unsup.py:111-114 | examples/multi_gpu/taobao.py:25-28 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
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.
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.
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.
Duplicated block (15 lines × 2) torch_geometric/datasets/dblp.py:128— torch_geometric/datasets/dblp.py:128-142 | torch_geometric/datasets/imdb.py:80-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 (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.
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/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.
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/nn/models/deep_graph_infomax.py:104— torch_geometric/nn/models/deep_graph_infomax.py:104-113 | torch_geometric/nn/models/metapath2vec.py:231-240 | torch_geometric/nn/models/node2vec.py:171-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 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 (11 lines × 3) torch_geometric/metrics/link_pred.py:228— torch_geometric/metrics/link_pred.py:228-238 | torch_geometric/metrics/link_pred.py:691-701 | torch_geometric/metrics/link_pred.py:854-864 — 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 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 (11 lines × 3) examples/contrib/pgm_explainer_graph_classification.py:68— examples/contrib/pgm_explainer_graph_classification.py:68-78 | examples/mnist_graclus.py:50-60 | examples/mnist_nn_conv.py:63-73 — 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 34 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.
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 51 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.
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.
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.
Duplicated block (8 lines × 4) torch_geometric/nn/models/metapath2vec.py:206— torch_geometric/nn/models/metapath2vec.py:206-213 | torch_geometric/nn/models/metapath2vec.py:217-224 | torch_geometric/nn/models/node2vec.py:138-145 | torch_geometric/nn/models/node2vec.py:149-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.
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· Edited copies of one member (5 members, 3+ corresponding lines) · ×2
Edited copies of one member (5 members, 3+ corresponding lines) examples/explain/captum_explainer_hetero_link.py:40— examples/explain/captum_explainer_hetero_link.py:40-42 | examples/hetero/hetero_link_pred.py:57-59 | examples/hetero/recommender_system.py:95-98 | examples/hetero/temporal_link_pred.py:65-67 | examples/relbench_example.py:76-79 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
Edited copies of one member (5 members, 3+ corresponding lines) examples/hetero/bipartite_sage.py:60— examples/hetero/bipartite_sage.py:60-62 | examples/hetero/bipartite_sage_unsup.py:117-119 | examples/hetero/recommender_system.py:101-104 | examples/multi_gpu/taobao.py:31-33 | examples/relbench_example.py:86-88 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 3 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
_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.
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 (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.
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.
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.
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.
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.
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 (64 corresponding lines) · ×1
Edited copy of a member (64 corresponding lines) torch_geometric/utils/sparse.py:556— torch_geometric/utils/sparse.py:556-619 | torch_geometric/utils/sparse.py:623-686 — These two members are one piece of code written twice and then edited apart: 64 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· Edited copy of a member (74 corresponding lines) · ×1
Edited copy of a member (74 corresponding lines) torch_geometric/datasets/movie_lens_100k.py:101— torch_geometric/datasets/movie_lens_100k.py:101-183 | torch_geometric/datasets/movie_lens_1m.py:96-169 — These two members are one piece of code written twice and then edited apart: 74 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· Edited copy of a member (42 corresponding lines) · ×1
Edited copy of a member (42 corresponding lines) torch_geometric/datasets/word_net.py:68— torch_geometric/datasets/word_net.py:68-109 | torch_geometric/datasets/word_net.py:172-220 — These two members are one piece of code written twice and then edited apart: 42 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (84 corresponding lines) · ×1
Edited copy of a member (84 corresponding 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 one piece of code written twice and then edited apart: 84 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· Edited copy of a member (48 corresponding lines) · ×1
Edited copy of a member (48 corresponding lines) torch_geometric/data/storage.py:784— torch_geometric/data/storage.py:784-831 | torch_geometric/data/storage.py:834-881 — These two members are one piece of code written twice and then edited apart: 48 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· Edited copy of a member (58 corresponding lines) · ×1
Edited copy of a member (58 corresponding lines) torch_geometric/nn/conv/gat_conv.py:145— torch_geometric/nn/conv/gat_conv.py:145-202 | torch_geometric/nn/conv/gatv2_conv.py:149-207 — These two members are one piece of code written twice and then edited apart: 58 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· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) torch_geometric/nn/models/metapath2vec.py:204— torch_geometric/nn/models/metapath2vec.py:204-227 | torch_geometric/nn/models/node2vec.py:136-159 — These two members are one piece of code written twice and then edited apart: 24 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· Edited copy of a member (33 corresponding lines) · ×1
Edited copy of a member (33 corresponding lines) torch_geometric/edge_index.py:1638— torch_geometric/edge_index.py:1638-1675 | torch_geometric/edge_index.py:1730-1762 — These two members are one piece of code written twice and then edited apart: 33 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· Edited copy of a member (34 corresponding lines) · ×1
Edited copy of a member (34 corresponding lines) torch_geometric/data/data.py:674— torch_geometric/data/data.py:674-707 | torch_geometric/data/hypergraph_data.py:186-219 — These two members are one piece of code written twice and then edited apart: 34 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· Edited copy of a member (57 corresponding lines) · ×1
Edited copy of a member (57 corresponding lines) torch_geometric/distributed/dist_link_neighbor_loader.py:68— torch_geometric/distributed/dist_link_neighbor_loader.py:68-131 | torch_geometric/distributed/dist_neighbor_loader.py:65-121 — These two members are one piece of code written twice and then edited apart: 57 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· Edited copies of one member (3 members, 60+ corresponding lines) · ×1
Edited copies of one member (3 members, 60+ corresponding lines) torch_geometric/utils/sparse.py:149— torch_geometric/utils/sparse.py:149-216 | torch_geometric/utils/sparse.py:225-284 | torch_geometric/utils/sparse.py:293-353 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 60 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (40 corresponding lines) · ×1
Edited copy of a member (40 corresponding lines) torch_geometric/data/data.py:725— torch_geometric/data/data.py:725-764 | torch_geometric/data/hypergraph_data.py:108-157 — These two members are one piece of code written twice and then edited apart: 40 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· Edited copy of a member (26 corresponding lines) · ×1
Edited copy of a member (26 corresponding lines) torch_geometric/data/data.py:1134— torch_geometric/data/data.py:1134-1159 | torch_geometric/data/hetero_data.py:1132-1158 — These two members are one piece of code written twice and then edited apart: 26 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) torch_geometric/nn/conv/sg_conv.py:82— torch_geometric/nn/conv/sg_conv.py:82-101 | torch_geometric/nn/conv/ssg_conv.py:91-112 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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· Edited copy of a member (21 corresponding lines) · ×1
Edited copy of a member (21 corresponding lines) torch_geometric/nn/conv/point_conv.py:88— torch_geometric/nn/conv/point_conv.py:88-108 | torch_geometric/nn/conv/ppf_conv.py:107-131 — These two members are one piece of code written twice and then edited apart: 21 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· Edited copies of one member (3 members, 18+ corresponding lines) · ×1
Edited copies of one member (3 members, 18+ corresponding lines) torch_geometric/nn/conv/cheb_conv.py:82— torch_geometric/nn/conv/cheb_conv.py:82-101 | torch_geometric/nn/conv/mixhop_conv.py:59-81 | torch_geometric/nn/conv/tag_conv.py:47-64 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 18 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) torch_geometric/nn/pool/glob.py:10— torch_geometric/nn/pool/glob.py:10-34 | torch_geometric/nn/pool/glob.py:39-63 | torch_geometric/nn/pool/glob.py:68-92 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) torch_geometric/transforms/add_remaining_self_loops.py:42— torch_geometric/transforms/add_remaining_self_loops.py:42-53 | torch_geometric/transforms/add_self_loops.py:42-53 | torch_geometric/transforms/remove_self_loops.py:27-36 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 2+ corresponding lines) · ×1
Edited copies of one member (6 members, 2+ corresponding lines) torch_geometric/datasets/airfrans.py:144— torch_geometric/datasets/airfrans.py:144-145 | torch_geometric/datasets/explainer_dataset.py:140-143 | torch_geometric/datasets/infection_dataset.py:163-166 | torch_geometric/datasets/opf.py:222-225 | torch_geometric/datasets/shrec2016.py:156-157 | torch_geometric/datasets/teeth3ds.py:268-269 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (8 members, 2+ corresponding lines) · ×1
Edited copies of one member (8 members, 2+ corresponding lines) torch_geometric/nn/conv/cugraph/gat_conv.py:94— torch_geometric/nn/conv/cugraph/gat_conv.py:94-95 | torch_geometric/nn/conv/feast_conv.py:110-111 | torch_geometric/nn/conv/gat_conv.py:412-413 | torch_geometric/nn/conv/gatv2_conv.py:381-382 | torch_geometric/nn/conv/heat_conv.py:142-143 | torch_geometric/nn/conv/transformer_conv.py:286-287 | torch_geometric/nn/dense/dense_gat_conv.py:117-118 | torch_geometric/nn/models/lpformer.py:675-676 — These 8 members are one piece of code written 8 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 8 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 2+ corresponding lines) · ×1
Edited copies of one member (4 members, 2+ corresponding lines) torch_geometric/nn/conv/cugraph/sage_conv.py:95— torch_geometric/nn/conv/cugraph/sage_conv.py:95-96 | torch_geometric/nn/conv/gen_conv.py:242-243 | torch_geometric/nn/conv/nn_conv.py:125-126 | torch_geometric/nn/conv/sage_conv.py:155-156 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 2 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 (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.
Duplicated block (30–31 lines × 2) torch_geometric/nn/models/dimenet.py:641— torch_geometric/nn/models/dimenet.py:641-670 | torch_geometric/nn/models/dimenet.py:927-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.
Duplicated block (28 lines × 2) REDACTED:258— REDACTED:258-285 | torch_geometric/datasets/willow_object_class.py:153-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. 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. ★ 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 (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.
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.
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.
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.
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.
Duplicated block (37 lines × 4) 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 — 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 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.
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.
Duplicated block (22–26 lines × 2) torch_geometric/datasets/word_net.py:77— torch_geometric/datasets/word_net.py:77-102 | torch_geometric/datasets/word_net.py:193-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:193` 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 (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.
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.
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.
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.
Duplicated block (12–20 lines × 3) torch_geometric/datasets/dblp.py:149— torch_geometric/datasets/dblp.py:149-160 | torch_geometric/datasets/imdb.py:91-110 | torch_geometric/datasets/last_fm.py:98-117 — 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–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.
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.
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.
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.
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.
Duplicated block (7 lines × 7) torch_geometric/transforms/cartesian.py:54— torch_geometric/transforms/cartesian.py:54-60 | torch_geometric/transforms/distance.py:52-58 | torch_geometric/transforms/local_cartesian.py:52-58 | torch_geometric/transforms/point_pair_features.py:44-50 | torch_geometric/transforms/polar.py:55-61 | torch_geometric/transforms/spherical.py:58-64 | torch_geometric/transforms/target_indegree.py:48-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.
Duplicated block (6–7 lines × 2) graphgym/configs_gen.py:127— graphgym/configs_gen.py:127-133 | graphgym/configs_gen.py:171-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 × 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.
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 (56 corresponding lines) · ×1
Edited copy of a member (56 corresponding lines) examples/multi_gpu/distributed_sampling_multinode.py:72— examples/multi_gpu/distributed_sampling_multinode.py:72-150 | examples/quiver/multi_gpu_quiver.py:66-121 — These two members are one piece of code written twice and then edited apart: 56 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· Edited copy of a member (37 corresponding lines) · ×1
Edited copy of a member (37 corresponding lines) examples/ogbn_proteins_deepgcn.py:101— examples/ogbn_proteins_deepgcn.py:101-137 | examples/rev_gnn.py:140-177 — These two members are one piece of code written twice and then edited apart: 37 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· Edited copies of one member (4 members, 21+ corresponding lines) · ×1
Edited copies of one member (4 members, 21+ corresponding lines) examples/cluster_gcn_reddit.py:40— examples/cluster_gcn_reddit.py:40-63 | examples/multi_gpu/distributed_sampling_xpu.py:81-104 | examples/quiver/multi_gpu_quiver.py:42-62 | examples/quiver/single_gpu_quiver.py:67-90 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 21 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) examples/proteins_diff_pool.py:93— examples/proteins_diff_pool.py:93-108 | examples/proteins_dmon_pool.py:44-60 | examples/proteins_mincut_pool.py:44-62 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 19+ corresponding lines) · ×1
Edited copies of one member (3 members, 19+ corresponding lines) examples/hetero/bipartite_sage_unsup.py:196— examples/hetero/bipartite_sage_unsup.py:196-216 | examples/hetero/recommender_system.py:131-152 | examples/hetero/temporal_link_pred.py:107-125 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 19 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 12+ corresponding lines) · ×1
Edited copies of one member (3 members, 12+ corresponding lines) examples/graph_gps.py:114— examples/graph_gps.py:114-127 | examples/pna.py:83-94 | examples/point_transformer_classification.py:145-156 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (7 members, 12+ corresponding lines) · ×1
Edited copies of one member (7 members, 12+ corresponding lines) examples/compile/gin.py:66— examples/compile/gin.py:66-77 | examples/jit/gin.py:65-76 | examples/mutag_gin.py:78-89 | examples/proteins_gmt.py:59-70 | examples/seal_link_pred.py:191-203 | examples/shadow.py:52-63 | examples/upfd.py:75-87 — These 7 members are one piece of code written 7 times and then edited apart: every two of them correspond over at least 12 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 7 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) examples/mem_pool.py:94— examples/mem_pool.py:94-100 | examples/proteins_gmt.py:75-82 | examples/randlanet_classification.py:192-199 | examples/shadow.py:68-75 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (4 members, 11+ corresponding lines) · ×1
Edited copies of one member (4 members, 11+ corresponding lines) examples/attentive_fp.py:120— examples/attentive_fp.py:120-130 | examples/egc.py:94-109 | examples/gcn2_ppi.py:65-76 | examples/lcm_aggr_2nd_min.py:123-133 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 11 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 8+ corresponding lines) · ×1
Edited copies of one member (5 members, 8+ corresponding lines) examples/dgcnn_classification.py:133— examples/dgcnn_classification.py:133-141 | examples/jit/gin.py:81-89 | examples/point_transformer_classification.py:161-168 | examples/pointnet2_classification.py:80-88 | examples/proteins_topk_pool.py:83-90 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 8 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 5+ corresponding lines) · ×1
Edited copies of one member (6 members, 5+ corresponding lines) examples/compile/gcn.py:36— examples/compile/gcn.py:36-40 | examples/gat.py:47-51 | examples/gcn.py:58-62 | examples/jit/gat.py:25-29 | examples/jit/gcn.py:25-29 | examples/multi_gpu/model_parallel.py:29-35 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 5 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (6 members, 7+ corresponding lines) · ×1
Edited copies of one member (6 members, 7+ corresponding lines) examples/compile/gcn.py:59— examples/compile/gcn.py:59-65 | examples/gat.py:60-66 | examples/gcn.py:78-84 | examples/gcn2_cora.py:62-68 | examples/multi_gpu/model_parallel.py:48-54 | examples/pmlp.py:29-35 — These 6 members are one piece of code written 6 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 6 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (5 members, 4+ corresponding lines) · ×1
Edited copies of one member (5 members, 4+ corresponding lines) examples/agnn.py:40— examples/agnn.py:40-43 | examples/cora.py:45-48 | examples/graph_unet.py:39-42 | examples/sgc.py:43-46 | examples/tagcn.py:42-45 — These 5 members are one piece of code written 5 times and then edited apart: every two of them correspond over at least 4 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 5 times and the copies will drift further apart.
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.
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.
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 34 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–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.
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.
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 51 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.
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.
Duplicated block (12 lines × 3) examples/dgcnn_segmentation.py:97— examples/dgcnn_segmentation.py:97-108 | examples/point_transformer_segmentation.py:209-220 | examples/pointnet2_segmentation.py:126-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 51 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 (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.
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 51 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.
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.
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 51 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.
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.
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.
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.
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.
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.
P12 · CI test-gate honesty· Test failure does not fail the CI gate · ×1
Test failure does not fail the CI gate REDACTED:43— `bash -c 'pytest -m rag --cov --cov-report=xml -v; E=$?; [[ $E == 0 || $E == 139 ]] && exit 0 || exit $E'` runs the tests, and `; exit 0` discards their exit status — a failing suite leaves the check green. Let the test command's failure fail the step (re-raise it after logging).
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.
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.
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.
+ 10 more in this group — see findings.md.
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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: torch_geometric/utils/_to_dense_batch.py. Pair on, review, or document these before any departure.
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion pyproject.toml:1— `(repository root)` (116470 LoC, 1318 module-visible types across 72 directories) overshoots its size bounds. 1 of 2 build unit(s) (Python) overshoot their size bounds, lowering Project Cohesion to 0.0/10. 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
Concentrated knowledge decay — 472 of 495 significant files have no living knowledge, while the repository is still being changed at a low rate (8 commit(s) in the last 90 days) — so this is one repo-wide knowledge-decay state, not 472 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.
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.
README/code drift docker/README.md:31— docker/README.md names Python 3.7, but pyproject.toml:13 requires `requires-python=">=3.10"`: the package does not install on Python 3.7. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
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 10 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.
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.
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.
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.
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.
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.
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.
Run 01a1e50f-32bd-77af-82b8-e5398a6c7682 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 46 · Warnings: 987 · Recommendations: 557 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 16-11-2026 @ 15:52 UTC.
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.