Public report of OpenMOSS/FRoM-W1, 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 report Measured 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, 19:51 UTC · Survey ID cd_e15671348ab54877a8c21b8276ed6b6a

OpenMOSS/FRoM-W1

Measured 16 November 2026, 19:51 UTC, at code version 457d84d

First survey, so nothing to compare with yet
CAI score 41.8out of 100 Weak
CriticalWeakAdequateStrongExemplary

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 small codebase: 12,765 lines of product code in 1 project, tests not counted · Estimated rebuild effort: under 0.1 person-years · Weakest lens: Production Readiness, 10.1

Findings by how serious they are

28 critical 162 serious 9 minor

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

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
16 November 2026, 19:51 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.

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 ▸

32of 32 dimensions measured by tools.
192of 199 findings point to an exact file and line, so you can open each one in the code. The other 7 concern the repository as a whole, such as missing documentation.
32dimensions across 5 lenses, read from 12,765 lines of product code in 1 project.
Chapters

Executive summary

OpenMOSS/FRoM-W1 falls short of our standard for production because the project has no automated tests and 25 passwords or keys sit in the current code. It scores 41.8 out of 100 and is rated Weak, and 26 of its 28 critical findings are security problems.

Production Readiness, at 10.1, is the weakest lens and counts most in the score. The best first step for the work it takes is replacing the 25 exposed passwords or keys and switching the old ones off, worth about 23.7 points. Adding automated tests comes next, worth about 29.9 points. Raising Production Readiness to 70 would lift the score to about 68.8.

Twenty-five passwords or keys are open to anyone who can read the repository. One known security hole in a package the code depends on can be used by attackers, and the project has no automated tests, so a change can break it without warning. Adding automated tests, replacing each exposed password or key and updating the vulnerable packages would close these risks. The package under a licence on your banned list needs replacing, or clearing with your legal team.

The product code is 12,765 lines, about €11,000 to rebuild.

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

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

If Production Readiness rose from 10.1 to 70, the lowest score rated Strong, the score would rise from 41.8 to about 68.8.

Code composition: what the lines of code are
Product code 100%
Rebuild cost: about €11,000 · Estimate
Cost to rebuild€3,600 to €18,000, for 61 to 192 hours of work, under 0.1 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 42. 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.
SizeSmall: 12,765 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 25 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 23.7 points · Medium effort · Secret Scanning
2
Resolve the 1 No automated tests finding(s) in Code Coverage.
Raises the score by about 29.9 points · High effort · Code Coverage
3
Resolve the 1 Banned license finding(s) in License Compliance.
Raises the score by about 4.7 points · Low effort · License Compliance

Diagnosis: what the measurements show together

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

Where the investment is most exposed · Value at risk
This code would cost about €11,000 to build again, under 0.1 person-years of work. Its weakest lens is Production Readiness, at 10.1 (Critical). Production Readiness is about whether the product is ready to run in production and to change without breaking. Because the weakest lens counts most in the score, work on Production Readiness also moves the score most.
Based on: the rebuild estimate · the Production Readiness grade · how much each lens counts
What to do: Start with the Production Readiness actions in Top priorities.
If you do one thing first · First action
Resolve the 25 Leaked secret finding(s) in Secret Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 23.7 points for medium effort, because it clears the 25 Secret Scanning findings. 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.5 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 1,624 lines over the last 90 days, which is about 6,586 lines a year. At that pace, the extra work comes to an estimated 0.6 to 3.8 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.

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 hGPT2 hGPT.callback3 hGPT.data4 hGPT.data.base5 hGPT.data.default6 hGPT.data.default.dataset_t2m_base7 hGPT.data.default.dataset_t2m_token8 hGPT.data.default.dataset_t2m_train9 hGPT.data.default.word_vectorizer10 hGPT.data.motionx11 hGPT.data.motionx.common12 hGPT.data.motionx.common.skeleton13 hGPT.data.motionx.dataset14 hGPT.data.motionx.scripts15 hGPT.data.motionx.smplx2smpl16 hGPT.data.motionx.smplx2smpl.smplx2joints17 hGPT.data.motionx.visualization18 hGPT.losses.base19 hGPT.metrics20 hGPT.metrics.base21 hGPT.metrics.m2m22 hGPT.metrics.m2t23 hGPT.metrics.mm24 hGPT.metrics.mr25 hGPT.metrics.t2m26 hGPT.models27 hGPT.models.archs.hgpt_lm28 hGPT.models.archs.hgpt_vq29 hGPT.models.archs.utils.quantize_cnn30 hGPT.models.archs.utils.resnet31 hGPT.models.archs.utils.token_emb32 hGPT.models.base33 hGPT.models.evaluator34 hGPT.utils35 scripts36 hGPT.data.MotionX37 hGPT.data.default.dataset_t2m_eval38 hGPT.data.default.dataset_t2m_vqvae39 hGPT.losses.hgpt40 hGPT.models.hgpt
1 hGPT
2 hGPT.callback
3 hGPT.data
4 hGPT.data.base
5 hGPT.data.default
6 hGPT.data.default.dataset_t2m_base
7 hGPT.data.default.dataset_t2m_token
8 hGPT.data.default.dataset_t2m_train
9 hGPT.data.default.word_vectorizer
10 hGPT.data.motionx
11 hGPT.data.motionx.common
12 hGPT.data.motionx.common.skeleton
13 hGPT.data.motionx.dataset
14 hGPT.data.motionx.scripts
15 hGPT.data.motionx.smplx2smpl
16 hGPT.data.motionx.smplx2smpl.smplx2joints
17 hGPT.data.motionx.visualization
18 hGPT.losses.base
19 hGPT.metrics
20 hGPT.metrics.base
21 hGPT.metrics.m2m
22 hGPT.metrics.m2t
23 hGPT.metrics.mm
24 hGPT.metrics.mr
25 hGPT.metrics.t2m
26 hGPT.models
27 hGPT.models.archs.hgpt_lm
28 hGPT.models.archs.hgpt_vq
29 hGPT.models.archs.utils.quantize_cnn
30 hGPT.models.archs.utils.resnet
31 hGPT.models.archs.utils.token_emb
32 hGPT.models.base
33 hGPT.models.evaluator
34 hGPT.utils
35 scripts
36 hGPT.data.MotionX1
37 hGPT.data.default.dataset_t2m_eval1
38 hGPT.data.default.dataset_t2m_vqvae1
39 hGPT.losses.hgpt1
40 hGPT.models.hgpt1
Uses a module listed above itPart of a loopThe module itself
1 hGPT2 hGPT.callback3 hGPT.data4 hGPT.data.base5 hGPT.data.default6 hGPT.data.default.dataset_t2m_base7 hGPT.data.default.dataset_t2m_token8 hGPT.data.default.dataset_t2m_train9 hGPT.data.default.word_vectorizer10 hGPT.data.motionx11 hGPT.data.motionx.common12 hGPT.data.motionx.common.skeleton13 hGPT.data.motionx.dataset14 hGPT.data.motionx.scripts15 hGPT.data.motionx.smplx2smpl16 hGPT.data.motionx.smplx2smpl.smplx2joints17 hGPT.data.motionx.visualization18 hGPT.losses.base19 hGPT.metrics20 hGPT.metrics.base21 hGPT.metrics.m2m22 hGPT.metrics.m2t23 hGPT.metrics.mm24 hGPT.metrics.mr25 hGPT.metrics.t2m26 hGPT.models27 hGPT.models.archs.hgpt_lm28 hGPT.models.archs.hgpt_vq29 hGPT.models.archs.utils.quantize_cnn30 hGPT.models.archs.utils.resnet31 hGPT.models.archs.utils.token_emb32 hGPT.models.base33 hGPT.models.evaluator34 hGPT.utils35 scripts36 hGPT.data.MotionX37 hGPT.data.default.dataset_t2m_eval38 hGPT.data.default.dataset_t2m_vqvae39 hGPT.losses.hgpt40 hGPT.models.hgpthGPT1hGPT.callback2hGPT.data3hGPT.data.base4hGPT.data.default5hGPT.data.default.dataset_t2m_base6hGPT.data.default.dataset_t2m_token7hGPT.data.default.dataset_t2m_train8hGPT.data.default.word_vectorizer9hGPT.data.motionx10hGPT.data.motionx.common11hGPT.data.motionx.common.skeleton12hGPT.data.motionx.dataset13hGPT.data.motionx.scripts14hGPT.data.motionx.smplx2smpl15hGPT.data.motionx.smplx2smpl.smplx2joints16hGPT.data.motionx.visualization17hGPT.losses.base18hGPT.metrics19hGPT.metrics.base20hGPT.metrics.m2m21hGPT.metrics.m2t22hGPT.metrics.mm23hGPT.metrics.mr24hGPT.metrics.t2m25hGPT.models26hGPT.models.archs.hgpt_lm27hGPT.models.archs.hgpt_vq28hGPT.models.archs.utils.quantize_cnn29hGPT.models.archs.utils.resnet30hGPT.models.archs.utils.token_emb31hGPT.models.base32hGPT.models.evaluator33hGPT.utils34scripts35hGPT.data.MotionX36hGPT.data.default.dataset_t2m_eval37hGPT.data.default.dataset_t2m_vqvae38hGPT.losses.hgpt39hGPT.models.hgpt4011111

At a glance — Code Health · 73.3 · Adequate · gated by D4 ·

At a glance — Architecture · 77.6 · Strong ·

At a glance — Maturity · 63.5 · Adequate · gated by M2 ·

At a glance — Readiness · 10.1 · Critical · gated by D8, D12, D13, P1, P3 ·

At a glance — Security · 89.8 · Strong ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A07:2025 — Authentication Failures25High / Critical
A05:2025 — Injection7Medium
A03:2025 — Software Supply Chain Failures1High / Critical

Roadmap

Top priorities: Resolve the 1 No automated tests finding(s) in Code Coverage; Resolve the 25 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED; Add a CI workflow that builds and runs the test suite on every push/PR.

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

Do thisHelpsEffortDimension
Resolve the 25 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED.+23.7 ptsMediumSecret Scanning
Resolve the 1 No automated tests finding(s) in Code Coverage.+29.9 ptsHighCode Coverage
Resolve the 1 Banned license finding(s) in License Compliance.+4.7 ptsLowLicense Compliance
Add a CI workflow that builds and runs the test suite on every push/PR.+5.0 ptsMediumCI/CD gates
Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.+5.0 ptsMediumSecurity & performance tooling
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.+3.9 ptsMediumArchitecture documentation
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.+1.4 ptsMediumDocumentation (README)
Swallowed exception (caught, then discarded)+1.3 ptsMediumException handling

File quality

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

FileScoreBandWorst signal
REDACTED4.2MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.4MixedStatic Analysis (SAST): Medium: REDACTED
H-GPT/hGPT/data/default/dataset_t2m_train.py6.0MixedExplicit Debt: TodoComment
H-GPT/hGPT/data/default/dataset_t2m_base.py6.0MixedExplicit Debt: TodoComment
H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py6.0MixedExplicit Debt: TodoComment
H-GPT/hGPT/models/archs/utils/quantize_cnn.py6.0MixedExplicit Debt: TodoComment
H-GPT/hGPT/models/evaluator.py6.0MixedExplicit Debt: TodoComment
H-GPT/hGPT/data/motionx/scripts/motion_process.py6.0MixedExplicit Debt: TodoComment
H-GPT/hGPT/models/archs/hgpt_lm.py6.9MixedExplicit Debt: TodoComment
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED
H-GPT/hGPT/utils/geometry_tools.py7.0MixedCode Duplication: Members sharing a duplicated core (4 members, 50+ identical tokens)
H-GPT/hGPT/metrics/m2t.py7.0MixedCode Duplication: Edited copy of a member (86 corresponding lines)
H-GPT/hGPT/utils/geometry_conver.py7.0MixedCode Duplication: Members sharing a duplicated core (5 members, 50+ identical tokens)
REDACTED7.2MixedSecret Scanning: Leaked secret: REDACTED
REDACTED7.2MixedSecret Scanning: Leaked secret: REDACTED
REDACTED7.2MixedSecret Scanning: Leaked secret: REDACTED
REDACTED7.2MixedSecret Scanning: Leaked secret: REDACTED
REDACTED7.2MixedSecret Scanning: Leaked secret: REDACTED
REDACTED7.2MixedSecret Scanning: Leaked secret: REDACTED
REDACTED7.2MixedSecret Scanning: Leaked secret: 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 — 28

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 — 162

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 — 9

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

Could not be resolved — 14

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 32 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, 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 — 32 dimensions across the health lenses
D1D2D3D4D6D8D12D13D14D15D17D28D29D30D35D43D44AX10AX3AX4M1M2M3M4P1P2P3X12X19X27X3X4

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1e5ea-57e1-7d77-a00e-b02ebbc54d95.

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

Run transparency — what happened this run

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

  • D16 Bus Factor — 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. Too few commits for a meaningful bus factor (48 commit(s) sampled, fewer than the 50 this dimension needs before a bus factor means anything).
  • D20 ADR Quality — 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. The ADR expectation is gated on whether a repository ships a deployable product. Our repo-kind classifier reads .NET project files and the host and package markers of the other ecosystems it knows (a Go `package main`, a Cargo binary, a package.json `bin`, `start` script or application dev server such as Vite or Next, Python console scripts or a Django/WSGI entry point, a Spring Boot / WAR / Gradle application build, a Rack or Rails app, a Composer project, an OTP release or escript, a Dockerfile, a Procfile, a Platform.sh `.platform/routes.yaml`, and the corresponding published-package manifests, including an OTP `*.app.src`, a Drupal module's `*.info` and a Claude Code `.claude-plugin/plugin.json`), and found none here, so we could not tell what kind of repository this is and did not assess its ADR log. This is a gap in our analyzer, not a finding about this repository. No manifest, project file or entry point of any ecosystem it reads exists in this tree.
  • 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 — 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 source is written only in languages whose packages are published through a manifest, and no manifest in the tree makes a publication act: either there is no package manifest of any ecosystem (no package.json, pyproject.toml, setup.py, gemspec, Cargo.toml, pom.xml, build.gradle, composer.json, pubspec.yaml or mix.exs), or every one present declares in its package manager's own terms that it is not published (an npm package marked "private": true, a Cargo package with publish = false, a pubspec with publish_to: none, a Composer "project", a Poetry project with package-mode = false, or the "Private :: Do Not Upload" classifier). With no publication act there is no intentionally-exposed surface for API consistency to be judged over.
  • 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. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D26 Project Cohesion — 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. `(repository root)` (12765 LoC, 93 module-visible types across 15 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D34 Knowledge Freshness — 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. Too few commits to judge knowledge freshness (48 commit(s) sampled).
  • 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.
  • 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 no C#, F#, JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Java 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.
  • 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 no C#, JavaScript/TypeScript, Java, Dart, Ruby, Scala or Rust 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.
  • 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.
  • X16 Unfloored truncation loop — 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 JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, PHP, Dart, Ruby, Scala, Kotlin or Rust was found in this repository, 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.
  • X18 Disposal-pattern correctness — 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 JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP and Rust source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP or Rust was found in this repository, 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.
  • X29 Per-element action decided by a fixed element — 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 JavaScript/TypeScript (Vue and Svelte components included), Java, Rust, Dart, Ruby, Scala and Kotlin source only, and no C# was loaded and no JavaScript/TypeScript, Java, Rust, Dart, Ruby, Scala or Kotlin was found in this repository, 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.
  • 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.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret 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.
  • 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.
  • 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").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned REDACTED, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • 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.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • 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 Dockerfile (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.

Dimensions

D1 · Cyclomatic Complexity9.0 / 10Strong✓ Tool-verified

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

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

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

4 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Text2MotionDatasetTrain.__init__ at 30.

Text2MotionDatasetTrain.__init__ (cyclomatic 30)H-GPT/hGPT/data/default/dataset_t2m_train.py:21
Text2MotionDatasetBase.__init__ (cyclomatic 28)H-GPT/hGPT/data/default/dataset_t2m_base.py:19
Text2MotionDatasetTrainDist._load_single_data (cyclomatic 27)H-GPT/hGPT/data/default/dataset_t2m_train.py:315
HumanoidGPT.allsplit_step (cyclomatic 23)H-GPT/hGPT/models/hgpt.py:211

What to do

  1. Bring the 4 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with Text2MotionDatasetTrain.__init__ (cyclomatic 30), Text2MotionDatasetBase.__init__ (cyclomatic 28), Text2MotionDatasetTrainDist._load_single_data (cyclomatic 27). — 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 4 together lifts Cyclomatic Complexity from 9.0 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D2 · Cognitive Complexity7.4 / 10Strong✓ Tool-verified

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

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

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

11 method(s) exceeded the cognitive complexity threshold of 15; the worst was Text2MotionDatasetTrain.__init__ at 74.

Text2MotionDatasetTrain.__init__ (cognitive 74)H-GPT/hGPT/data/default/dataset_t2m_train.py:21
Text2MotionDatasetBase.__init__ (cognitive 64)H-GPT/hGPT/data/default/dataset_t2m_base.py:19
Text2MotionDatasetTrainDist._load_single_data (cognitive 51)H-GPT/hGPT/data/default/dataset_t2m_train.py:315
HumanoidGPT.allsplit_step (cognitive 48)H-GPT/hGPT/models/hgpt.py:211
Text2MotionDatasetToken.__init__ (cognitive 23)H-GPT/hGPT/data/default/dataset_t2m_token.py:24

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

What to do

  1. Bring the 4 bodies over 30 down to 30 or less in Cognitive Complexity — start with Text2MotionDatasetTrain.__init__ (cognitive 74), Text2MotionDatasetBase.__init__ (cognitive 64), Text2MotionDatasetTrainDist._load_single_data (cognitive 51). — 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 4 together lifts Cognitive Complexity from 7.4 to about 8.4/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D3 · God Classes10.0 / 10Exemplary✓ Tool-verified

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

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

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

0 god class(es) detected.

✓ On the Gold path — maintain.

Detailed fixes: d3_recommendation.md.

D4 · Code Duplication0.0 / 10Critical✓ Tool-verified

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.

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

81 duplicated block group(s) detected. 27.4 % of the production lines (3,496 of 12,765) are in a reported copy. A further 35 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (9 lines × 2) · ×4H-GPT/hGPT/data/base.py:96
Edited copy of a member (19 corresponding lines) · ×3H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:85
Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3H-GPT/hGPT/data/default/dataset_t2m_base.py:36
Edited copy of a member (18 corresponding lines) · ×3H-GPT/hGPT/models/archs/hgpt_vq.py:133
Duplicated block (8 lines × 2) · ×3H-GPT/hGPT/metrics/m2t.py:324

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

What to do

  1. Resolve the 4 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with base.py, dataset_t2m_base.py, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 3 Edited copy of a member (19 corresponding lines) finding(s) in Code Duplication — start with plot_feature_body.py, evaluator.py, geometry_tools.py. — One of this dimension's main actionable groups (3 warning-level).
  3. Resolve the 3 Members sharing a duplicated core (4 members, 50+ identical tokens) finding(s) in Code Duplication — start with dataset_t2m_base.py, quaternion.py, geometry_tools.py. — One of this dimension's main actionable groups (3 warning-level).

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

D6 · Cohesion (LCOM4)9.5 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

1 of 26 classes have LCOM4 above 3.

Low cohesion: MotionXDataModule (LCOM4 4)H-GPT/hGPT/data/MotionX.py:89

What to do

  1. Resolve the 1 Low cohesion finding(s) in Cohesion (LCOM4) — start with MotionX.py. — One of this dimension's main actionable groups (1 warning-level).

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

D8 · Code Coverage0.0 / 10Critical✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from the analyzer's own run of the suite, computed per-file with structured exclusions for generated, trivial, and glue code. A coverage report found in the repository is never read. When the suite can't be built/run in-image, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

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

No automated tests — no test code was found in this repository.

No automated tests

What to do

  1. Resolve the 1 No automated tests finding(s) in Code Coverage. — One of this dimension's main actionable groups (1 issue-level).

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

D12 · Dependency Hygiene9.9 0.9 / 10Critical✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

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

2 outdated, 0 yanked pinned Python distributions. 2 of 21 shipped distributions were graded against pypi.org (0 not published there, 19 declared without an exact pin, which installs the newest release the declaration admits and so cannot be behind one). Only EXACT pins are graded for currency: a floor or a range already installs the newest release it admits, so reporting one would report this repository for being current. Whether a deliberate upper cap has itself gone stale is a different and weaker question, and is not asked. Whether any distribution is UNMAINTAINED is not graded — PyPI publishes no maintenance status, and release age does not stand in for one. Lockfiles are not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock), so a lock-resolved install is outside this verdict. Known CVEs in this dependency graph are D30's question.

Outdated: numpy · ×2

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

D13 · Secret Scanning0.0 / 10Critical✓ Tool-verified

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

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

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

25 secret(s) detected.

REDACTED

What to do

  1. Resolve the 25 Leaked secret finding(s) in Secret Scanning — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (25 issue-level).

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

D14 · License Compliance8.0 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 of 147 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 21 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (126 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. 17 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged.

Banned license: easydict

What to do

  1. Resolve the 1 Banned license finding(s) in License Compliance. — One of this dimension's main actionable groups (1 issue-level).

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

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

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

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

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

No churn × complexity hotspots in the window.

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md.

D17 · Explicit Debt9.7 / 10Stronggated by 19 serious findings✓ Tool-verified

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

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

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

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

TodoComment · ×19H-GPT/hGPT/utils/temos_utils.py:101

What to do

  1. Resolve the 19 TodoComment finding(s) in Explicit Debt — start with hgpt_lm.py (3), motion_process.py (3), temos_utils.py (2). — One of this dimension's main actionable groups (19 warning-level).

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

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)7.0 / 10Adequate✓ Tool-verified

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

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

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

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

7 finding(s): 0 critical, 0 high, 7 medium, 0 low.

REDACTED

What to do

  1. Resolve the 7 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED (2). — One of this dimension's main actionable groups (7 warning-level).

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

D30 · Dependency Vulnerabilities9.4 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

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

REDACTED

What to do

  1. Resolve the 1 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

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

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition5.0 / 10Weak✓ Tool-verified

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

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

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

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

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

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

Maturity · Maturity — Whether the 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.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

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

What to do

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

Maturity · Maturity — Whether the 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.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

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.

P1 · CI/CD gates0.0 / 10Critical✓ Tool-verified

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.

  • No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.

What to do

  • Add a CI workflow that builds and runs the test suite on every push/PR.
P2 · Observability7.0 / 10Strong✓ Tool-verified

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

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

P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

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

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

  • No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge'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` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:1

What to do

  • Run what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — locally for now, since there is no CI pipeline here yet, and as a step of the first workflow you add so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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.

X3 · Exception handling5.4 / 10Adequate✓ Tool-verified

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

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

  • `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. (×2) — H-GPT/hGPT/models/archs/hgpt_lm.py:485, REDACTED:158
  • 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. — H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:456

What to do

  • Swallowed exception (caught, then discarded)
X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

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.

Reference — by lens

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

LensScoreRatingImpact
Code Health73.3Adequate — gated by D4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture77.6StrongSolid.
Maturity63.5Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness10.1Critical — gated by D8, D12, D13, P1, P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security89.8StrongStrongest area.
Unscored — 1 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.

  • X10 Duplicated predicate — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 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.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
  • P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 79 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 — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • 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.
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — no interface, protocol or abstract type declares an operation an implementer must write
  • 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
  • AXB1 Runtime evidence locked — no reproducible boot — This repository has nothing the runtime tiers could boot or serve — no markup, no UI framework or web-server dependency, no UI component source, no native UI project and no API definition — nothing here is a surface to boot — so runtime a11y/egress/header evidence has no subject here. Not applicable: this is neither a gap in the scan nor a finding about your code.
  • 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.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or MongoEngine model, a migration or a SQL schema — and no database or data-store client (Django ORM, SQLAlchemy, psycopg, PyMongo, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data whose lifetime a retention limit would bound.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential on a Django, SQLAlchemy, SQLModel, Peewee, Tortoise or mongoengine model, in a migration or in a SQL schema — and no database or data-store client (django.db, sqlalchemy, psycopg2, pymongo, sqlite3, …) imported either, so this repository keeps no personal data for a data subject to erase, export or consent over.
  • D10 Test Quality — No tests were found in the analyzed repository to assess for quality.
  • D11 Test Reliability — No test suite was found to re-run, so reliability couldn't be assessed. Two searches produced that zero and both came back empty: the classifier that reads the loaded workspace recognised no suite it could run, and a walk of the source on disk — which covers the JS/TS `*.test.*` and `*.spec.*` conventions and probes for a Pester suite — found no test source in any other ecosystem either. Neither search reaches a suite that is missing from the loaded workspace and carries no name either walk recognises, so this is 'no suite found by those two searches', not a verdict that the repository has none.
  • D16 Bus Factor — too few commits for a meaningful bus factor
  • 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.
  • D19 Documentation Quality — No runnable or published unit to look for an example in, and no multi-project root README to look for a map in; the other documentation kinds are withheld (see the gaps), so documentation quality is not applicable here.
  • D20 ADR Quality — Repository kind not determined
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 11 candidate(s) found and not reported.
  • D22 Internal API Consistency — No intentionally-exposed public API to evaluate for consistency.
  • 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. 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 — this repository's production source is .py, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D27 Navigability — symbol resolution incomplete — navigability not assessed
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • 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.
  • D34 Knowledge Freshness — too few commits to judge knowledge freshness
  • D36 Supply-chain Provenance & Signing — No CI/build pipeline found (.github/.forgejo/.gitea workflows, .circleci, .buildkite, .woodpecker, .teamcity, .gitlab-ci.yml, .travis.yml, bitbucket-pipelines.yml, .drone.yml, .cirrus.yml, .woodpecker.yml, appveyor.yml, azure-pipelines*.yml, .pipelines/, .vsts-ci/, .azuredevops/, Jenkinsfile); there is no build to attest provenance for.
  • 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.
  • D5 Coupling — Not applicable — no manifest declares this repository's modules, and its source holds 1 production component(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production components 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
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (1 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
  • P12 CI test-gate honesty — no CI workflow found
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the 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
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • 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.
  • PF3 Async & latency hygiene — Not applicable: this repository declares no async functions, so there is no asynchronous code for a blocking call to stall.
  • 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.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • 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 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
  • X17 Uncapped recursion over a caller-supplied document — 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 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
  • 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
  • X23 Unguarded diagnostic materialisation — 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
  • X25 Inert configuration knob — 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
  • X28 Index access outside its own emptiness guard — 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 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
  • 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.

Critical — 28 finding(s)
D13 · Secret Scanning · Leaked secret · ×25
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D14 · License Compliance · Banned license · ×1
  • Banned license: easydict — `easydict` 1.14 is published on PyPI under `LGPL-3.0-only`, which this policy bans, and it is in the SHIPPED closure of this repository — so it is installed by everything that depends on this repository, not just by its test environment. A distribution offering SEVERAL licences is a choice and is only charged when every one of them is banned. Replace the package, or record an accepted exception. ★ The licence that makes this row is LGPL-3.0, and unmodified use is often permitted: the LGPL lets your code use an UNMODIFIED copy of the library that stays a separately installed package (its own entry in node_modules, site-packages or the gem path, which a user can replace) without your code coming under the LGPL. What it then asks is that you pass on its licence and notices and let users swap in their own build of it (LGPL-3.0 section 4). Modifying it, copying its code into yours, or merging it into one bundled or statically linked artifact is where the obligations grow, and this policy cannot see which you do — that is why it denies LGPL-3.0 by default. If you use it unmodified and separately installed, allow it in your repository's licence policy rather than replacing it: add `LGPL-3.0-only` / `LGPL-3.0-or-later` to the allow-list of the licence check your CI runs (`license-checker --onlyAllow`, the `allow-licenses` input of GitHub's dependency-review-action, `[licenses] allow` in cargo-deny's deny.toml), record why in the same change, and hide this row on the findings page with that reason. This scan's banned set is not read from that file, so the row stays until it is hidden.
D30 · Dependency Vulnerabilities · High CVE · ×1
  • REDACTED
D8 · Code Coverage · No automated tests · ×1
  • No automated tests — No automated tests — no test code was found in this repository. Untested code is the largest single risk to changing it safely. Start with the code you change most often: add a suite in a framework a runner can collect (pytest or unittest), and run it in CI so the gap cannot reopen.
Serious — 162 finding(s)
D17 · Explicit Debt · TodoComment · ×19
  • TodoComment H-GPT/hGPT/utils/temos_utils.py:101 — # TODO: use a real subsampler.. — 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 H-GPT/hGPT/utils/temos_utils.py:109 — # TODO: use a real upsampler.. — 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 H-GPT/hGPT/models/evaluator.py:258 — # TODO (pli): check this type — 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 H-GPT/hGPT/models/evaluator.py:259 — # TODO (pli): check the permute — 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 H-GPT/hGPT/models/archs/hgpt_lm.py:107 — # TODO: only tune motion tokens. — 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 H-GPT/hGPT/models/archs/hgpt_lm.py:108 — # TODO: save only lora — 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 H-GPT/hGPT/models/archs/hgpt_lm.py:351 — # TODO: check here, do sample = False — 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 H-GPT/hGPT/models/archs/utils/quantize_cnn.py:57 — # TODO: check this dtype — 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 H-GPT/hGPT/data/motionx/scripts/motion_process.py:365 — # TODO: check this dtype — 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 H-GPT/hGPT/data/motionx/scripts/motion_process.py:422 — # TODO: check this dtype — 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 H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:325 — # TODO: AttributeError: 'Axes3D' object has no property 'auto_add_to_figure' — 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 H-GPT/hGPT/data/motionx/visualization/plot_smplx.py:29 — # TODO: fix issue — 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 H-GPT/hGPT/data/motionx/scripts/cal_mean_variance.py:36 — # TODO: add face — 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 H-GPT/hGPT/data/motionx/scripts/motion_process.py:556 — # TODO: check this tgt offsets — 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 H-GPT/hGPT/data/motionx/scripts/raw_pose_processing.py:146 — # TODO: parallel — 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 H-GPT/hGPT/data/default/dataset_t2m_base.py:134 — # TODO: fix len(cot_list) != len(lines) — 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 H-GPT/hGPT/data/default/dataset_t2m_base.py:366 — # TODO: fix len(cot_list) != len(lines) — 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 H-GPT/hGPT/data/default/dataset_t2m_train.py:128 — # TODO: fix len(cot_list) != len(lines) — 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 H-GPT/hGPT/data/default/dataset_t2m_train.py:375 — # TODO: fix len(cot_list) != len(lines) — 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.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×4
  • Duplicated block (9 lines × 2) H-GPT/hGPT/data/base.py:96 — H-GPT/hGPT/data/base.py:96-104 | H-GPT/hGPT/data/base.py:107-115 — 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) H-GPT/hGPT/data/default/dataset_t2m_base.py:277 — H-GPT/hGPT/data/default/dataset_t2m_base.py:277-285 | H-GPT/hGPT/data/default/dataset_t2m_train.py:280-288 — 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) REDACTED:659 — REDACTED:659-667 | REDACTED:682-690 — 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:659` 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 (9 lines × 2) H-GPT/hGPT/models/evaluator.py:290 — H-GPT/hGPT/models/evaluator.py:290-298 | H-GPT/hGPT/models/evaluator.py:356-364 — 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 after the matched lines, `H-GPT/hGPT/models/evaluator.py:300` calls `Linear` and `H-GPT/hGPT/models/evaluator.py:366` 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 copy of a member (19 corresponding lines) · ×3
  • Edited copy of a member (19 corresponding lines) H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:85 — H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:85-103 | REDACTED:86-104 — 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) H-GPT/hGPT/models/evaluator.py:488 — H-GPT/hGPT/models/evaluator.py:488-510 | H-GPT/hGPT/models/evaluator.py:538-556 — 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) H-GPT/hGPT/utils/geometry_tools.py:276 — H-GPT/hGPT/utils/geometry_tools.py:276-294 | H-GPT/hGPT/utils/rotation_conversions.py:261-279 — 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 · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) H-GPT/hGPT/data/default/dataset_t2m_base.py:36 — H-GPT/hGPT/data/default/dataset_t2m_base.py:36-191 | H-GPT/hGPT/data/default/dataset_t2m_base.py:266-469 | H-GPT/hGPT/data/default/dataset_t2m_train.py:38-184 | H-GPT/hGPT/data/default/dataset_t2m_train.py:316-422 — 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) H-GPT/hGPT/data/motionx/common/quaternion.py:299 — H-GPT/hGPT/data/motionx/common/quaternion.py:299-324 | H-GPT/hGPT/utils/geometry_conver.py:55-82 | H-GPT/hGPT/utils/geometry_tools.py:52-79 | H-GPT/hGPT/utils/rotation_conversions.py:37-64 — 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) H-GPT/hGPT/utils/geometry_tools.py:165 — H-GPT/hGPT/utils/geometry_tools.py:165-186 | H-GPT/hGPT/utils/geometry_tools.py:232-270 | H-GPT/hGPT/utils/rotation_conversions.py:150-171 | H-GPT/hGPT/utils/rotation_conversions.py:217-255 — 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 (18 corresponding lines) · ×3
  • Edited copy of a member (18 corresponding lines) H-GPT/hGPT/models/archs/hgpt_vq.py:133 — H-GPT/hGPT/models/archs/hgpt_vq.py:133-150 | H-GPT/hGPT/models/evaluator.py:238-255 — 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) H-GPT/hGPT/utils/easyconvert.py:30 — H-GPT/hGPT/utils/easyconvert.py:30-47 | H-GPT/hGPT/utils/temos_utils.py:43-60 — 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) H-GPT/hGPT/models/evaluator.py:514 — H-GPT/hGPT/models/evaluator.py:514-533 | H-GPT/hGPT/models/evaluator.py:560-577 — 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 · Duplicated block (8 lines × 2) · ×3
  • Duplicated block (8 lines × 2) H-GPT/hGPT/metrics/m2t.py:324 — H-GPT/hGPT/metrics/m2t.py:324-331 | H-GPT/hGPT/metrics/t2m.py:245-252 — before extracting anything, compare `H-GPT/hGPT/metrics/m2t.py` and `H-GPT/hGPT/metrics/t2m.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 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 lines × 2) H-GPT/hGPT/models/base.py:189 — H-GPT/hGPT/models/base.py:189-196 | H-GPT/hGPT/models/base.py:205-212 — 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) H-GPT/hGPT/utils/geometry_tools.py:101 — H-GPT/hGPT/utils/geometry_tools.py:101-108 | H-GPT/hGPT/utils/rotation_conversions.py:86-93 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (6 lines × 2) · ×3
  • Duplicated block (6 lines × 2) REDACTED:514 — REDACTED:514-519 | REDACTED:528-533 — 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:514` 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) H-GPT/hGPT/models/base.py:200 — H-GPT/hGPT/models/base.py:200-205 | H-GPT/hGPT/models/base.py:207-212 — 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) H-GPT/hGPT/models/evaluator.py:340 — H-GPT/hGPT/models/evaluator.py:340-345 | H-GPT/hGPT/models/evaluator.py:390-395 — 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 (14 corresponding lines) · ×2
  • Edited copy of a member (14 corresponding lines) H-GPT/hGPT/metrics/m2m.py:22 — H-GPT/hGPT/metrics/m2m.py:22-40 | H-GPT/hGPT/metrics/mr.py:18-34 — 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) H-GPT/hGPT/metrics/utils.py:27 — H-GPT/hGPT/metrics/utils.py:27-40 | H-GPT/hGPT/metrics/utils.py:44-57 — 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 (12 corresponding lines) · ×2
  • Edited copy of a member (12 corresponding lines) H-GPT/hGPT/models/evaluator.py:204 — H-GPT/hGPT/models/evaluator.py:204-215 | H-GPT/hGPT/models/evaluator.py:267-279 — 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) H-GPT/hGPT/data/motionx/common/skeleton.py:79 — H-GPT/hGPT/data/motionx/common/skeleton.py:79-90 | H-GPT/hGPT/data/motionx/common/skeleton.py:94-107 — 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 copies of one member (3 members, 8+ corresponding lines) · ×2
  • Edited copies of one member (3 members, 8+ corresponding lines) H-GPT/hGPT/metrics/utils.py:217 — H-GPT/hGPT/metrics/utils.py:217-224 | H-GPT/hGPT/metrics/utils.py:228-237 | H-GPT/hGPT/metrics/utils.py:241-250 — 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) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:96 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:96-103 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:283-290 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:408-415 — 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 (4 members, 15+ corresponding lines) · ×2
  • Edited copies of one member (4 members, 15+ corresponding lines) H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:397 — H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:397-412 | H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:419-434 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:245-259 | REDACTED:246-260 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 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, 15+ corresponding lines) H-GPT/hGPT/data/default/dataset_t2m_base.py:539 — H-GPT/hGPT/data/default/dataset_t2m_base.py:539-553 | H-GPT/hGPT/data/default/dataset_t2m_token.py:321-336 | H-GPT/hGPT/data/default/dataset_t2m_train.py:539-554 | H-GPT/hGPT/data/default/dataset_t2m_vqvae.py:89-105 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 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 · Duplicated block (28 lines × 2) · ×2
  • Duplicated block (28 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:496 — H-GPT/hGPT/utils/geometry_tools.py:496-523 | H-GPT/hGPT/utils/rotation_conversions.py:481-508 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 (28 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:192 — H-GPT/hGPT/utils/geometry_tools.py:192-219 | H-GPT/hGPT/utils/rotation_conversions.py:177-204 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (22 lines × 2) · ×2
  • Duplicated block (22 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:165 — H-GPT/hGPT/utils/geometry_tools.py:165-186 | H-GPT/hGPT/utils/rotation_conversions.py:150-171 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 (22 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:112 — H-GPT/hGPT/utils/geometry_tools.py:112-133 | H-GPT/hGPT/utils/rotation_conversions.py:97-118 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) H-GPT/hGPT/models/archs/utils/resnet.py:61 — H-GPT/hGPT/models/archs/utils/resnet.py:61-80 | H-GPT/hGPT/models/evaluator.py:68-87 — before extracting anything, compare `H-GPT/hGPT/models/archs/utils/resnet.py` and `H-GPT/hGPT/models/evaluator.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 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 (20 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:409 — H-GPT/hGPT/utils/geometry_tools.py:409-428 | H-GPT/hGPT/utils/rotation_conversions.py:394-413 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (17 lines × 2) · ×2
  • Duplicated block (17 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_eval.py:466 — H-GPT/hGPT/data/default/dataset_t2m_eval.py:466-482 | H-GPT/hGPT/data/default/dataset_t2m_eval.py:486-502 — 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 `H-GPT/hGPT/data/default/dataset_t2m_eval.py:466` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:276 — H-GPT/hGPT/utils/geometry_tools.py:276-292 | H-GPT/hGPT/utils/rotation_conversions.py:261-277 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_train.py:130 — H-GPT/hGPT/data/default/dataset_t2m_train.py:130-145 | H-GPT/hGPT/data/default/dataset_t2m_train.py:377-392 — 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 `H-GPT/hGPT/data/default/dataset_t2m_train.py:130` 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 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) H-GPT/hGPT/models/archs/utils/resnet.py:93 — H-GPT/hGPT/models/archs/utils/resnet.py:93-108 | H-GPT/hGPT/models/evaluator.py:100-115 — before extracting anything, compare `H-GPT/hGPT/models/archs/utils/resnet.py` and `H-GPT/hGPT/models/evaluator.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 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.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×2
  • Duplicated block (15 lines × 2) H-GPT/hGPT/models/archs/hgpt_vq.py:136 — H-GPT/hGPT/models/archs/hgpt_vq.py:136-150 | H-GPT/hGPT/models/evaluator.py:241-255 — 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 (15 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:551 — H-GPT/hGPT/utils/geometry_tools.py:551-565 | H-GPT/hGPT/utils/rotation_conversions.py:536-550 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (14 lines × 2) · ×2
  • Duplicated block (14 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_base.py:142 — H-GPT/hGPT/data/default/dataset_t2m_base.py:142-155 | H-GPT/hGPT/data/default/dataset_t2m_base.py:375-388 — 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 `H-GPT/hGPT/data/default/dataset_t2m_base.py:142` 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 (14 lines × 2) H-GPT/hGPT/metrics/m2t.py:265 — H-GPT/hGPT/metrics/m2t.py:265-278 | H-GPT/hGPT/metrics/t2m.py:187-200 — before extracting anything, compare `H-GPT/hGPT/metrics/m2t.py` and `H-GPT/hGPT/metrics/t2m.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×2
  • Duplicated block (13 lines × 2) H-GPT/hGPT/metrics/m2t.py:243 — H-GPT/hGPT/metrics/m2t.py:243-255 | H-GPT/hGPT/metrics/t2m.py:165-177 — before extracting anything, compare `H-GPT/hGPT/metrics/m2t.py` and `H-GPT/hGPT/metrics/t2m.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 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 (13 lines × 2) H-GPT/hGPT/metrics/m2m.py:28 — H-GPT/hGPT/metrics/m2m.py:28-40 | H-GPT/hGPT/metrics/mr.py:22-34 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×2
  • Duplicated block (12 lines × 2) H-GPT/hGPT/models/evaluator.py:491 — H-GPT/hGPT/models/evaluator.py:491-502 | H-GPT/hGPT/models/evaluator.py:540-551 — 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 after the matched lines, `H-GPT/hGPT/models/evaluator.py:504` calls `apply` and `H-GPT/hGPT/models/evaluator.py:553` 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 (12 lines × 2) H-GPT/hGPT/utils/geometry_conver.py:118 — H-GPT/hGPT/utils/geometry_conver.py:118-129 | H-GPT/hGPT/utils/geometry_conver.py:142-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. Read the line range as the matched WINDOW rather than a finished unit: at `H-GPT/hGPT/utils/geometry_conver.py:118` 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×2
  • Duplicated block (11 lines × 2) H-GPT/hGPT/models/evaluator.py:461 — H-GPT/hGPT/models/evaluator.py:461-471 | H-GPT/hGPT/models/evaluator.py:618-628 — 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) H-GPT/hGPT/utils/geometry_conver.py:102 — H-GPT/hGPT/utils/geometry_conver.py:102-112 | H-GPT/hGPT/utils/geometry_tools.py:38-48 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) H-GPT/hGPT/data/default/dataset_t2m_base.py:346 — H-GPT/hGPT/data/default/dataset_t2m_base.py:346-355 | H-GPT/hGPT/data/default/dataset_t2m_train.py:106-115 | H-GPT/hGPT/data/default/dataset_t2m_train.py:355-364 — 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.
  • Duplicated block (10 lines × 3) H-GPT/hGPT/data/base.py:10 — H-GPT/hGPT/data/base.py:10-19 | REDACTED:65-74 | H-GPT/hGPT/utils/tensors.py:13-22 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×2
  • Duplicated block (10 lines × 2) H-GPT/hGPT/data/motionx/scripts/motion_process.py:245 — H-GPT/hGPT/data/motionx/scripts/motion_process.py:245-254 | H-GPT/hGPT/data/motionx/scripts/motion_process.py:280-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 (10 lines × 2) H-GPT/hGPT/utils/easyconvert.py:17 — H-GPT/hGPT/utils/easyconvert.py:17-26 | H-GPT/hGPT/utils/temos_utils.py:30-39 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:25 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:25-33 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:224-232 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:341-349 — 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. 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 × 3) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:45 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:45-53 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:243-251 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:361-369 — 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. 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, `H-GPT/hGPT/models/archs/utils/quantize_cnn.py:55` calls `no_grad` and `H-GPT/hGPT/models/archs/utils/quantize_cnn.py:253` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×2
  • Duplicated block (8 lines × 3) H-GPT/hGPT/data/default/dataset_t2m_base.py:277 — H-GPT/hGPT/data/default/dataset_t2m_base.py:277-284 | H-GPT/hGPT/data/default/dataset_t2m_token.py:174-181 | H-GPT/hGPT/data/default/dataset_t2m_train.py:280-287 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 lines × 3) H-GPT/hGPT/models/evaluator.py:459 — H-GPT/hGPT/models/evaluator.py:459-466 | H-GPT/hGPT/models/evaluator.py:514-524 | H-GPT/hGPT/models/evaluator.py:616-623 — 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 `H-GPT/hGPT/models/evaluator.py:514` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) H-GPT/hGPT/data/motionx/scripts/motion_process.py:354 — H-GPT/hGPT/data/motionx/scripts/motion_process.py:354-360 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:85-91 | REDACTED:86-92 — 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.
  • Duplicated block (7 lines × 3) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:97 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:97-103 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:284-290 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:409-415 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×2
  • Duplicated block (6 lines × 3) H-GPT/hGPT/metrics/utils.py:217 — H-GPT/hGPT/metrics/utils.py:217-222 | H-GPT/hGPT/metrics/utils.py:228-233 | H-GPT/hGPT/metrics/utils.py:241-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.
  • Duplicated block (6 lines × 3) H-GPT/hGPT/data/motionx/smplx2smpl/add_face_vectors.py:42 — H-GPT/hGPT/data/motionx/smplx2smpl/add_face_vectors.py:42-47 | H-GPT/hGPT/data/motionx/smplx2smpl/transfer_to_body_only_joints.py:36-41 | H-GPT/hGPT/data/motionx/smplx2smpl/transfer_to_body_only_vectors.py:36-41 — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×2
  • Swallowed exception (caught, then discarded) H-GPT/hGPT/models/archs/hgpt_lm.py:485 — `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) REDACTED:158 — `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.
D1 · Cyclomatic Complexity · Text2MotionDatasetTrain.__init__ (cyclomatic 30) · ×1
  • Text2MotionDatasetTrain.__init__ (cyclomatic 30) H-GPT/hGPT/data/default/dataset_t2m_train.py:21 — Text2MotionDatasetTrain.__init__ 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. This file is where this pass's cyclomatic complexity CONCENTRATES: H-GPT/hGPT/data/default/dataset_t2m_train.py holds 2 of the 4 methods over the threshold — including the worst — and 27 of the 48 points over it (56%), 2.1× the next-largest file (H-GPT/hGPT/data/default/dataset_t2m_base.py at 13). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · Text2MotionDatasetBase.__init__ (cyclomatic 28) · ×1
  • Text2MotionDatasetBase.__init__ (cyclomatic 28) H-GPT/hGPT/data/default/dataset_t2m_base.py:19 — Text2MotionDatasetBase.__init__ has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Text2MotionDatasetTrainDist._load_single_data (cyclomatic 27) · ×1
  • Text2MotionDatasetTrainDist._load_single_data (cyclomatic 27) H-GPT/hGPT/data/default/dataset_t2m_train.py:315 — Text2MotionDatasetTrainDist._load_single_data 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. This file is where this pass's cyclomatic complexity CONCENTRATES: H-GPT/hGPT/data/default/dataset_t2m_train.py holds 2 of the 4 methods over the threshold — including the worst — and 27 of the 48 points over it (56%), 2.1× the next-largest file (H-GPT/hGPT/data/default/dataset_t2m_base.py at 13). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
D1 · Cyclomatic Complexity · HumanoidGPT.allsplit_step (cyclomatic 23) · ×1
  • HumanoidGPT.allsplit_step (cyclomatic 23) H-GPT/hGPT/models/hgpt.py:211 — HumanoidGPT.allsplit_step 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.
D2 · Cognitive Complexity · Text2MotionDatasetTrain.__init__ (cognitive 74) · ×1
  • Text2MotionDatasetTrain.__init__ (cognitive 74) H-GPT/hGPT/data/default/dataset_t2m_train.py:21 — Text2MotionDatasetTrain.__init__ has cognitive complexity 74 (threshold 15). Drivers by points: if/else 20 (53 pts), loops 5 (7 pts), ternaries 3 (7 pts), error handling 2 (5 pts), boolean chains 2 (nesting depth added 42). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Text2MotionDatasetBase.__init__ (cognitive 64) · ×1
  • Text2MotionDatasetBase.__init__ (cognitive 64) H-GPT/hGPT/data/default/dataset_t2m_base.py:19 — Text2MotionDatasetBase.__init__ has cognitive complexity 64 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 5 (12 pts), ternaries 3 (7 pts), error handling 2 (5 pts), boolean chains 3 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Text2MotionDatasetTrainDist._load_single_data (cognitive 51) · ×1
  • Text2MotionDatasetTrainDist._load_single_data (cognitive 51) H-GPT/hGPT/data/default/dataset_t2m_train.py:315 — Text2MotionDatasetTrainDist._load_single_data has cognitive complexity 51 (threshold 15). Drivers by points: if/else 20 (40 pts), error handling 3 (4 pts), ternaries 2 (4 pts), boolean chains 2, loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HumanoidGPT.allsplit_step (cognitive 48) · ×1
  • HumanoidGPT.allsplit_step (cognitive 48) H-GPT/hGPT/models/hgpt.py:211 — HumanoidGPT.allsplit_step has cognitive complexity 48 (threshold 15). Drivers by points: if/else 20 (44 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 26). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · Text2MotionDatasetToken.__init__ (cognitive 23) · ×1
  • Text2MotionDatasetToken.__init__ (cognitive 23) H-GPT/hGPT/data/default/dataset_t2m_token.py:24 — Text2MotionDatasetToken.__init__ has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (17 pts), error handling 1 (2 pts), loops 2, boolean chains 1, ternaries 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · config.parse_args (cognitive 17) · ×1
  • config.parse_args (cognitive 17) H-GPT/hGPT/config.py:63 — config.parse_args has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 6 (12 pts), if/else 5 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · demo.main (cognitive 17) · ×1
  • demo.main (cognitive 17) H-GPT/scripts/demo.py:137 — demo.main has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), loops 2 (5 pts), error handling 1 (4 pts) (nesting depth added 7). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · Text2MotionDatasetTrain.__getitem__ (cognitive 16) · ×1
  • Text2MotionDatasetTrain.__getitem__ (cognitive 16) H-GPT/hGPT/data/default/dataset_t2m_train.py:189 — Text2MotionDatasetTrain.__getitem__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 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. This shape REPEATS in the file: one other method here (Text2MotionDatasetTrainDist.__getitem__) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · Text2MotionDatasetTrainDist.__getitem__ (cognitive 16) · ×1
  • Text2MotionDatasetTrainDist.__getitem__ (cognitive 16) H-GPT/hGPT/data/default/dataset_t2m_train.py:476 — Text2MotionDatasetTrainDist.__getitem__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 2, loops 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. This shape REPEATS in the file: one other method here (Text2MotionDatasetTrain.__getitem__) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
D2 · Cognitive Complexity · BaseModel.save_npy (cognitive 16) · ×1
  • BaseModel.save_npy (cognitive 16) H-GPT/hGPT/models/base.py:160 — BaseModel.save_npy has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (9 pts), loops 2 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · demo.load_example_input (cognitive 16) · ×1
  • demo.load_example_input (cognitive 16) H-GPT/scripts/demo.py:41 — demo.load_example_input has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 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.
D4 · Code Duplication · Near-duplicate member family (4 members, 111 shared lines) · ×1
  • Near-duplicate member family (4 members, 111 shared lines) H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:79 — H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:79-244 | H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:250-392 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:109-238 | REDACTED:110-239 — These 4 members are variants of one another: a block of 111 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 · Members sharing a duplicated core (6 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (6 members, 50+ identical tokens) H-GPT/hGPT/data/default/dataset_t2m_base.py:36 — H-GPT/hGPT/data/default/dataset_t2m_base.py:36-191 | H-GPT/hGPT/data/default/dataset_t2m_base.py:266-469 | H-GPT/hGPT/data/default/dataset_t2m_token.py:41-109 | H-GPT/hGPT/data/default/dataset_t2m_token.py:163-285 | H-GPT/hGPT/data/default/dataset_t2m_train.py:38-184 | H-GPT/hGPT/data/default/dataset_t2m_train.py:270-313 — These 6 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 6 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 6 times.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) H-GPT/hGPT/utils/geometry_conver.py:23 — H-GPT/hGPT/utils/geometry_conver.py:23-51 | H-GPT/hGPT/utils/geometry_tools.py:464-492 | H-GPT/hGPT/utils/geometry_tools.py:496-523 | H-GPT/hGPT/utils/rotation_conversions.py:449-477 | H-GPT/hGPT/utils/rotation_conversions.py:481-508 — 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 · Edited copy of a member (86 corresponding lines) · ×1
  • Edited copy of a member (86 corresponding lines) H-GPT/hGPT/metrics/m2t.py:218 — H-GPT/hGPT/metrics/m2t.py:218-310 | H-GPT/hGPT/metrics/t2m.py:140-225 — These two members are one piece of code written twice and then edited apart: 86 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 (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) H-GPT/hGPT/metrics/m2t.py:28 — H-GPT/hGPT/metrics/m2t.py:28-111 | H-GPT/hGPT/metrics/t2m.py:28-89 — These two members are one piece of code written twice and then edited apart: 62 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 (44 corresponding lines) · ×1
  • Edited copy of a member (44 corresponding lines) H-GPT/hGPT/data/motionx/common/quaternion.py:179 — H-GPT/hGPT/data/motionx/common/quaternion.py:179-229 | H-GPT/hGPT/data/motionx/common/quaternion.py:252-295 — These two members are one piece of code written twice and then edited apart: 44 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 (47 corresponding lines) · ×1
  • Edited copy of a member (47 corresponding lines) H-GPT/hGPT/data/default/dataset_t2m_base.py:197 — H-GPT/hGPT/data/default/dataset_t2m_base.py:197-244 | H-GPT/hGPT/data/default/dataset_t2m_base.py:475-521 — These two members are one piece of code written twice and then edited apart: 47 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 (45 corresponding lines) · ×1
  • Edited copy of a member (45 corresponding lines) H-GPT/hGPT/metrics/mm.py:39 — H-GPT/hGPT/metrics/mm.py:39-83 | H-GPT/hGPT/metrics/t2m.py:92-136 — These two members are one piece of code written twice and then edited apart: 45 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 (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) H-GPT/hGPT/metrics/m2t.py:324 — H-GPT/hGPT/metrics/m2t.py:324-351 | H-GPT/hGPT/metrics/t2m.py:245-290 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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 (25 corresponding lines) · ×1
  • Edited copy of a member (25 corresponding lines) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:58 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:58-86 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:374-398 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — 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) H-GPT/hGPT/data/motionx/common/skeleton.py:169 — H-GPT/hGPT/data/motionx/common/skeleton.py:169-189 | H-GPT/hGPT/data/motionx/common/skeleton.py:198-222 | H-GPT/hGPT/data/motionx/common/skeleton.py:230-250 | H-GPT/hGPT/data/motionx/common/skeleton.py:258-282 — 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 copy of a member (24 corresponding lines) · ×1
  • Edited copy of a member (24 corresponding lines) H-GPT/hGPT/models/evaluator.py:289 — H-GPT/hGPT/models/evaluator.py:289-330 | H-GPT/hGPT/models/evaluator.py:355-378 — 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 copies of one member (3 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 16+ corresponding lines) H-GPT/hGPT/data/motionx/scripts/motion_process.py:410 — H-GPT/hGPT/data/motionx/scripts/motion_process.py:410-439 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:58-73 | REDACTED:59-74 — 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 copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) H-GPT/hGPT/utils/geometry_conver.py:118 — H-GPT/hGPT/utils/geometry_conver.py:118-136 | H-GPT/hGPT/utils/geometry_conver.py:142-158 — 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) · ×1
  • Edited copy of a member (10 corresponding lines) H-GPT/hGPT/data/base.py:7 — H-GPT/hGPT/data/base.py:7-19 | REDACTED:65-74 — 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 (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) H-GPT/hGPT/utils/easyconvert.py:51 — H-GPT/hGPT/utils/easyconvert.py:51-66 | H-GPT/hGPT/utils/easyconvert.py:70-85 | H-GPT/hGPT/utils/temos_utils.py:64-79 | H-GPT/hGPT/utils/temos_utils.py:83-98 — These 4 members are one piece of code written 4 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 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×1
  • Edited copy of a member (16 corresponding lines) H-GPT/hGPT/utils/geometry_conver.py:546 — H-GPT/hGPT/utils/geometry_conver.py:546-561 | H-GPT/hGPT/utils/geometry_conver.py:565-580 — 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 copy of a member (11 corresponding lines) · ×1
  • Edited copy of a member (11 corresponding lines) H-GPT/hGPT/models/evaluator.py:339 — H-GPT/hGPT/models/evaluator.py:339-350 | H-GPT/hGPT/models/evaluator.py:389-399 — 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 · Duplicated block (64–68 lines × 4) · ×1
  • Duplicated block (64–68 lines × 4) H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:177 — H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:177-244 | H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:329-392 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:171-238 | REDACTED:172-239 — before extracting anything, compare `H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py` and `H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 129 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:327` calls `add_axes` and `H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:175` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (59 lines × 2) · ×1
  • Duplicated block (59 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_train.py:190 — H-GPT/hGPT/data/default/dataset_t2m_train.py:190-248 | H-GPT/hGPT/data/default/dataset_t2m_train.py:477-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (47–48 lines × 4) · ×1
  • Duplicated block (47–48 lines × 4) H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:118 — H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:118-165 | H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:273-319 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:116-162 | REDACTED:117-163 — before extracting anything, compare `H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py` and `H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) H-GPT/hGPT/models/archs/utils/resnet.py:18 — H-GPT/hGPT/models/archs/utils/resnet.py:18-58 | H-GPT/hGPT/models/evaluator.py:25-65 — before extracting anything, compare `H-GPT/hGPT/models/archs/utils/resnet.py` and `H-GPT/hGPT/models/evaluator.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 77 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.
D4 · Code Duplication · Duplicated block (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:232 — H-GPT/hGPT/utils/geometry_tools.py:232-270 | H-GPT/hGPT/utils/rotation_conversions.py:217-255 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (33 lines × 2) · ×1
  • Duplicated block (33 lines × 2) H-GPT/hGPT/metrics/mm.py:39 — H-GPT/hGPT/metrics/mm.py:39-71 | H-GPT/hGPT/metrics/t2m.py:92-124 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (23–30 lines × 3) · ×1
  • Duplicated block (23–30 lines × 3) H-GPT/hGPT/data/default/dataset_t2m_base.py:213 — H-GPT/hGPT/data/default/dataset_t2m_base.py:213-236 | H-GPT/hGPT/data/default/dataset_t2m_base.py:491-513 | H-GPT/hGPT/data/default/dataset_t2m_eval.py:131-160 — 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 `H-GPT/hGPT/data/default/dataset_t2m_base.py:213` 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 matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (25–29 lines × 3) · ×1
  • Duplicated block (25–29 lines × 3) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:110 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:110-138 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:297-321 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:422-450 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (29 lines × 3) · ×1
  • Duplicated block (29 lines × 3) H-GPT/hGPT/utils/geometry_conver.py:23 — H-GPT/hGPT/utils/geometry_conver.py:23-51 | H-GPT/hGPT/utils/geometry_tools.py:464-492 | H-GPT/hGPT/utils/rotation_conversions.py:449-477 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_base.py:72 — H-GPT/hGPT/data/default/dataset_t2m_base.py:72-98 | H-GPT/hGPT/data/default/dataset_t2m_token.py:76-101 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (27 lines × 2) · ×1
  • Duplicated block (27 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_token.py:115 — H-GPT/hGPT/data/default/dataset_t2m_token.py:115-141 | H-GPT/hGPT/data/default/dataset_t2m_token.py:291-317 — 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 `H-GPT/hGPT/data/default/dataset_t2m_token.py:115` 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 matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) H-GPT/hGPT/metrics/m2t.py:47 — H-GPT/hGPT/metrics/m2t.py:47-69 | H-GPT/hGPT/metrics/t2m.py:48-71 — before extracting anything, compare `H-GPT/hGPT/metrics/m2t.py` and `H-GPT/hGPT/metrics/t2m.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (25 lines × 2) · ×1
  • Duplicated block (25 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:137 — H-GPT/hGPT/utils/geometry_tools.py:137-161 | H-GPT/hGPT/utils/rotation_conversions.py:122-146 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (20–21 lines × 3) · ×1
  • Duplicated block (20–21 lines × 3) H-GPT/hGPT/metrics/m2t.py:131 — H-GPT/hGPT/metrics/m2t.py:131-150 | H-GPT/hGPT/metrics/mm.py:63-83 | H-GPT/hGPT/metrics/t2m.py:116-136 — before extracting anything, compare `H-GPT/hGPT/metrics/m2t.py` and `H-GPT/hGPT/metrics/t2m.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 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, `H-GPT/hGPT/metrics/t2m.py:138` calls `no_grad` and `H-GPT/hGPT/metrics/mm.py:85` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16–21 lines × 2) · ×1
  • Duplicated block (16–21 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_base.py:308 — H-GPT/hGPT/data/default/dataset_t2m_base.py:308-328 | H-GPT/hGPT/data/default/dataset_t2m_token.py:208-223 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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 `H-GPT/hGPT/data/default/dataset_t2m_base.py:308` 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.
D4 · Code Duplication · Duplicated block (26–28 lines × 4) · ×1
  • Duplicated block (26–28 lines × 4) H-GPT/hGPT/data/motionx/common/quaternion.py:299 — H-GPT/hGPT/data/motionx/common/quaternion.py:299-324 | H-GPT/hGPT/utils/geometry_conver.py:55-82 | H-GPT/hGPT/utils/geometry_tools.py:52-79 | H-GPT/hGPT/utils/rotation_conversions.py:37-64 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 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 4 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.
D4 · Code Duplication · Duplicated block (19 lines × 3) · ×1
  • Duplicated block (19 lines × 3) H-GPT/hGPT/data/default/dataset_t2m_base.py:47 — H-GPT/hGPT/data/default/dataset_t2m_base.py:47-65 | H-GPT/hGPT/data/default/dataset_t2m_token.py:52-70 | H-GPT/hGPT/data/default/dataset_t2m_train.py:47-65 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (14–19 lines × 3) · ×1
  • Duplicated block (14–19 lines × 3) H-GPT/hGPT/data/default/dataset_t2m_base.py:197 — H-GPT/hGPT/data/default/dataset_t2m_base.py:197-210 | H-GPT/hGPT/data/default/dataset_t2m_base.py:475-488 | H-GPT/hGPT/data/default/dataset_t2m_eval.py:71-89 — 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.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:527 — H-GPT/hGPT/utils/geometry_tools.py:527-547 | H-GPT/hGPT/utils/rotation_conversions.py:512-532 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (13–17 lines × 2) · ×1
  • Duplicated block (13–17 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_eval.py:98 — H-GPT/hGPT/data/default/dataset_t2m_eval.py:98-114 | H-GPT/hGPT/metrics/m2t.py:178-190 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (16–17 lines × 2) · ×1
  • Duplicated block (16–17 lines × 2) H-GPT/hGPT/models/evaluator.py:518 — H-GPT/hGPT/models/evaluator.py:518-533 | H-GPT/hGPT/models/evaluator.py:561-577 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
D4 · Code Duplication · Duplicated block (14–16 lines × 3) · ×1
  • Duplicated block (14–16 lines × 3) H-GPT/hGPT/data/motionx/scripts/motion_process.py:424 — H-GPT/hGPT/data/motionx/scripts/motion_process.py:424-439 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:60-73 | REDACTED:61-74 — 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.
D4 · Code Duplication · Duplicated block (15 lines × 4) · ×1
  • Duplicated block (15 lines × 4) H-GPT/hGPT/data/default/dataset_t2m_base.py:36 — H-GPT/hGPT/data/default/dataset_t2m_base.py:36-50 | H-GPT/hGPT/data/default/dataset_t2m_base.py:266-280 | H-GPT/hGPT/data/default/dataset_t2m_token.py:41-55 | H-GPT/hGPT/data/default/dataset_t2m_token.py:163-177 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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, `H-GPT/hGPT/data/default/dataset_t2m_base.py:54` calls `enumerate` and `H-GPT/hGPT/data/default/dataset_t2m_base.py:284` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×1
  • Duplicated block (18 lines × 2) H-GPT/hGPT/utils/geometry_tools.py:355 — H-GPT/hGPT/utils/geometry_tools.py:355-372 | H-GPT/hGPT/utils/rotation_conversions.py:340-357 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 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 · Duplicated block (13 lines × 3) · ×1
  • Duplicated block (13 lines × 3) H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:419 — H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:419-431 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:245-257 | REDACTED:246-258 — before extracting anything, compare `H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py` and `H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 129 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (12 lines × 5) · ×1
  • Duplicated block (12 lines × 5) H-GPT/hGPT/utils/geometry_conver.py:36 — H-GPT/hGPT/utils/geometry_conver.py:36-47 | H-GPT/hGPT/utils/geometry_tools.py:477-488 | H-GPT/hGPT/utils/geometry_tools.py:511-522 | H-GPT/hGPT/utils/rotation_conversions.py:462-473 | H-GPT/hGPT/utils/rotation_conversions.py:496-507 — there are 5 copies across 3 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 5 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×1
  • Duplicated block (12 lines × 3) H-GPT/hGPT/data/default/dataset_t2m_train.py:203 — H-GPT/hGPT/data/default/dataset_t2m_train.py:203-214 | H-GPT/hGPT/data/default/dataset_t2m_train.py:490-501 | H-GPT/hGPT/metrics/m2t.py:154-165 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×1
  • Duplicated block (11 lines × 5) H-GPT/hGPT/data/default/dataset_t2m_base.py:43 — H-GPT/hGPT/data/default/dataset_t2m_base.py:43-53 | H-GPT/hGPT/data/default/dataset_t2m_base.py:273-283 | H-GPT/hGPT/data/default/dataset_t2m_token.py:48-58 | H-GPT/hGPT/data/default/dataset_t2m_token.py:170-180 | H-GPT/hGPT/data/default/dataset_t2m_train.py:43-53 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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, `H-GPT/hGPT/data/default/dataset_t2m_base.py:54` calls `enumerate` and `H-GPT/hGPT/data/default/dataset_t2m_base.py:284` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (8–11 lines × 2) · ×1
  • Duplicated block (8–11 lines × 2) H-GPT/hGPT/data/default/dataset_t2m_train.py:176 — H-GPT/hGPT/data/default/dataset_t2m_train.py:176-183 | H-GPT/hGPT/data/default/dataset_t2m_train.py:302-312 — 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 `H-GPT/hGPT/data/default/dataset_t2m_train.py:302` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) H-GPT/hGPT/data/motionx/common/skeleton.py:204 — H-GPT/hGPT/data/motionx/common/skeleton.py:204-214 | H-GPT/hGPT/data/motionx/common/skeleton.py:230-239 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9–10 lines × 4) · ×1
  • Duplicated block (9–10 lines × 4) H-GPT/hGPT/metrics/m2t.py:241 — H-GPT/hGPT/metrics/m2t.py:241-249 | H-GPT/hGPT/metrics/m2t.py:263-271 | H-GPT/hGPT/metrics/t2m.py:163-172 | H-GPT/hGPT/metrics/t2m.py:185-193 — before extracting anything, compare `H-GPT/hGPT/metrics/m2t.py` and `H-GPT/hGPT/metrics/t2m.py` as WHOLE FILES: this scan already matched 6 separate duplicated blocks between them, totalling at least 90 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 `H-GPT/hGPT/metrics/m2t.py:241` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9–10 lines × 3) · ×1
  • Duplicated block (9–10 lines × 3) H-GPT/hGPT/models/archs/hgpt_vq.py:133 — H-GPT/hGPT/models/archs/hgpt_vq.py:133-142 | H-GPT/hGPT/models/archs/hgpt_vq.py:170-178 | H-GPT/hGPT/models/evaluator.py:238-247 — 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 `H-GPT/hGPT/models/archs/hgpt_vq.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.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) H-GPT/hGPT/data/default/dataset_t2m_base.py:119 — H-GPT/hGPT/data/default/dataset_t2m_base.py:119-126 | H-GPT/hGPT/data/default/dataset_t2m_base.py:350-357 | H-GPT/hGPT/data/default/dataset_t2m_train.py:110-117 | H-GPT/hGPT/data/default/dataset_t2m_train.py:359-366 — 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.
D4 · Code Duplication · Duplicated block (1–8 lines × 3) · ×1
  • Duplicated block (1–8 lines × 3) H-GPT/hGPT/data/motionx/scripts/motion_process.py:364 — H-GPT/hGPT/data/motionx/scripts/motion_process.py:364-364 | H-GPT/hGPT/data/motionx/visualization/plot_feature_body.py:96-103 | REDACTED:97-104 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 6) · ×1
  • Duplicated block (7 lines × 6) H-GPT/hGPT/data/default/dataset_t2m_base.py:47 — H-GPT/hGPT/data/default/dataset_t2m_base.py:47-53 | H-GPT/hGPT/data/default/dataset_t2m_base.py:277-283 | H-GPT/hGPT/data/default/dataset_t2m_token.py:52-58 | H-GPT/hGPT/data/default/dataset_t2m_token.py:174-180 | H-GPT/hGPT/data/default/dataset_t2m_train.py:47-53 | H-GPT/hGPT/data/default/dataset_t2m_train.py:280-286 — before extracting anything, compare `H-GPT/hGPT/data/default/dataset_t2m_base.py` and `H-GPT/hGPT/data/default/dataset_t2m_token.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 108 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, `H-GPT/hGPT/data/default/dataset_t2m_base.py:54` calls `enumerate` and `H-GPT/hGPT/data/default/dataset_t2m_base.py:284` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) H-GPT/hGPT/utils/geometry_tools.py:178 — H-GPT/hGPT/utils/geometry_tools.py:178-184 | H-GPT/hGPT/utils/geometry_tools.py:242-248 | H-GPT/hGPT/utils/rotation_conversions.py:163-169 | H-GPT/hGPT/utils/rotation_conversions.py:227-233 — before extracting anything, compare `H-GPT/hGPT/utils/geometry_tools.py` and `H-GPT/hGPT/utils/rotation_conversions.py` as WHOLE FILES: this scan already matched 16 separate duplicated blocks between them, totalling at least 339 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (6–7 lines × 2) · ×1
  • Duplicated block (6–7 lines × 2) REDACTED:506 — REDACTED:506-511 | REDACTED:519-525 — 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:506` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×1
  • Duplicated block (7 lines × 2) H-GPT/hGPT/models/archs/utils/quantize_cnn.py:160 — H-GPT/hGPT/models/archs/utils/quantize_cnn.py:160-166 | H-GPT/hGPT/models/archs/utils/quantize_cnn.py:188-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 6) · ×1
  • Duplicated block (15 lines × 6) REDACTED:46 — REDACTED:46-60 | H-GPT/hGPT/data/motionx/scripts/cal_mean_variance.py:9-23 | H-GPT/hGPT/data/motionx/scripts/motion_process.py:60-74 | H-GPT/hGPT/data/motionx/scripts/raw_pose_processing.py:62-76 | H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:59-73 | REDACTED:264-278 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 6 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 6 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×1
  • Low cohesion: MotionXDataModule (LCOM4 4) H-GPT/hGPT/data/MotionX.py:89 — MotionXDataModule'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.
P1 · CI/CD gates · No CI pipeline · ×1
  • No CI pipeline — No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, …) — changes aren't gated by an automated build/test.
X3 · Exception handling · Swallowed exception (empty catch) · ×1
  • Swallowed exception (empty catch) H-GPT/hGPT/data/motionx/visualization/plot_3d_global.py:456 — 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.
Minor — 7 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×4
  • Duplicated predicate H-GPT/hGPT/data/default/dataset_t2m_base.py:91 — `(len(motion)) < self.min_motion_length or ( len(motion) >= self.max_motion_length )` appears character-identically in 2 files — H-GPT/hGPT/data/default/dataset_t2m_base.py, H-GPT/hGPT/data/default/dataset_t2m_token.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 H-GPT/hGPT/utils/geometry_tools.py:176 — `euler_angles.dim() == 0 or euler_angles.shape[-1] != 3` appears character-identically in 2 files — H-GPT/hGPT/utils/geometry_tools.py, H-GPT/hGPT/utils/rotation_conversions.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 H-GPT/hGPT/utils/geometry_tools.py:121 — `matrix.size(-1) != 3 or matrix.size(-2) != 3` appears character-identically in 2 files — H-GPT/hGPT/utils/geometry_tools.py, H-GPT/hGPT/utils/rotation_conversions.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 H-GPT/hGPT/data/default/dataset_t2m_train.py:210 — `token.pos_ == "NOUN" or token.pos_ == "VERB"` appears character-identically in 2 files — H-GPT/hGPT/data/default/dataset_t2m_train.py, H-GPT/hGPT/metrics/m2t.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.
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack — this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge'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 · No dependency-update automation · ×1
  • No dependency-update automation REDACTED:1 — `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Minor — 2 finding(s)
D12 · Dependency Hygiene · Outdated · ×2
  • Outdated: numpy — `numpy` is pinned to 1.23.5, but 2.5.5 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 1.23.5 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.
  • Outdated: transformers — `transformers` is pinned to 4.45.1, but 5.23.0 is the current stable release on PyPI. An exact pin never moves on its own, so this repository installs 4.45.1 until the declaration is edited. This crosses a major version, so it is a migration rather than a bump.

Appendix B — Reproduction & audit trail

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

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

Run 01a1e5ea-57e1-7d77-a00e-b02ebbc54d95 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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