Public report of hachmannlab/chemml, published 17 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, 17 November 2026, 09:20 UTC · Survey ID cd_e804ae6b930d41c0993bb869545173c3

hachmannlab/chemml

Measured 17 November 2026, 09:20 UTC, at code version 0349ce5

Knowledge freshness is not measured: Freshness signal contradicted by repo activity.

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

CAI score 62.4out of 100 Adequate
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 medium codebase: 31,412 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.3 person-years · Weakest lens: Code Health, 59.6

Findings by how serious they are

41 critical 246 serious 10 minor

15 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
17 November 2026, 09:20 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 ▸

33of 33 dimensions measured by tools.
290of 297 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.
33dimensions across 5 lenses, read from 31,412 lines of product code in 1 project.
Chapters

Executive summary

hachmannlab/chemml falls short of our standard for production, held back most by its Code Health lens, the quality of the code itself. It scores 62.4 out of 100 and is rated Adequate, and 40 of its 41 critical findings are security problems.

Code Health, at 59.6, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step for the work it takes is replacing the two passwords or keys found in the code's history, worth about 1.3 points. Writing log messages as searchable templates would lift Code Health itself, worth about 2.5 points.

Twenty-seven places in the code run text as code, which an attacker could use. Six pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with, and four pipeline steps install packages that can change without warning. Replacing text run as code with direct calls, pinning each tool to an exact version and pinning what the pipeline installs would close these risks. Limiting each secret to its own step would fix the secret exposed to more of the pipeline than needed, and the two passwords or keys in the code's history need replacing, with the old ones switched off. The package under a licence on your banned list needs replacing, or clearing with your legal team.

The product code is 31,412 lines, about €42,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.
Code Health 59.6 · counts for 47%Security and Compliance 60.1 · counts for 26%Maturity 64.4 · counts for 14%Production Readiness 64.8 · counts for 8%Architecture 95.6 · counts for 4%

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

Code composition: what the lines of code are
Product code 84%Tests 16%
Rebuild cost: about €42,000 · Estimate
Cost to rebuild€14,000 to €70,000, for 231 to 733 hours of work, about 0.3 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.9 at a score of 62. 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.
SizeMedium: 31,412 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 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED.
Raises the score by about 1.3 points · Low effort · Secrets (history)
2
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.
Raises the score by about 1.3 points · Low effort · Static Analysis (SAST)
3
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
Raises the score by about 2.5 points · Medium effort · Security & performance tooling

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 €42,000 to build again, about 0.3 person-years of work. Its weakest lens is Code Health, at 59.6 (Adequate). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Resolve the 2 REDACTED finding(s) in Secrets (history). Of all the actions in this report, it raises the score most for the work it takes: about 1.3 points for low effort, because it clears the 2 Secrets (history) 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 6,436 lines over the last 90 days, which is about 26,102 lines a year. At that pace, the extra work comes to an estimated 2.5 to 15 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.

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

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

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 autoML2 autoML.model_screener3 chem4 chem.CoulMat5 chem.Dragon6 chem.RDKFP7 chem.foss_descriptors8 chem.magpie_python.attributes.generators.composition.APEAttributeGenerator9 chem.magpie_python.attributes.generators.composition.ChargeDependentAttributeGenerator10 chem.magpie_python.attributes.generators.composition.ElementFractionAttributeGenerator11 chem.magpie_python.attributes.generators.composition.ElementPairPropertyAttributeGenerator12 chem.magpie_python.attributes.generators.composition.ElementalPropertyAttributeGenerator13 chem.magpie_python.attributes.generators.composition.GCLPAttributeGenerator14 chem.magpie_python.attributes.generators.composition.IonicCompoundProximityAttributeGenerator15 chem.magpie_python.attributes.generators.composition.IonicityAttributeGenerator16 chem.magpie_python.attributes.generators.composition.MeredigAttributeGenerator17 chem.magpie_python.attributes.generators.composition.StoichiometricAttributeGenerator18 chem.magpie_python.attributes.generators.composition.ValenceShellAttributeGenerator19 chem.magpie_python.attributes.generators.composition.YangOmegaAttributeGenerator20 chem.magpie_python.attributes.generators.crystal.APRDFAttributeGenerator21 chem.magpie_python.attributes.generators.crystal.ChemicalOrderingAttributeGenerator22 chem.magpie_python.attributes.generators.crystal.CoordinationNumberAttributeGenerator23 chem.magpie_python.attributes.generators.crystal.CoulombMatrixAttributeGenerator24 chem.magpie_python.attributes.generators.crystal.EffectiveCoordinationNumberAttributeGenerator25 chem.magpie_python.attributes.generators.crystal.LatticeSimilarityAttributeGenerator26 chem.magpie_python.attributes.generators.crystal.LocalPropertyDifferenceAttributeGenerator27 chem.magpie_python.attributes.generators.crystal.PRDFAttributeGenerator28 chem.magpie_python.attributes.generators.crystal.PackingEfficiencyAttributeGenerator29 chem.magpie_python.attributes.generators.crystal.StructuralHeterogeneityAttributeGenerator30 chem.magpie_python.data.materials.CompositionEntry31 chem.magpie_python.data.materials.util.GCLPCalculator32 chem.magpie_python.data.materials.util.LookUpData33 wrapper.base34 wrapper.sklearn_skl.syntax35 chem.magpie_python.attributes.generators.crystal.LocalPropertyVarianceAttributeGenerator36 chem.magpie_python.data.materials.CrystalStructureEntry37 wrapper.chemml_cml.chemml_wrapper38 wrapper.engine39 wrapper.pandas_pd.pandas_wrapper40 wrapper.sklearn_skl.sklearn_wrapper
1 autoML
2 autoML.model_screener
3 chem
4 chem.CoulMat
5 chem.Dragon
6 chem.RDKFP
7 chem.foss_descriptors
8 chem.magpie_python.attributes.generators.composition.APEAttributeGenerator
9 chem.magpie_python.attributes.generators.composition.ChargeDependentAttributeGenerator
10 chem.magpie_python.attributes.generators.composition.ElementFractionAttributeGenerator
11 chem.magpie_python.attributes.generators.composition.ElementPairPropertyAttributeGenerator
12 chem.magpie_python.attributes.generators.composition.ElementalPropertyAttributeGenerator
13 chem.magpie_python.attributes.generators.composition.GCLPAttributeGenerator
14 chem.magpie_python.attributes.generators.composition.IonicCompoundProximityAttributeGenerator
15 chem.magpie_python.attributes.generators.composition.IonicityAttributeGenerator
16 chem.magpie_python.attributes.generators.composition.MeredigAttributeGenerator
17 chem.magpie_python.attributes.generators.composition.StoichiometricAttributeGenerator
18 chem.magpie_python.attributes.generators.composition.ValenceShellAttributeGenerator
19 chem.magpie_python.attributes.generators.composition.YangOmegaAttributeGenerator
20 chem.magpie_python.attributes.generators.crystal.APRDFAttributeGenerator
21 chem.magpie_python.attributes.generators.crystal.ChemicalOrderingAttributeGenerator
22 chem.magpie_python.attributes.generators.crystal.CoordinationNumberAttributeGenerator
23 chem.magpie_python.attributes.generators.crystal.CoulombMatrixAttributeGenerator
24 chem.magpie_python.attributes.generators.crystal.EffectiveCoordinationNumberAttributeGenerator
25 chem.magpie_python.attributes.generators.crystal.LatticeSimilarityAttributeGenerator
26 chem.magpie_python.attributes.generators.crystal.LocalPropertyDifferenceAttributeGenerator
27 chem.magpie_python.attributes.generators.crystal.PRDFAttributeGenerator
28 chem.magpie_python.attributes.generators.crystal.PackingEfficiencyAttributeGenerator
29 chem.magpie_python.attributes.generators.crystal.StructuralHeterogeneityAttributeGenerator
30 chem.magpie_python.data.materials.CompositionEntry
31 chem.magpie_python.data.materials.util.GCLPCalculator
32 chem.magpie_python.data.materials.util.LookUpData
33 wrapper.base
34 wrapper.sklearn_skl.syntax
35 chem.magpie_python.attributes.generators.crystal.LocalPropertyVarianceAttributeGenerator1
36 chem.magpie_python.data.materials.CrystalStructureEntry1
37 wrapper.chemml_cml.chemml_wrapper51
38 wrapper.engine1
39 wrapper.pandas_pd.pandas_wrapper6
40 wrapper.sklearn_skl.sklearn_wrapper151
Uses a module listed above itPart of a loopThe module itself
1 autoML2 autoML.model_screener3 chem4 chem.CoulMat5 chem.Dragon6 chem.RDKFP7 chem.foss_descriptors8 chem.magpie_python.attributes.generators.composition.APEAttributeGenerator9 chem.magpie_python.attributes.generators.composition.ChargeDependentAttributeGenerator10 chem.magpie_python.attributes.generators.composition.ElementFractionAttributeGenerator11 chem.magpie_python.attributes.generators.composition.ElementPairPropertyAttributeGenerator12 chem.magpie_python.attributes.generators.composition.ElementalPropertyAttributeGenerator13 chem.magpie_python.attributes.generators.composition.GCLPAttributeGenerator14 chem.magpie_python.attributes.generators.composition.IonicCompoundProximityAttributeGenerator15 chem.magpie_python.attributes.generators.composition.IonicityAttributeGenerator16 chem.magpie_python.attributes.generators.composition.MeredigAttributeGenerator17 chem.magpie_python.attributes.generators.composition.StoichiometricAttributeGenerator18 chem.magpie_python.attributes.generators.composition.ValenceShellAttributeGenerator19 chem.magpie_python.attributes.generators.composition.YangOmegaAttributeGenerator20 chem.magpie_python.attributes.generators.crystal.APRDFAttributeGenerator21 chem.magpie_python.attributes.generators.crystal.ChemicalOrderingAttributeGenerator22 chem.magpie_python.attributes.generators.crystal.CoordinationNumberAttributeGenerator23 chem.magpie_python.attributes.generators.crystal.CoulombMatrixAttributeGenerator24 chem.magpie_python.attributes.generators.crystal.EffectiveCoordinationNumberAttributeGenerator25 chem.magpie_python.attributes.generators.crystal.LatticeSimilarityAttributeGenerator26 chem.magpie_python.attributes.generators.crystal.LocalPropertyDifferenceAttributeGenerator27 chem.magpie_python.attributes.generators.crystal.PRDFAttributeGenerator28 chem.magpie_python.attributes.generators.crystal.PackingEfficiencyAttributeGenerator29 chem.magpie_python.attributes.generators.crystal.StructuralHeterogeneityAttributeGenerator30 chem.magpie_python.data.materials.CompositionEntry31 chem.magpie_python.data.materials.util.GCLPCalculator32 chem.magpie_python.data.materials.util.LookUpData33 wrapper.base34 wrapper.sklearn_skl.syntax35 chem.magpie_python.attributes.generators.crystal.LocalPropertyVarianceAttributeGenerator36 chem.magpie_python.data.materials.CrystalStructureEntry37 wrapper.chemml_cml.chemml_wrapper38 wrapper.engine39 wrapper.pandas_pd.pandas_wrapper40 wrapper.sklearn_skl.sklearn_wrapperautoML1autoML.model_screener2chem3chem.CoulMat4chem.Dragon5chem.RDKFP6chem.foss_descriptors7chem.magpie_python.attributes.generators.composition.APEAttributeGenerator8chem.magpie_python.attributes.generators.composition.ChargeDependentAttributeGenerator9chem.magpie_python.attributes.generators.composition.ElementFractionAttributeGenerator10chem.magpie_python.attributes.generators.composition.ElementPairPropertyAttributeGenerator11chem.magpie_python.attributes.generators.composition.ElementalPropertyAttributeGenerator12chem.magpie_python.attributes.generators.composition.GCLPAttributeGenerator13chem.magpie_python.attributes.generators.composition.IonicCompoundProximityAttributeGenerator14chem.magpie_python.attributes.generators.composition.IonicityAttributeGenerator15chem.magpie_python.attributes.generators.composition.MeredigAttributeGenerator16chem.magpie_python.attributes.generators.composition.StoichiometricAttributeGenerator17chem.magpie_python.attributes.generators.composition.ValenceShellAttributeGenerator18chem.magpie_python.attributes.generators.composition.YangOmegaAttributeGenerator19chem.magpie_python.attributes.generators.crystal.APRDFAttributeGenerator20chem.magpie_python.attributes.generators.crystal.ChemicalOrderingAttributeGenerator21chem.magpie_python.attributes.generators.crystal.CoordinationNumberAttributeGenerator22chem.magpie_python.attributes.generators.crystal.CoulombMatrixAttributeGenerator23chem.magpie_python.attributes.generators.crystal.EffectiveCoordinationNumberAttributeGenerator24chem.magpie_python.attributes.generators.crystal.LatticeSimilarityAttributeGenerator25chem.magpie_python.attributes.generators.crystal.LocalPropertyDifferenceAttributeGenerator26chem.magpie_python.attributes.generators.crystal.PRDFAttributeGenerator27chem.magpie_python.attributes.generators.crystal.PackingEfficiencyAttributeGenerator28chem.magpie_python.attributes.generators.crystal.StructuralHeterogeneityAttributeGenerator29chem.magpie_python.data.materials.CompositionEntry30chem.magpie_python.data.materials.util.GCLPCalculator31chem.magpie_python.data.materials.util.LookUpData32wrapper.base33wrapper.sklearn_skl.syntax34chem.magpie_python.attributes.generators.crystal.LocalPropertyVarianceAttributeGenerator35chem.magpie_python.data.materials.CrystalStructureEntry36wrapper.chemml_cml.chemml_wrapper37wrapper.engine38wrapper.pandas_pd.pandas_wrapper39wrapper.sklearn_skl.sklearn_wrapper40115116151+53 more modules (most-connected shown)

At a glance — Code Health · 59.6 · Adequate · gated by D2, X4 ·

At a glance — Architecture · 95.6 · Exemplary ·

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

At a glance — Readiness · 64.8 · Adequate · gated by P3 ·

At a glance — Security · 60.1 · Adequate · gated by D29 ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection44High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Top priorities: Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing; Interpolated log message defeats structured logging; Resolve the 22 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (14), REDACTED (7), REDACTED.

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

Do thisHelpsEffortDimension
Resolve the 2 REDACTED finding(s) in Secrets (history) — start with REDACTED, REDACTED.+1.3 ptsLowSecrets (history)
Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED.+1.3 ptsLowStatic Analysis (SAST)
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.+2.5 ptsMediumSecurity & performance tooling
Interpolated log message defeats structured logging+2.5 ptsMediumStructured logging
Resolve the 22 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (14), REDACTED (7), REDACTED.+2.3 ptsMediumStatic Analysis (SAST)
Resolve the 1 Off-boarding risk finding(s) in Bus Factor.+1.0 ptsLowBus Factor
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.8 ptsMediumArchitecture documentation
Bring the 23 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with CompositionEntry.parse_composition (cyclomatic 36), ActiveLearning.search (cyclomatic 32), feature_cleaning.RemoveInvFeatures (cyclomatic 30).+1.6 ptsHighCyclomatic Complexity

File quality

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

FileScoreBandWorst signal
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED0.0SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.2SlopStatic Analysis (SAST): High: REDACTED
REDACTED1.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.4SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.5SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.5MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.0MixedStatic Analysis (SAST): High: REDACTED
chemml/models/graphconvlayers.py5.1MixedCode Duplication: Edited copy of a member (36 corresponding lines)
chemml/chem/magpie_python/data/materials/CompositionEntry.py6.0MixedExplicit Debt: TodoComment
chemml/optimization/active.py6.0MixedExplicit Debt: TodoComment
chemml/chem/molecule.py6.0MixedExplicit Debt: TodoComment
chemml/chem/local_features.py6.0MixedExplicit Debt: TodoComment
chemml/published/RI/lorentz_lorenz.py6.0MixedExplicit Debt: TodoComment
chemml/chem/foss_descriptors.py6.7MixedExplicit Debt: TodoComment
chemml/wrapper/engine.py7.0MixedCognitive Complexity: Wrapper.call (cognitive 33)
chemml/chem/CoulMat.py7.0MixedCyclomatic Complexity: CoulombMatrix._represent (cyclomatic 17)

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

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

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

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

Could not be resolved — 15

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

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, 290 of 297 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 01a1e8ce-b137-79bd-bc90-4b4055bb623a.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: the Python half could not be measured — the pytest suite ran no test, so nothing was measured (no report). Coverage is excluded from the score rather than counted as a near-zero. This is OUR limitation, not a defect in the repo — a coverage step in CI (`pytest tests/ -v --tb=short --cov=chemml --cov-report=xml --…`) shows coverage is measured in your own CI.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.py) and this repository declares a Python test suite (repository root, 75 test files), but it was not re-run: no test result was produced. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
  • D12 Dependency Hygiene — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. This repository's 23 shipped Python distribution(s) across 1 manifest(s) WERE read; what went unanswered is the currency half, because it grades an EXACT pin against the newest release and every declaration here is a floor or a range — which installs the newest release it admits and so cannot be behind one. So pypi.org was never asked. This is a true statement about the repository, and the healthy one, NOT a gap on our side: no reader we could write would find a currency question here.
  • D21 Naming Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. PREREGISTRATION version 20's fallback (adjudication D21-sample3-v3): this rule kind was adjudicated below the 95 % precision gate, so its candidates are counted here and not published, and the score covers only the acronym-spelling and awaitable-suffix rules. The kind returns as rows only after it shows a measured precision; this says nothing about whether these names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (pyproject.toml), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict.
  • 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)` (31412 LoC, 676 module-visible types across 35 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 — 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. File-level freshness contradicts repo activity: 41 commits in the last 90 days, yet 74 of 89 significant files carry no living knowledge. Those two readings cannot both be true, so the per-file recency signal is treated as unreliable here and freshness is not scored for this run.
  • 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.
  • 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, Rust and Elixir source only, and no C# was loaded and no JavaScript/TypeScript, Java, Kotlin, Dart, Ruby, Scala, PHP, Rust or Elixir 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, Kotlin and PHP 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.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • 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").
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a 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.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity7.1 / 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 7.1 / 10 · rule-coverage 100% · ceiling Prevented

23 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was CompositionEntry.parse_composition at 36. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being APEAttributeGenerator.compute_APE at 25 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold methods was excluded, so the exclusion is disclosed nowhere in the file itself: chemml/chem/magpie_python/attributes/generators/composition/APEAttributeGenerator.py (APEAttributeGenerator.compute_APE at 25). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

CompositionEntry.parse_composition (cyclomatic 36)chemml/chem/magpie_python/data/materials/CompositionEntry.py:98
ActiveLearning.search (cyclomatic 32)chemml/optimization/active.py:526
feature_cleaning.RemoveInvFeatures (cyclomatic 30)chemml/preprocessing/feature_cleaning.py:187
GA.fit (cyclomatic 30)REDACTED:1889
visualize.plot_shap_local (cyclomatic 29)chemml/explain/visualize.py:64

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

What to do

  1. Bring the 23 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with CompositionEntry.parse_composition (cyclomatic 36), ActiveLearning.search (cyclomatic 32), feature_cleaning.RemoveInvFeatures (cyclomatic 30). — 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 23 together lifts Cyclomatic Complexity from 7.1 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 Complexity3.4 / 10Weak✓ Tool-verified

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

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

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

73 method(s) exceeded the cognitive complexity threshold of 15; the worst was CompositionEntry.parse_composition at 56.

CompositionEntry.parse_composition (cognitive 56)chemml/chem/magpie_python/data/materials/CompositionEntry.py:98
GeneticAlgorithm.search (cognitive 53)REDACTED:490
ActiveLearning.deposit (cognitive 45)chemml/optimization/active.py:380
visualize.plot_shap_local (cognitive 44)chemml/explain/visualize.py:64
ElementalPropertyAttributeGenerator.generate_features (cognitive 43)chemml/chem/magpie_python/attributes/generators/composition/ElementalPropertyAttributeGenerator.py:64

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

What to do

  1. Bring the 20 bodies over 30 down to 30 or less in Cognitive Complexity — start with CompositionEntry.parse_composition (cognitive 56), GeneticAlgorithm.search (cognitive 53), ActiveLearning.deposit (cognitive 45). — 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 20 together lifts Cognitive Complexity from 3.4 to about 5.6/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 Classes9.0 / 10Strong✓ Tool-verified

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

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

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

7 god class(es) detected.

FileTooLong: REDACTED · ×5REDACTED
TooManyMethods: VoronoiFace · ×2chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:10

What to do

  1. Resolve the 5 FileTooLong finding(s) in God Classes — start with REDACTED, sklearn_db.py, chemml_db.py. — One of this dimension's main actionable groups (5 warning-level).
  2. Resolve the 2 TooManyMethods finding(s) in God Classes — start with VoronoiFace.py, Cell.py. — One of this dimension's main actionable groups (2 warning-level).

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

D4 · Code Duplication5.8 / 10Adequate✓ 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 5.8 / 10 · rule-coverage 100% · ceiling Verified

71 duplicated block group(s) detected. 10.4 % of the production lines (3,261 of 31,412) are in a reported copy. A further 27 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.

Duplicated block (12 lines × 2) · ×4chemml/wrapper/engine.py:85
Duplicated block (11 lines × 2) · ×4chemml/visualization/visualization.py:188
Duplicated block (10 lines × 2) · ×3REDACTED:230
Duplicated block (5 lines × 3) · ×3chemml/chem/RDKFP.py:185
Edited copy of a member (33 corresponding lines) · ×2chemml/models/graphconvnetwork.py:513

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

What to do

  1. Resolve the 4 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with engine.py (2), REDACTED (2). — One of this dimension's main actionable groups (4 warning-level).
  2. Resolve the 4 Duplicated block (11 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), visualization.py, run_density_ga.py. — One of this dimension's main actionable groups (4 warning-level).
  3. Resolve the 3 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with REDACTED (2), REDACTED. — 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 2 serious findings✓ Tool-verified

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

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

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

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

2 of 47 classes have LCOM4 above 3.

Low cohesion: NeuralGraphHidden (LCOM4 4) · ×2chemml/models/graphconvlayers.py:99

What to do

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

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

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

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

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

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

REDACTED scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License 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 107 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 23 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (84 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. 24 of them publish no licence on PyPI this pass can read; that is missing data, not a violation, and none of them is charged. This repository publishes itself under BSD-3C, which is its own choice and is not judged here.

Banned license: openbabel

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 Hotspots9.7 / 10Stronggated by 3 serious findings✓ 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 9.7 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: REDACTED (17×19=323); chemml/chem/CoulMat.py (5×17=85); REDACTED (3×25=75)

Hotspot: REDACTED · ×3REDACTED:795

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with REDACTED, CoulMat.py, REDACTED. — One of this dimension's main actionable groups (3 warning-level).

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

D16 · Bus Factor7.4 / 10Strong✓ Tool-verified

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

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

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

14 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is REDACTED. Counted over 55 of the 148 production source files in this repository: 59 are under the ~2,400-byte size floor this dimension measures over, and the remaining 34 have no attributable history left to measure.

Off-boarding risk: anonymized user #1

What to do

  1. Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt9.9 / 10Stronggated by 25 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.9 / 10 · rule-coverage 100% · ceiling Prevented

25 deducted task-comment markers across 31412 LoC (0.1/KLoC) → score 9.9. 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 · ×25REDACTED:13

What to do

  1. Resolve the 25 TodoComment finding(s) in Explicit Debt — start with molecule.py (5), REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (25 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

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

71 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)8.0 / 10Adequategated by 2 critical findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

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

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

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

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

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

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

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

44 finding(s): 0 critical, 38 high, 6 medium, 0 low. 6 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 22 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (14), REDACTED (7), REDACTED. — One of this dimension's main actionable groups (22 issue-level).
  2. Resolve the 5 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (5 issue-level).
  3. No action in Static Analysis (SAST) — all 6 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (6 issue-level, 0 of them charged here).

Detailed fixes: d29_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.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

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

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

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

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

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.

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 structure10.0 / 10Exemplary✓ 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 gates10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

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 as a CI step. What was searched, so you can tell an absence from a miss: the 2 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:6
  • `pyproject.toml` 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`. — pyproject.toml:23

What to do

  • Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

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.

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

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

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

X3 · Exception handling6.9 / 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. (×3) — REDACTED:109, REDACTED:153, REDACTED:414
  • `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×4) — chemml/utils/backend.py:29, REDACTED:467, chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiCell.py:628, …

What to do

  • Swallowed exception (caught, then discarded)
X4 · Structured logging3.5 / 10Weak✓ Tool-verified

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

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

  • `info` at line 205 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog. — REDACTED:205

What to do

  • Interpolated log message defeats structured logging

Reference — by lens

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

LensScoreRatingImpact
Code Health59.6Adequate — gated by D2, X4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture95.6ExemplaryStrongest area.
Maturity64.4Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness64.8Adequate — gated by P3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security60.1Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Unscored — 3 check(s) recorded observations but carry no score

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

  • D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 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
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.
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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 — ~5860 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
  • D12 Dependency Hygiene — Dependency currency not established — no declaration carries an exact pin to grade
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D21 Naming Consistency — D21 withholds its case and prefix conventions rows: 2 candidate(s) found and not reported.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. 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.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).
  • 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 — knowledge concentrated in recent work — freshness signal contradicted by repo activity
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D43 Malicious Dependencies — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).
  • D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — Python suite
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • 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
  • P2 Observability — This repository's Python source (1 module(s), 142 file(s) read) declares no entry point and bootstraps no server, and nothing here deploys a service — it is a library, run inside whatever hosts it, so production observability (structured logging, tracing/metrics, health checks) is N/A. If it grows a binary or a service, the dimension reactivates.
  • 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
  • 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 — 41 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D28 · Secrets (history) · REDACTED · ×2
  • REDACTED
  • REDACTED
D14 · License Compliance · Banned license · ×1
  • Banned license: openbabel — `openbabel` 3.2.1 is published on PyPI under `GPL-2.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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
Serious — 246 finding(s)
D17 · Explicit Debt · TodoComment · ×25
  • TodoComment REDACTED:13 — # todo: decorate some of the steps in the wrapeprs. e.g. sending out ouputs by finding all the connected edges in the graph — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:14 — # todo: use Input and Output classes to handle inputs and outputs — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:75 — # Todo: add an option to deepcopy(value) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:599 — # Todo: add all the metrics for regression — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:26 — # Todo: bring back receivers - no need another recursive function for bidR; (currentbids - bidS = bidR) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:27 — # Todo: profile the cpu/clock time — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:1745 — # # Todo: first fix the slurm script function at chemml.initialization — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:1746 — # # Todo: then embede the slurm commands in this class to run the slurm script — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:1747 — # # Todo: or make the slurm script in this function too — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:5 — # Todo: check_object_col is really inefficient (iteration on the values of each column) — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:146 — # Todo: try to replace bare except — 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 chemml/published/RI/lorentz_lorenz.py:121 — # todo try same scaler for all features — 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 chemml/optimization/active.py:186 — # Todo: support for sklearn linear models — 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 chemml/optimization/active.py:622 — # Todo: how can we support multioutput? — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment REDACTED:591 — # TODO: return self.losses to visualize learning process — 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 chemml/chem/foss_descriptors.py:255 — # TODO: Construct section for selected descriptor generation — 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 chemml/chem/local_features.py:165 — # TODO: Arguments for sparse vector encoding — 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 chemml/chem/local_features.py:369 — # TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment chemml/chem/molecule.py:806 — # TODO(v1.4): remove Python 3.8 RDKit embedding and forcefield fallback. — 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 chemml/chem/molecule.py:822 — # TODO(v1.4): remove Python 3.8 RDKit embedding fallback. — 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 chemml/chem/molecule.py:838 — # TODO(v1.4): remove Python 3.8 RDKit forcefield fallback. — 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 chemml/chem/molecule.py:852 — # TODO(v1.4): remove Python 3.8 RDKit forcefield fallback. — 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 chemml/chem/molecule.py:894 — # TODO(v1.4): remove Python 3.8 manual XYZ writer fallback. — 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 chemml/chem/magpie_python/vassal/geometry/Line.py:209 — # Todo: check w/ Ram if this is what he meant to do when catch a warning: n = np.zeros(3) — 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 chemml/chem/magpie_python/data/materials/CompositionEntry.py:6 — # Todo: add all the rich comparisons, using total_ordering comes with the cost of slower execution — 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.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×7
  • Swallowed exception (caught, then discarded) REDACTED:109 — `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) chemml/utils/backend.py:29 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) REDACTED:153 — `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:414 — `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:467 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiCell.py:628 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
  • Swallowed exception (caught, then discarded) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:432 — `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
D29 · Static Analysis (SAST) · REDACTED · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · FileTooLong · ×5
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1594 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 1094 over it, 3.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: database/sklearn_db.py chemml/wrapper/database/sklearn_db.py — FileTooLong — 1206 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 706 over it, 2.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: database/chemml_db.py chemml/wrapper/database/chemml_db.py — FileTooLong — 1117 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 617 over it, 2.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: optimization/active.py chemml/optimization/active.py — FileTooLong — 768 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 268 over it, 1.54× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 641 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 141 over it, 1.28× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) chemml/wrapper/engine.py:85 — chemml/wrapper/engine.py:85-96 | REDACTED:1729-1740 — 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 (12 lines × 2) chemml/wrapper/engine.py:146 — chemml/wrapper/engine.py:146-157 | chemml/wrapper/engine.py:172-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:1207 — REDACTED:1207-1218 | REDACTED:1306-1317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) REDACTED:1354 — REDACTED:1354-1365 | REDACTED:1413-1424 — 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:1354` 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 (11 lines × 2) · ×4
  • Duplicated block (11 lines × 2) chemml/visualization/visualization.py:188 — chemml/visualization/visualization.py:188-198 | chemml/visualization/visualization.py:254-264 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) REDACTED:1382 — REDACTED:1382-1392 | REDACTED:1437-1447 — 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:1382` 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 (11 lines × 2) REDACTED:1957 — REDACTED:1957-1967 | REDACTED:1984-1994 — 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) chemml/published/pradhan_2026_inverse_design/scripts/run_density_ga.py:57 — chemml/published/pradhan_2026_inverse_design/scripts/run_density_ga.py:57-68 | chemml/published/pradhan_2026_inverse_design/scripts/run_polyimide_ga.py:47-57 — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: REDACTED REDACTED:795 — REDACTED changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 19 in ModelScreener.screen_models at line 795. 4 of those changes were fix/bug commits, and the other 13 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 16:12:26 -04:00' --until='2026-10-27 16:12:26 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: chemml/chem/CoulMat.py chemml/chem/CoulMat.py:204 — chemml/chem/CoulMat.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in CoulombMatrix._represent at line 204. 3 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 16:12:26 -04:00' --until='2026-10-27 16:12:26 -04:00' --full-history --no-merges -- chemml/chem/CoulMat.py`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:490 — REDACTED changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in GeneticAlgorithm.search at line 490. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-29..2026-10-27, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-29 16:12:26 -04:00' --until='2026-10-27 16:12:26 -04:00' --full-history --no-merges -- REDACTED`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×3
  • Duplicated block (10 lines × 2) REDACTED:230 — REDACTED:230-239 | REDACTED:275-284 — 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:230` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) REDACTED:539 — REDACTED:539-548 | REDACTED:632-641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) REDACTED:1268 — REDACTED:1268-1277 | REDACTED:1283-1292 — 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 (5 lines × 3) · ×3
  • Duplicated block (5 lines × 3) chemml/chem/RDKFP.py:185 — chemml/chem/RDKFP.py:185-189 | chemml/chem/RDKFP.py:203-207 | chemml/chem/RDKFP.py:222-226 — 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 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, `chemml/chem/RDKFP.py:183` calls `GetMorganGenerator` and `chemml/chem/RDKFP.py:202` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (5 lines × 3) chemml/wrapper/engine.py:327 — chemml/wrapper/engine.py:327-331 | chemml/wrapper/engine.py:338-342 | chemml/wrapper/engine.py:349-353 — 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 (5 lines × 3) chemml/optimization/active.py:1212 — chemml/optimization/active.py:1212-1216 | chemml/optimization/active.py:1235-1239 | chemml/optimization/active.py:1256-1260 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D3 · God Classes · TooManyMethods · ×2
  • TooManyMethods: VoronoiFace chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:10 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Cell chemml/chem/magpie_python/vassal/data/Cell.py:6 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Edited copy of a member (33 corresponding lines) · ×2
  • Edited copy of a member (33 corresponding lines) chemml/models/graphconvnetwork.py:513 — chemml/models/graphconvnetwork.py:513-592 | chemml/models/graphconvnetwork.py:595-664 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (33 corresponding lines) chemml/wrapper/engine.py:85 — chemml/wrapper/engine.py:85-117 | REDACTED:1729-1764 — These two members are one piece of code written twice and then edited apart: 33 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×2
  • Edited copy of a member (28 corresponding lines) chemml/wrapper/pandas_pd/pandas_wrapper.py:15 — chemml/wrapper/pandas_pd/pandas_wrapper.py:15-42 | chemml/wrapper/pandas_pd/pandas_wrapper.py:189-222 — 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.
  • Edited copy of a member (28 corresponding lines) chemml/chem/magpie_python/data/materials/CompositionEntry.py:419 — chemml/chem/magpie_python/data/materials/CompositionEntry.py:419-446 | chemml/chem/magpie_python/data/materials/CompositionEntry.py:493-521 — 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) · ×2
  • Edited copy of a member (25 corresponding lines) chemml/models/graphconvlayers.py:156 — chemml/models/graphconvlayers.py:156-183 | chemml/models/graphconvlayers.py:367-391 — 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.
  • Edited copy of a member (25 corresponding lines) chemml/wrapper/engine.py:49 — chemml/wrapper/engine.py:49-73 | REDACTED:1676-1701 — 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 · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:684 — chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:684-699 | chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:800-815 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) chemml/wrapper/engine.py:201 — chemml/wrapper/engine.py:201-216 | REDACTED:1817-1832 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `chemml/wrapper/engine.py:201` 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 lines × 2) · ×2
  • Duplicated block (9 lines × 2) REDACTED:1088 — REDACTED:1088-1096 | REDACTED:1121-1129 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) REDACTED:501 — REDACTED:501-509 | REDACTED:619-627 — 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 (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) REDACTED:1174 — REDACTED:1174-1181 | REDACTED:1183-1190 — 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) REDACTED:1198 — REDACTED:1198-1205 | REDACTED:1235-1242 — 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 (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) chemml/chem/RDKFP.py:143 — chemml/chem/RDKFP.py:143-149 | chemml/chem/RDKFP.py:196-202 | chemml/chem/RDKFP.py:214-220 — 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 matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chemml/chem/RDKFP.py:221` calls `GetTopologicalTorsionGenerator` and `chemml/chem/RDKFP.py:203` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (7 lines × 3) REDACTED:910 — REDACTED:910-916 | REDACTED:1092-1098 | REDACTED:1125-1131 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:910` 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 (7 lines × 2) · ×2
  • Duplicated block (7 lines × 2) chemml/wrapper/engine.py:76 — chemml/wrapper/engine.py:76-82 | REDACTED:1720-1726 — 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 (7 lines × 2) REDACTED:690 — REDACTED:690-696 | REDACTED:742-748 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×2
  • Duplicated block (6 lines × 2) chemml/chem/CoulMat.py:223 — chemml/chem/CoulMat.py:223-228 | chemml/chem/CoulMat.py:248-253 — 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 (6 lines × 2) REDACTED:1389 — REDACTED:1389-1394 | REDACTED:1443-1448 — 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.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: NeuralGraphHidden (LCOM4 4) chemml/models/graphconvlayers.py:99 — NeuralGraphHidden's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: NeuralGraphOutput (LCOM4 4) chemml/models/graphconvlayers.py:298 — NeuralGraphOutput'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.
D1 · Cyclomatic Complexity · CompositionEntry.parse_composition (cyclomatic 36) · ×1
  • CompositionEntry.parse_composition (cyclomatic 36) chemml/chem/magpie_python/data/materials/CompositionEntry.py:98 — CompositionEntry.parse_composition has cyclomatic complexity 36 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ActiveLearning.search (cyclomatic 32) · ×1
  • ActiveLearning.search (cyclomatic 32) chemml/optimization/active.py:526 — ActiveLearning.search has cyclomatic complexity 32 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · feature_cleaning.RemoveInvFeatures (cyclomatic 30) · ×1
  • feature_cleaning.RemoveInvFeatures (cyclomatic 30) chemml/preprocessing/feature_cleaning.py:187 — feature_cleaning.RemoveInvFeatures has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GA.fit (cyclomatic 30) · ×1
  • GA.fit (cyclomatic 30) REDACTED:1889 — GA.fit has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · visualize.plot_shap_local (cyclomatic 29) · ×1
  • visualize.plot_shap_local (cyclomatic 29) chemml/explain/visualize.py:64 — visualize.plot_shap_local has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeneticAlgorithm.search (cyclomatic 25) · ×1
  • GeneticAlgorithm.search (cyclomatic 25) REDACTED:490 — GeneticAlgorithm.search has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Evaluator._reg_evaluation_params (cyclomatic 23) · ×1
  • Evaluator._reg_evaluation_params (cyclomatic 23) chemml/wrapper/sklearn_skl/syntax.py:161 — Evaluator._reg_evaluation_params has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeneticAlgorithm.__init__ (cyclomatic 22) · ×1
  • GeneticAlgorithm.__init__ (cyclomatic 22) REDACTED:87 — GeneticAlgorithm.__init__ has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · VoronoiFace.compute_intersection (cyclomatic 21) · ×1
  • VoronoiFace.compute_intersection (cyclomatic 21) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:574 — VoronoiFace.compute_intersection has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelScreener.screen_models (cyclomatic 19) · ×1
  • ModelScreener.screen_models (cyclomatic 19) REDACTED:795 — ModelScreener.screen_models has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ElementalPropertyAttributeGenerator.generate_features (cyclomatic 19) · ×1
  • ElementalPropertyAttributeGenerator.generate_features (cyclomatic 19) chemml/chem/magpie_python/attributes/generators/composition/ElementalPropertyAttributeGenerator.py:64 — ElementalPropertyAttributeGenerator.generate_features has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Molecule._to_xyz_rdkit (cyclomatic 18) · ×1
  • Molecule._to_xyz_rdkit (cyclomatic 18) chemml/chem/molecule.py:802 — Molecule._to_xyz_rdkit has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GeneticAlgorithm._validate_feature_bias_inputs (cyclomatic 18) · ×1
  • GeneticAlgorithm._validate_feature_bias_inputs (cyclomatic 18) REDACTED:222 — GeneticAlgorithm._validate_feature_bias_inputs has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · CoulombMatrix._represent (cyclomatic 17) · ×1
  • CoulombMatrix._represent (cyclomatic 17) chemml/chem/CoulMat.py:204 — CoulombMatrix._represent has cyclomatic complexity 17 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · local_features.tensorise_molecules_singlecore (cyclomatic 17) · ×1
  • local_features.tensorise_molecules_singlecore (cyclomatic 17) chemml/chem/local_features.py:125 — local_features.tensorise_molecules_singlecore has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ChargeDependentAttributeGenerator.generate_features (cyclomatic 17) · ×1
  • ChargeDependentAttributeGenerator.generate_features (cyclomatic 17) chemml/chem/magpie_python/attributes/generators/composition/ChargeDependentAttributeGenerator.py:33 — ChargeDependentAttributeGenerator.generate_features has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ActiveLearning._fit (cyclomatic 17) · ×1
  • ActiveLearning._fit (cyclomatic 17) chemml/optimization/active.py:181 — ActiveLearning._fit has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ChemMLNotebook.custom_function_IO_w (cyclomatic 17) · ×1
  • ChemMLNotebook.custom_function_IO_w (cyclomatic 17) REDACTED:1170 — ChemMLNotebook.custom_function_IO_w has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ModelScreener.__init__ (cyclomatic 16) · ×1
  • ModelScreener.__init__ (cyclomatic 16) REDACTED:38 — ModelScreener.__init__ has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ElementPairPropertyAttributeGenerator.generate_features (cyclomatic 16) · ×1
  • ElementPairPropertyAttributeGenerator.generate_features (cyclomatic 16) chemml/chem/magpie_python/attributes/generators/composition/ElementPairPropertyAttributeGenerator.py:97 — ElementPairPropertyAttributeGenerator.generate_features has cyclomatic complexity 16 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D1 · Cyclomatic Complexity · CrystalStructureEntry.__cmp__ (cyclomatic 16) · ×1
  • CrystalStructureEntry.__cmp__ (cyclomatic 16) chemml/chem/magpie_python/data/materials/CrystalStructureEntry.py:157 — CrystalStructureEntry.__cmp__ has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Molecule._load_pybel (cyclomatic 16) · ×1
  • Molecule._load_pybel (cyclomatic 16) chemml/chem/molecule.py:514 — Molecule._load_pybel has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · interfaces.evaluate_inputs (cyclomatic 16) · ×1
  • interfaces.evaluate_inputs (cyclomatic 16) REDACTED:113 — interfaces.evaluate_inputs has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · CompositionEntry.parse_composition (cognitive 56) · ×1
  • CompositionEntry.parse_composition (cognitive 56) chemml/chem/magpie_python/data/materials/CompositionEntry.py:98 — CompositionEntry.parse_composition has cognitive complexity 56 (threshold 15). Drivers by points: if/else 12 (28 pts), ternaries 7 (12 pts), boolean chains 10, loops 3 (6 pts) (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticAlgorithm.search (cognitive 53) · ×1
  • GeneticAlgorithm.search (cognitive 53) REDACTED:490 — GeneticAlgorithm.search has cognitive complexity 53 (threshold 15). Drivers by points: if/else 18 (42 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 28). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActiveLearning.deposit (cognitive 45) · ×1
  • ActiveLearning.deposit (cognitive 45) chemml/optimization/active.py:380 — ActiveLearning.deposit has cognitive complexity 45 (threshold 15). Drivers by points: if/else 18 (43 pts), loops 1 (2 pts) (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 · visualize.plot_shap_local (cognitive 44) · ×1
  • visualize.plot_shap_local (cognitive 44) chemml/explain/visualize.py:64 — visualize.plot_shap_local has cognitive complexity 44 (threshold 15). Drivers by points: if/else 20 (32 pts), boolean chains 5, loops 5, ternaries 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ElementalPropertyAttributeGenerator.generate_features (cognitive 43) · ×1
  • ElementalPropertyAttributeGenerator.generate_features (cognitive 43) chemml/chem/magpie_python/attributes/generators/composition/ElementalPropertyAttributeGenerator.py:64 — ElementalPropertyAttributeGenerator.generate_features has cognitive complexity 43 (threshold 15). Drivers by points: if/else 10 (26 pts), loops 7 (16 pts), boolean chains 1 (nesting depth added 25). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · feature_cleaning.RemoveInvFeatures (cognitive 40) · ×1
  • feature_cleaning.RemoveInvFeatures (cognitive 40) chemml/preprocessing/feature_cleaning.py:187 — feature_cleaning.RemoveInvFeatures has cognitive complexity 40 (threshold 15). Drivers by points: if/else 25 (36 pts), boolean chains 3, loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Molecule._to_xyz_rdkit (cognitive 38) · ×1
  • Molecule._to_xyz_rdkit (cognitive 38) chemml/chem/molecule.py:802 — Molecule._to_xyz_rdkit has cognitive complexity 38 (threshold 15). Drivers by points: if/else 14 (28 pts), error handling 5 (10 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActiveLearning.search (cognitive 38) · ×1
  • ActiveLearning.search (cognitive 38) chemml/optimization/active.py:526 — ActiveLearning.search has cognitive complexity 38 (threshold 15). Drivers by points: if/else 24 (31 pts), loops 4, boolean chains 3 (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CrystalStructureEntry.__cmp__ (cognitive 37) · ×1
  • CrystalStructureEntry.__cmp__ (cognitive 37) chemml/chem/magpie_python/data/materials/CrystalStructureEntry.py:157 — CrystalStructureEntry.__cmp__ has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 4 (10 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticAlgorithm.__init__ (cognitive 37) · ×1
  • GeneticAlgorithm.__init__ (cognitive 37) REDACTED:87 — GeneticAlgorithm.__init__ has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (27 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticAlgorithm.blend (cognitive 37) · ×1
  • GeneticAlgorithm.blend (cognitive 37) REDACTED:322 — GeneticAlgorithm.blend has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (27 pts), loops 3 (8 pts), boolean chains 2 (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChemMLNotebook.configurer (cognitive 36) · ×1
  • ChemMLNotebook.configurer (cognitive 36) REDACTED:93 — ChemMLNotebook.configurer has cognitive complexity 36 (threshold 15). Drivers by points: if/else 8 (25 pts), loops 5 (11 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChargeDependentAttributeGenerator.generate_features (cognitive 35) · ×1
  • ChargeDependentAttributeGenerator.generate_features (cognitive 35) chemml/chem/magpie_python/attributes/generators/composition/ChargeDependentAttributeGenerator.py:33 — ChargeDependentAttributeGenerator.generate_features has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 6 (13 pts), boolean chains 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Molecule._load_pybel (cognitive 34) · ×1
  • Molecule._load_pybel (cognitive 34) chemml/chem/molecule.py:514 — Molecule._load_pybel has cognitive complexity 34 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Wrapper.call (cognitive 33) · ×1
  • Wrapper.call (cognitive 33) chemml/wrapper/engine.py:296 — Wrapper.call has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (32 pts), loops 1 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · foss_descriptors.normalize_input (cognitive 32) · ×1
  • foss_descriptors.normalize_input (cognitive 32) chemml/chem/foss_descriptors.py:43 — foss_descriptors.normalize_input has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (24 pts), error handling 1 (4 pts), loops 2 (4 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VoronoiFace.compute_intersection (cognitive 32) · ×1
  • VoronoiFace.compute_intersection (cognitive 32) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:574 — VoronoiFace.compute_intersection has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (17 pts), error handling 5 (8 pts), loops 5 (6 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticAlgorithm.custom_mutate (cognitive 32) · ×1
  • GeneticAlgorithm.custom_mutate (cognitive 32) REDACTED:398 — GeneticAlgorithm.custom_mutate has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (25 pts), loops 2 (5 pts), error handling 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Evaluator._reg_evaluation_params (cognitive 32) · ×1
  • Evaluator._reg_evaluation_params (cognitive 32) chemml/wrapper/sklearn_skl/syntax.py:161 — Evaluator._reg_evaluation_params has cognitive complexity 32 (threshold 15). Drivers by points: if/else 16 (26 pts), boolean chains 6 (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 · BagofBonds._represent (cognitive 31) · ×1
  • BagofBonds._represent (cognitive 31) chemml/chem/CoulMat.py:401 — BagofBonds._represent has cognitive complexity 31 (threshold 15). Drivers by points: if/else 9 (23 pts), loops 4 (8 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelScreener.__init__ (cognitive 30) · ×1
  • ModelScreener.__init__ (cognitive 30) REDACTED:38 — ModelScreener.__init__ has cognitive complexity 30 (threshold 15). Drivers by points: if/else 25 (30 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ModelScreener.screen_models (cognitive 30) · ×1
  • ModelScreener.screen_models (cognitive 30) REDACTED:795 — ModelScreener.screen_models has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (22 pts), error handling 1 (4 pts), loops 2 (4 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · PhaseDiagramCompositionEntryGenerator.generate_crystal_compositions (cognitive 29) · ×1
  • PhaseDiagramCompositionEntryGenerator.generate_crystal_compositions (cognitive 29) chemml/chem/magpie_python/data/utilities/generators/PhaseDiagramCompositionEntryGenerator.py:187 — PhaseDiagramCompositionEntryGenerator.generate_crystal_compositions has cognitive complexity 29 (threshold 15). Drivers by points: if/else 4 (15 pts), loops 5 (14 pts) (nesting depth added 20). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Explain.plot (cognitive 28) · ×1
  • Explain.plot (cognitive 28) chemml/explain/explain.py:252 — Explain.plot has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (22 pts), loops 2 (6 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · interfaces.evaluate_inputs (cognitive 28) · ×1
  • interfaces.evaluate_inputs (cognitive 28) REDACTED:113 — interfaces.evaluate_inputs has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChemMLNotebook.custom_function_IO_w (cognitive 28) · ×1
  • ChemMLNotebook.custom_function_IO_w (cognitive 28) REDACTED:1170 — ChemMLNotebook.custom_function_IO_w has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 8 (13 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 · ElementPairPropertyAttributeGenerator.generate_features (cognitive 27) · ×1
  • ElementPairPropertyAttributeGenerator.generate_features (cognitive 27) chemml/chem/magpie_python/attributes/generators/composition/ElementPairPropertyAttributeGenerator.py:97 — ElementPairPropertyAttributeGenerator.generate_features has cognitive complexity 27 (threshold 15). Drivers by points: loops 9 (21 pts), if/else 4 (5 pts), boolean chains 1 (nesting depth added 13). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · local_features.tensorise_molecules_singlecore (cognitive 25) · ×1
  • local_features.tensorise_molecules_singlecore (cognitive 25) chemml/chem/local_features.py:125 — local_features.tensorise_molecules_singlecore has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 4 (7 pts), boolean chains 6, error handling 1 (3 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VoronoiCellBasedAnalysis.get_neighbor_ordering_parameters (cognitive 25) · ×1
  • VoronoiCellBasedAnalysis.get_neighbor_ordering_parameters (cognitive 25) chemml/chem/magpie_python/vassal/analysis/VoronoiCellBasedAnalysis.py:260 — VoronoiCellBasedAnalysis.get_neighbor_ordering_parameters has cognitive complexity 25 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (11 pts) (nesting depth added 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · BASE.Receive (cognitive 25) · ×1
  • BASE.Receive (cognitive 25) REDACTED:47 — BASE.Receive has cognitive complexity 25 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2, boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · XYZreader.read (cognitive 24) · ×1
  • XYZreader.read (cognitive 24) chemml/initialization/initialization.py:387 — XYZreader.read has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 3 (8 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser._parameters (cognitive 24) · ×1
  • Parser._parameters (cognitive 24) chemml/wrapper/engine.py:84 — Parser._parameters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChemMLNotebook._parameters (cognitive 24) · ×1
  • ChemMLNotebook._parameters (cognitive 24) REDACTED:1728 — ChemMLNotebook._parameters has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 3 (5 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticAlgorithm._validate_feature_bias_inputs (cognitive 23) · ×1
  • GeneticAlgorithm._validate_feature_bias_inputs (cognitive 23) REDACTED:222 — GeneticAlgorithm._validate_feature_bias_inputs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4 (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 · VectorCombinationComputer.get_all_vectors (cognitive 22) · ×1
  • VectorCombinationComputer.get_all_vectors (cognitive 22) chemml/chem/magpie_python/vassal/util/VectorCombinationComputer.py:81 — VectorCombinationComputer.get_all_vectors has cognitive complexity 22 (threshold 15). Drivers by points: if/else 3 (10 pts), loops 6 (10 pts), boolean chains 2 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · utilities.classification_metrics (cognitive 22) · ×1
  • utilities.classification_metrics (cognitive 22) chemml/utils/utilities.py:346 — utilities.classification_metrics has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 4 (6 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cell.merge_like_types (cognitive 21) · ×1
  • Cell.merge_like_types (cognitive 21) chemml/chem/magpie_python/vassal/data/Cell.py:541 — Cell.merge_like_types has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (16 pts), loops 3 (5 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ChemMLNotebook._options (cognitive 21) · ×1
  • ChemMLNotebook._options (cognitive 21) REDACTED:1766 — ChemMLNotebook._options has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (18 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ModelScreener._represent_smiles (cognitive 20) · ×1
  • ModelScreener._represent_smiles (cognitive 20) REDACTED:431 — ModelScreener._represent_smiles has cognitive complexity 20 (threshold 15). Drivers by points: if/else 5 (8 pts), error handling 3 (6 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VoronoiCell.get_neighbor_shells (cognitive 20) · ×1
  • VoronoiCell.get_neighbor_shells (cognitive 20) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiCell.py:157 — VoronoiCell.get_neighbor_shells has cognitive complexity 20 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (10 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VoronoiCell.get_neighbors_by_walks (cognitive 20) · ×1
  • VoronoiCell.get_neighbors_by_walks (cognitive 20) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiCell.py:276 — VoronoiCell.get_neighbors_by_walks has cognitive complexity 20 (threshold 15). Drivers by points: loops 6 (13 pts), if/else 3 (7 pts) (nesting depth added 11). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ActiveLearning.random_search (cognitive 20) · ×1
  • ActiveLearning.random_search (cognitive 20) chemml/optimization/active.py:1023 — ActiveLearning.random_search has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 4 (8 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GA.fit (cognitive 20) · ×1
  • GA.fit (cognitive 20) REDACTED:1889 — GA.fit has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (11 pts), error handling 6, loops 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CoulombMatrix._represent (cognitive 19) · ×1
  • CoulombMatrix._represent (cognitive 19) chemml/chem/CoulMat.py:204 — CoulombMatrix._represent has cognitive complexity 19 (threshold 15). Drivers by points: loops 6 (13 pts), boolean chains 5, if/else 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · APEAttributeGenerator.find_efficiently_packed_clusters (cognitive 19) · ×1
  • APEAttributeGenerator.find_efficiently_packed_clusters (cognitive 19) chemml/chem/magpie_python/attributes/generators/composition/APEAttributeGenerator.py:376 — APEAttributeGenerator.find_efficiently_packed_clusters has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 5 (9 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 · CompositionEntry.__cmp__ (cognitive 19) · ×1
  • CompositionEntry.__cmp__ (cognitive 19) chemml/chem/magpie_python/data/materials/CompositionEntry.py:418 — CompositionEntry.__cmp__ has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 3 (11 pts), if/else 3 (6 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · CompositionEntry.__lt__ (cognitive 19) · ×1
  • CompositionEntry.__lt__ (cognitive 19) chemml/chem/magpie_python/data/materials/CompositionEntry.py:492 — CompositionEntry.__lt__ has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 1 (2 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MLP.get_model (cognitive 19) · ×1
  • MLP.get_model (cognitive 19) REDACTED:348 — MLP.get_model has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 1 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ActiveLearning._fit (cognitive 19) · ×1
  • ActiveLearning._fit (cognitive 19) chemml/optimization/active.py:181 — ActiveLearning._fit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · RDKitFingerprint.fit (cognitive 19) · ×1
  • RDKitFingerprint.fit (cognitive 19) REDACTED:329 — RDKitFingerprint.fit has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (15 pts), loops 2 (3 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Parser._print_out (cognitive 19) · ×1
  • Parser._print_out (cognitive 19) chemml/wrapper/engine.py:131 — Parser._print_out has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 6 (9 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ModelScreener.export_best_model (cognitive 18) · ×1
  • ModelScreener.export_best_model (cognitive 18) REDACTED:592 — ModelScreener.export_best_model has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11 (14 pts), ternaries 2, boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GCLPAttributeGenerator.generate_features (cognitive 18) · ×1
  • GCLPAttributeGenerator.generate_features (cognitive 18) chemml/chem/magpie_python/attributes/generators/composition/GCLPAttributeGenerator.py:69 — GCLPAttributeGenerator.generate_features has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 6 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · CompositionEntry.parse_element_amounts (cognitive 18) · ×1
  • CompositionEntry.parse_element_amounts (cognitive 18) chemml/chem/magpie_python/data/materials/CompositionEntry.py:289 — CompositionEntry.parse_element_amounts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · VoronoiEdge.find_next_edge (cognitive 18) · ×1
  • VoronoiEdge.find_next_edge (cognitive 18) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiEdge.py:322 — VoronoiEdge.find_next_edge has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 3 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeuralGraphFingerprint._build_tensorflow (cognitive 18) · ×1
  • NeuralGraphFingerprint._build_tensorflow (cognitive 18) chemml/models/graphconvnetwork.py:301 — NeuralGraphFingerprint._build_tensorflow has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NeuralGraphFingerprint._fit_pytorch (cognitive 18) · ×1
  • NeuralGraphFingerprint._fit_pytorch (cognitive 18) chemml/models/graphconvnetwork.py:454 — NeuralGraphFingerprint._fit_pytorch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MLP._initialize_tensorflow (cognitive 18) · ×1
  • MLP._initialize_tensorflow (cognitive 18) REDACTED:218 — MLP._initialize_tensorflow has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 7). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · ActiveLearning._dsa_y_dist (cognitive 18) · ×1
  • ActiveLearning._dsa_y_dist (cognitive 18) chemml/optimization/active.py:790 — ActiveLearning._dsa_y_dist has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 3 (6 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GeneticAlgorithm._fit_eval (cognitive 18) · ×1
  • GeneticAlgorithm._fit_eval (cognitive 18) REDACTED:451 — GeneticAlgorithm._fit_eval has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), error handling 2 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Parser.transform (cognitive 18) · ×1
  • Parser.transform (cognitive 18) chemml/wrapper/engine.py:185 — Parser.transform has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · APEAttributeGenerator.generate_features (cognitive 17) · ×1
  • APEAttributeGenerator.generate_features (cognitive 17) chemml/chem/magpie_python/attributes/generators/composition/APEAttributeGenerator.py:538 — APEAttributeGenerator.generate_features has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 4 (8 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · YangOmegaAttributeGenerator.generate_features (cognitive 17) · ×1
  • YangOmegaAttributeGenerator.generate_features (cognitive 17) chemml/chem/magpie_python/attributes/generators/composition/YangOmegaAttributeGenerator.py:54 — YangOmegaAttributeGenerator.generate_features has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (12 pts), ternaries 1 (3 pts), boolean chains 1, if/else 1 (nesting depth added 8). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · PairDistanceAnalysis.compute_PRDF (cognitive 17) · ×1
  • PairDistanceAnalysis.compute_PRDF (cognitive 17) chemml/chem/magpie_python/vassal/analysis/PairDistanceAnalysis.py:194 — PairDistanceAnalysis.compute_PRDF has cognitive complexity 17 (threshold 15). Drivers by points: loops 6 (12 pts), if/else 2 (5 pts) (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · Cell.__eq__ (cognitive 17) · ×1
  • Cell.__eq__ (cognitive 17) chemml/chem/magpie_python/vassal/data/Cell.py:95 — Cell.__eq__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (5 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 · VASP5IO.parse_file (cognitive 17) · ×1
  • VASP5IO.parse_file (cognitive 17) chemml/chem/magpie_python/vassal/io/VASP5IO.py:13 — VASP5IO.parse_file has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (6 pts), loops 4 (6 pts), error handling 4, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · _NeuralGraphNetworkPT.__init__ (cognitive 17) · ×1
  • _NeuralGraphNetworkPT.__init__ (cognitive 17) chemml/models/graphconvlayers_torch.py:397 — _NeuralGraphNetworkPT.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MLP.__init__ (cognitive 17) · ×1
  • MLP.__init__ (cognitive 17) REDACTED:135 — MLP.__init__ has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · CoulombMatrix.__cal_coul_mat (cognitive 16) · ×1
  • CoulombMatrix.__cal_coul_mat (cognitive 16) chemml/chem/CoulMat.py:77 — CoulombMatrix.__cal_coul_mat has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), loops 4 (7 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Dragon._script_wizard (cognitive 16) · ×1
  • Dragon._script_wizard (cognitive 16) chemml/chem/Dragon.py:159 — Dragon._script_wizard has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (11 pts), loops 3 (4 pts), boolean chains 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · OxidationStateGuesser.get_possible_states (cognitive 16) · ×1
  • OxidationStateGuesser.get_possible_states (cognitive 16) chemml/chem/magpie_python/utility/tools/OxidationStateGuesser.py:50 — OxidationStateGuesser.get_possible_states has cognitive complexity 16 (threshold 15). Drivers by points: loops 5 (8 pts), if/else 6 (7 pts), boolean chains 1 (nesting depth added 4). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · VoronoiCell.compute_intersection (cognitive 16) · ×1
  • VoronoiCell.compute_intersection (cognitive 16) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiCell.py:823 — VoronoiCell.compute_intersection has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), loops 5 (7 pts), error handling 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Cell.set_basis (cognitive 16) · ×1
  • Cell.set_basis (cognitive 16) chemml/chem/magpie_python/vassal/data/Cell.py:133 — Cell.set_basis has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member family (38 members, 8 shared lines) · ×1
  • Near-duplicate member family (38 members, 8 shared lines) REDACTED:14 — REDACTED:14-35 | REDACTED:39-58 | REDACTED:62-85 | REDACTED:89-108 | REDACTED:112-131 | REDACTED:135-151 | REDACTED:186-217 | REDACTED:222-245 | REDACTED:250-273 | REDACTED:458-481 | REDACTED:485-509 | REDACTED:537-569 | REDACTED:573-596 | REDACTED:600-627 | REDACTED:631-654 | REDACTED:658-685 | REDACTED:689-721 | REDACTED:725-751 | REDACTED:755-778 | REDACTED:782-805 | REDACTED:809-835 | REDACTED:839-862 | REDACTED:866-889 | REDACTED:893-929 | REDACTED:933-965 | REDACTED:969-992 | REDACTED:996-1024 | REDACTED:1028-1051 | REDACTED:1055-1078 | REDACTED:1082-1111 | REDACTED:1115-1144 | REDACTED:1148-1171 | REDACTED:1175-1207 | REDACTED:1211-1234 | REDACTED:1241-1260 | REDACTED:1267-1286 | REDACTED:1294-1339 | REDACTED:1531-1566 — These 38 members are variants of one another: a block of 8 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 38 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 38 times.
D4 · Code Duplication · Near-duplicate member family (23 members, 15 shared lines) · ×1
  • Near-duplicate member family (23 members, 15 shared lines) REDACTED:537 — REDACTED:537-569 | REDACTED:573-596 | REDACTED:600-627 | REDACTED:631-654 | REDACTED:658-685 | REDACTED:689-721 | REDACTED:725-751 | REDACTED:755-778 | REDACTED:782-805 | REDACTED:809-835 | REDACTED:839-862 | REDACTED:866-889 | REDACTED:893-929 | REDACTED:933-965 | REDACTED:969-992 | REDACTED:996-1024 | REDACTED:1028-1051 | REDACTED:1055-1078 | REDACTED:1082-1111 | REDACTED:1115-1144 | REDACTED:1148-1171 | REDACTED:1175-1207 | REDACTED:1211-1234 — These 23 members are variants of one another: a block of 15 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 23 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 23 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 14 shared lines) · ×1
  • Near-duplicate member family (5 members, 14 shared lines) REDACTED:376 — REDACTED:376-422 | REDACTED:427-468 | REDACTED:473-537 | REDACTED:545-583 | REDACTED:589-632 — These 5 members are variants of one another: a block of 14 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member family (5 members, 12 shared lines) · ×1
  • Near-duplicate member family (5 members, 12 shared lines) REDACTED:1294 — REDACTED:1294-1339 | REDACTED:1344-1397 | REDACTED:1402-1452 | REDACTED:1577-1626 | REDACTED:1631-1680 — These 5 members are variants of one another: a block of 12 lines reported below appears in every one of them, and the pairwise near-duplicate rows they would otherwise produce are collapsed into this row. Read them as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Near-duplicate member pair (28 shared lines) · ×1
  • Near-duplicate member pair (28 shared lines) chemml/optimization/active.py:1203 — chemml/optimization/active.py:1203-1274 | chemml/optimization/active.py:1277-1347 — These two members are variants of one another: 28 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Members sharing a duplicated core (5 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (5 members, 50+ identical tokens) REDACTED:99 — REDACTED:99-136 | REDACTED:309-371 | REDACTED:376-422 | REDACTED:427-468 | REDACTED:473-537 — These 5 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 5 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 5 times.
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) REDACTED:138 — REDACTED:138-919 | REDACTED:922-1063 | REDACTED:1171-1463 | REDACTED:1600-1662 — 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 (62 corresponding lines) · ×1
  • Edited copy of a member (62 corresponding lines) REDACTED:167 — REDACTED:167-228 | chemml/wrapper/sklearn_skl/syntax.py:248-318 — 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 (67 corresponding lines) · ×1
  • Edited copy of a member (67 corresponding lines) chemml/chem/CoulMat.py:120 — chemml/chem/CoulMat.py:120-202 | chemml/chem/CoulMat.py:333-399 — These two members are one piece of code written twice and then edited apart: 67 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) REDACTED:1158 — REDACTED:1158-1168 | REDACTED:1704-1717 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 16+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 16+ corresponding lines) chemml/chem/RDKFP.py:139 — chemml/chem/RDKFP.py:139-155 | chemml/chem/RDKFP.py:171-189 | chemml/chem/RDKFP.py:192-207 | chemml/chem/RDKFP.py:210-226 — 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 (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) REDACTED:277 — REDACTED:277-293 | REDACTED:1840-1886 — 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 (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) chemml/models/graphconvlayers.py:219 — chemml/models/graphconvlayers.py:219-268 | chemml/models/graphconvlayers.py:418-453 — These two members are one piece of code written twice and then edited apart: 36 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, 61+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 61+ corresponding lines) chemml/chem/magpie_python/attributes/generators/crystal/CoordinationNumberAttributeGenerator.py:11 — chemml/chem/magpie_python/attributes/generators/crystal/CoordinationNumberAttributeGenerator.py:11-71 | chemml/chem/magpie_python/attributes/generators/crystal/EffectiveCoordinationNumberAttributeGenerator.py:65-130 | chemml/chem/magpie_python/attributes/generators/crystal/LatticeSimilarityAttributeGenerator.py:29-89 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 61 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 (52 corresponding lines) · ×1
  • Edited copy of a member (52 corresponding lines) chemml/chem/magpie_python/attributes/generators/crystal/ChemicalOrderingAttributeGenerator.py:84 — chemml/chem/magpie_python/attributes/generators/crystal/ChemicalOrderingAttributeGenerator.py:84-139 | chemml/chem/magpie_python/attributes/generators/crystal/PackingEfficiencyAttributeGenerator.py:22-73 — These two members are one piece of code written twice and then edited apart: 52 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×1
  • Edited copy of a member (15 corresponding lines) REDACTED:35 — REDACTED:35-49 | REDACTED:69-85 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 25+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 25+ corresponding lines) chemml/wrapper/preprocessing/miscellaneous.py:100 — chemml/wrapper/preprocessing/miscellaneous.py:100-129 | chemml/wrapper/preprocessing/miscellaneous.py:156-180 | chemml/wrapper/preprocessing/miscellaneous.py:207-232 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×1
  • Edited copy of a member (8 corresponding lines) REDACTED:298 — REDACTED:298-305 | REDACTED:308-315 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) chemml/chem/molecule.py:603 — chemml/chem/molecule.py:603-635 | chemml/chem/molecule.py:640-668 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) chemml/chem/magpie_python/vassal/analysis/VoronoiCellBasedAnalysis.py:601 — chemml/chem/magpie_python/vassal/analysis/VoronoiCellBasedAnalysis.py:601-614 | chemml/chem/magpie_python/vassal/analysis/VoronoiCellBasedAnalysis.py:617-637 — 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 (10 corresponding lines) · ×1
  • Edited copy of a member (10 corresponding lines) chemml/wrapper/sklearn_skl/KFold_wrapper.py:9 — chemml/wrapper/sklearn_skl/KFold_wrapper.py:9-20 | chemml/wrapper/sklearn_skl/LeaveOneOut.py:10-19 — 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 · Duplicated block (41 lines × 2) · ×1
  • Duplicated block (41 lines × 2) chemml/chem/CoulMat.py:161 — chemml/chem/CoulMat.py:161-201 | chemml/chem/CoulMat.py:358-398 — 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 (40–41 lines × 2) · ×1
  • Duplicated block (40–41 lines × 2) chemml/chem/magpie_python/attributes/generators/crystal/CoordinationNumberAttributeGenerator.py:11 — chemml/chem/magpie_python/attributes/generators/crystal/CoordinationNumberAttributeGenerator.py:11-51 | chemml/chem/magpie_python/attributes/generators/crystal/StructuralHeterogeneityAttributeGenerator.py:36-75 — 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 (39 lines × 2) · ×1
  • Duplicated block (39 lines × 2) chemml/chem/magpie_python/attributes/generators/composition/IonicityAttributeGenerator.py:31 — chemml/chem/magpie_python/attributes/generators/composition/IonicityAttributeGenerator.py:31-69 | chemml/chem/magpie_python/attributes/generators/composition/MeredigAttributeGenerator.py:26-64 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (38–39 lines × 2) · ×1
  • Duplicated block (38–39 lines × 2) chemml/chem/magpie_python/attributes/generators/crystal/EffectiveCoordinationNumberAttributeGenerator.py:65 — chemml/chem/magpie_python/attributes/generators/crystal/EffectiveCoordinationNumberAttributeGenerator.py:65-103 | chemml/chem/magpie_python/attributes/generators/crystal/LatticeSimilarityAttributeGenerator.py:29-66 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (36 lines × 2) · ×1
  • Duplicated block (36 lines × 2) chemml/datasets/base.py:13 — chemml/datasets/base.py:13-48 | chemml/datasets/base.py:54-89 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note 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 (4–36 lines × 3) · ×1
  • Duplicated block (4–36 lines × 3) chemml/models/graphconvnetwork.py:456 — chemml/models/graphconvnetwork.py:456-459 | chemml/models/graphconvnetwork.py:549-584 | chemml/models/graphconvnetwork.py:624-656 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (27–33 lines × 2) · ×1
  • Duplicated block (27–33 lines × 2) chemml/chem/CoulMat.py:120 — chemml/chem/CoulMat.py:120-152 | chemml/chem/CoulMat.py:333-359 — 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 (26–27 lines × 2) · ×1
  • Duplicated block (26–27 lines × 2) REDACTED:1486 — REDACTED:1486-1511 | REDACTED:1529-1555 — 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:1486` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (24 lines × 2) · ×1
  • Duplicated block (24 lines × 2) chemml/explain/visualize.py:195 — chemml/explain/visualize.py:195-218 | chemml/explain/visualize.py:231-254 — 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 `chemml/explain/visualize.py:195` 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 (22 lines × 2) · ×1
  • Duplicated block (22 lines × 2) REDACTED:401 — REDACTED:401-422 | REDACTED:447-468 — 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:401` 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 (19–21 lines × 5) · ×1
  • Duplicated block (19–21 lines × 5) REDACTED:291 — REDACTED:291-311 | REDACTED:491-510 | REDACTED:594-613 | REDACTED:654-672 | REDACTED:805-823 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (4–19 lines × 17) · ×1
  • Duplicated block (4–19 lines × 17) REDACTED:168 — REDACTED:168-186 | REDACTED:216-234 | REDACTED:264-282 | REDACTED:320-338 | REDACTED:368-386 | REDACTED:416-434 | REDACTED:464-482 | REDACTED:519-537 | REDACTED:567-585 | REDACTED:627-645 | REDACTED:681-699 | REDACTED:730-748 | REDACTED:778-796 | REDACTED:832-850 | REDACTED:948-966 | REDACTED:1256-1259 | REDACTED:1612-1615 — all 17 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (15–18 lines × 2) · ×1
  • Duplicated block (15–18 lines × 2) chemml/wrapper/engine.py:98 — chemml/wrapper/engine.py:98-112 | REDACTED:1742-1759 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `chemml/wrapper/engine.py:113` calls `IOError` and `REDACTED:1761` 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 (14–15 lines × 8) · ×1
  • Duplicated block (14–15 lines × 8) REDACTED:194 — REDACTED:194-207 | REDACTED:242-255 | REDACTED:346-359 | REDACTED:394-407 | REDACTED:442-455 | REDACTED:545-558 | REDACTED:707-721 | REDACTED:756-769 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–15 lines × 3) · ×1
  • Duplicated block (13–15 lines × 3) chemml/chem/magpie_python/attributes/generators/crystal/EffectiveCoordinationNumberAttributeGenerator.py:102 — chemml/chem/magpie_python/attributes/generators/crystal/EffectiveCoordinationNumberAttributeGenerator.py:102-114 | chemml/chem/magpie_python/attributes/generators/crystal/LatticeSimilarityAttributeGenerator.py:64-76 | chemml/chem/magpie_python/attributes/generators/crystal/StructuralHeterogeneityAttributeGenerator.py:77-91 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12–15 lines × 2) · ×1
  • Duplicated block (12–15 lines × 2) chemml/models/graphconvlayers.py:219 — chemml/models/graphconvlayers.py:219-230 | chemml/models/graphconvlayers.py:418-432 — 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 (2–14 lines × 17) · ×1
  • Duplicated block (2–14 lines × 17) REDACTED:190 — REDACTED:190-203 | REDACTED:238-251 | REDACTED:286-299 | REDACTED:342-355 | REDACTED:390-403 | REDACTED:438-451 | REDACTED:486-499 | REDACTED:541-554 | REDACTED:589-602 | REDACTED:649-662 | REDACTED:703-716 | REDACTED:752-765 | REDACTED:800-813 | REDACTED:854-867 | REDACTED:969-970 | REDACTED:1261-1262 | REDACTED:1617-1618 — all 17 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:190` calls `Image`, `pipe` and `REDACTED:969` does not — after which the two agree again for 5 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:666 — chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:666-679 | chemml/chem/magpie_python/vassal/analysis/voronoi/VoronoiFace.py:782-795 — 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 (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) REDACTED:310 — REDACTED:310-323 | REDACTED:428-440 — 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 (37 lines × 4) · ×1
  • Duplicated block (37 lines × 4) REDACTED:140 — REDACTED:140-176 | REDACTED:180-216 | REDACTED:220-256 | REDACTED:260-296 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (12–13 lines × 2) · ×1
  • Duplicated block (12–13 lines × 2) chemml/utils/utilities.py:610 — chemml/utils/utilities.py:610-622 | chemml/utils/utilities.py:633-644 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×1
  • Duplicated block (13 lines × 2) chemml/wrapper/pandas_pd/pandas_wrapper.py:20 — chemml/wrapper/pandas_pd/pandas_wrapper.py:20-32 | chemml/wrapper/pandas_pd/pandas_wrapper.py:200-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.
D4 · Code Duplication · Duplicated block (4–12 lines × 5) · ×1
  • Duplicated block (4–12 lines × 5) chemml/published/RI/lorentz_lorenz.py:148 — chemml/published/RI/lorentz_lorenz.py:148-151 | chemml/published/RI/lorentz_lorenz.py:167-170 | chemml/published/RI/lorentz_lorenz.py:179-189 | chemml/published/RI/lorentz_lorenz.py:199-210 | chemml/published/RI/lorentz_lorenz.py:248-251 — all 5 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 `chemml/published/RI/lorentz_lorenz.py:179` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) REDACTED:1514 — REDACTED:1514-1524 | REDACTED:1559-1570 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 3) · ×1
  • Duplicated block (10–11 lines × 3) REDACTED:309 — REDACTED:309-319 | REDACTED:427-436 | REDACTED:473-483 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:485` calls `eval` and `REDACTED:322` 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–10 lines × 50) · ×1
  • Duplicated block (8–10 lines × 50) REDACTED:22 — REDACTED:22-29 | REDACTED:46-53 | REDACTED:69-76 | REDACTED:96-103 | REDACTED:119-126 | REDACTED:142-149 | REDACTED:173-180 | REDACTED:209-216 | REDACTED:237-244 | REDACTED:265-272 | REDACTED:473-480 | REDACTED:496-503 | REDACTED:558-567 | REDACTED:585-594 | REDACTED:616-625 | REDACTED:643-652 | REDACTED:674-683 | REDACTED:710-719 | REDACTED:740-749 | REDACTED:767-776 | REDACTED:794-803 | REDACTED:824-833 | REDACTED:851-860 | REDACTED:878-887 | REDACTED:918-927 | REDACTED:954-963 | REDACTED:981-990 | REDACTED:1013-1022 | REDACTED:1040-1049 | REDACTED:1067-1076 | REDACTED:1100-1109 | REDACTED:1133-1142 | REDACTED:1160-1169 | REDACTED:1196-1205 | REDACTED:1223-1232 | REDACTED:1249-1258 | REDACTED:1275-1284 | REDACTED:1326-1333 | REDACTED:1378-1385 | REDACTED:1433-1440 | REDACTED:1552-1559 | REDACTED:1612-1619 | REDACTED:1666-1673 | REDACTED:2099-2106 | chemml/wrapper/pandas_pd/pandas_wrapper.py:31-38 | chemml/wrapper/pandas_pd/pandas_wrapper.py:69-76 | chemml/wrapper/pandas_pd/pandas_wrapper.py:109-116 | chemml/wrapper/pandas_pd/pandas_wrapper.py:141-148 | chemml/wrapper/pandas_pd/pandas_wrapper.py:172-179 | chemml/wrapper/pandas_pd/pandas_wrapper.py:211-218 — there are 50 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 50 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1372` calls `str` and `REDACTED:19` 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 (9–10 lines × 6) · ×1
  • Duplicated block (9–10 lines × 6) chemml/optimization/active.py:1223 — chemml/optimization/active.py:1223-1231 | chemml/optimization/active.py:1243-1252 | chemml/optimization/active.py:1263-1272 | chemml/optimization/active.py:1298-1306 | chemml/optimization/active.py:1318-1327 | chemml/optimization/active.py:1337-1345 — all 6 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 `chemml/optimization/active.py:1223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chemml/optimization/active.py:1296` calls `sum`, `distplot`, `reshape` and `chemml/optimization/active.py:1318` 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 (10 lines × 4) · ×1
  • Duplicated block (10 lines × 4) REDACTED:1965 — REDACTED:1965-1974 | REDACTED:1977-1988 | REDACTED:1992-2005 | REDACTED:2008-2020 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1965` 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–9 lines × 3) · ×1
  • Duplicated block (8–9 lines × 3) REDACTED:1205 — REDACTED:1205-1213 | REDACTED:1305-1312 | REDACTED:1372-1379 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) chemml/wrapper/preprocessing/miscellaneous.py:118 — chemml/wrapper/preprocessing/miscellaneous.py:118-126 | chemml/wrapper/preprocessing/miscellaneous.py:221-228 — 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 (7–8 lines × 6) · ×1
  • Duplicated block (7–8 lines × 6) REDACTED:317 — REDACTED:317-323 | REDACTED:413-420 | REDACTED:459-466 | REDACTED:530-537 | REDACTED:576-583 | REDACTED:626-632 — there are 6 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 6 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7–8 lines × 3) · ×1
  • Duplicated block (7–8 lines × 3) chemml/wrapper/preprocessing/miscellaneous.py:119 — chemml/wrapper/preprocessing/miscellaneous.py:119-126 | chemml/wrapper/preprocessing/miscellaneous.py:170-176 | chemml/wrapper/preprocessing/miscellaneous.py:222-228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `chemml/wrapper/preprocessing/miscellaneous.py:218` calls `array` and `chemml/wrapper/preprocessing/miscellaneous.py:165` 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) · ×1
  • Duplicated block (8 lines × 3) chemml/wrapper/sklearn_skl/syntax.py:274 — chemml/wrapper/sklearn_skl/syntax.py:274-281 | chemml/wrapper/sklearn_skl/syntax.py:283-290 | chemml/wrapper/sklearn_skl/syntax.py:302-309 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7 lines × 5) · ×1
  • Duplicated block (7 lines × 5) REDACTED:405 — REDACTED:405-411 | REDACTED:451-457 | REDACTED:500-506 | REDACTED:552-558 | REDACTED:618-624 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:405` 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 (5–7 lines × 4) · ×1
  • Duplicated block (5–7 lines × 4) REDACTED:193 — REDACTED:193-199 | REDACTED:201-207 | REDACTED:208-212 | REDACTED:219-225 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. 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 (37 lines × 2) · ×1
  • Duplicated block (37 lines × 2) REDACTED:1590 — REDACTED:1590-1626 | REDACTED:1644-1680 — 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:1590` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 4) · ×1
  • Duplicated block (6 lines × 4) chemml/published/RI/lorentz_lorenz.py:159 — chemml/published/RI/lorentz_lorenz.py:159-164 | chemml/published/RI/lorentz_lorenz.py:178-183 | chemml/published/RI/lorentz_lorenz.py:198-203 | chemml/published/RI/lorentz_lorenz.py:219-224 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `chemml/published/RI/lorentz_lorenz.py:159` 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 (5 lines × 55) · ×1
  • Duplicated block (5 lines × 55) REDACTED:22 — REDACTED:22-26 | REDACTED:46-50 | REDACTED:69-73 | REDACTED:96-100 | REDACTED:119-123 | REDACTED:142-146 | REDACTED:173-177 | REDACTED:209-213 | REDACTED:237-241 | REDACTED:265-269 | REDACTED:391-395 | REDACTED:440-444 | REDACTED:473-477 | REDACTED:496-500 | REDACTED:523-527 | REDACTED:558-564 | REDACTED:585-591 | REDACTED:616-622 | REDACTED:643-649 | REDACTED:674-680 | REDACTED:710-716 | REDACTED:740-746 | REDACTED:767-773 | REDACTED:794-800 | REDACTED:824-830 | REDACTED:851-857 | REDACTED:878-884 | REDACTED:918-924 | REDACTED:954-960 | REDACTED:981-987 | REDACTED:1013-1019 | REDACTED:1040-1046 | REDACTED:1067-1073 | REDACTED:1100-1106 | REDACTED:1133-1139 | REDACTED:1160-1166 | REDACTED:1196-1202 | REDACTED:1223-1229 | REDACTED:1249-1255 | REDACTED:1275-1281 | REDACTED:1326-1330 | REDACTED:1378-1382 | REDACTED:1433-1437 | REDACTED:1552-1556 | REDACTED:1612-1616 | REDACTED:1666-1670 | REDACTED:1876-1880 | REDACTED:2099-2103 | chemml/wrapper/pandas_pd/pandas_wrapper.py:31-35 | chemml/wrapper/pandas_pd/pandas_wrapper.py:69-73 | chemml/wrapper/pandas_pd/pandas_wrapper.py:109-113 | chemml/wrapper/pandas_pd/pandas_wrapper.py:141-145 | chemml/wrapper/pandas_pd/pandas_wrapper.py:172-176 | chemml/wrapper/pandas_pd/pandas_wrapper.py:211-215 | REDACTED:345-349 — there are 55 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 55 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:558` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `REDACTED:1372` calls `str` and `REDACTED:19` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (5 lines × 23) · ×1
  • Duplicated block (5 lines × 23) REDACTED:552 — REDACTED:552-556 | REDACTED:579-583 | REDACTED:610-614 | REDACTED:637-641 | REDACTED:668-672 | REDACTED:704-708 | REDACTED:734-738 | REDACTED:761-765 | REDACTED:788-792 | REDACTED:818-822 | REDACTED:845-849 | REDACTED:872-876 | REDACTED:912-916 | REDACTED:948-952 | REDACTED:975-979 | REDACTED:1007-1011 | REDACTED:1034-1038 | REDACTED:1061-1065 | REDACTED:1094-1098 | REDACTED:1127-1131 | REDACTED:1154-1158 | REDACTED:1190-1194 | REDACTED:1217-1221 — all 23 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:552` 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 (5 lines × 12) · ×1
  • Duplicated block (5 lines × 12) REDACTED:159 — REDACTED:159-163 | REDACTED:154-158 | REDACTED:164-168 | REDACTED:194-198 | REDACTED:204-208 | REDACTED:234-238 | REDACTED:244-248 | REDACTED:274-278 | REDACTED:284-288 | REDACTED:333-338 | REDACTED:401-406 | REDACTED:447-452 — there are 12 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 12 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:333` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:341` calls `fit` and `REDACTED:409` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7 lines × 10) · ×1
  • Duplicated block (7 lines × 10) REDACTED:51 — REDACTED:51-57 | REDACTED:74-80 | REDACTED:101-107 | REDACTED:124-130 | REDACTED:1331-1337 | REDACTED:1388-1394 | REDACTED:1443-1449 | REDACTED:1557-1563 | REDACTED:2104-2110 | REDACTED:507-513 — there are 10 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 10 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 10) · ×1
  • Duplicated block (5 lines × 10) REDACTED:50 — REDACTED:50-54 | REDACTED:73-77 | REDACTED:100-104 | REDACTED:123-127 | REDACTED:1330-1334 | REDACTED:1556-1560 | REDACTED:1616-1620 | REDACTED:1670-1674 | REDACTED:2103-2107 | REDACTED:510-514 — there are 10 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 10 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (5 lines × 9) · ×1
  • Duplicated block (5 lines × 9) REDACTED:54 — REDACTED:54-58 | REDACTED:81-85 | REDACTED:104-108 | REDACTED:127-131 | REDACTED:1334-1339 | REDACTED:1391-1397 | REDACTED:1446-1452 | REDACTED:1560-1566 | REDACTED:2107-2113 — all 9 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:54` 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 (4–5 lines × 5) · ×1
  • Duplicated block (4–5 lines × 5) REDACTED:1318 — REDACTED:1318-1322 | REDACTED:1368-1373 | REDACTED:1423-1428 | REDACTED:1591-1594 | REDACTED:1645-1648 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `REDACTED:1368` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (3–5 lines × 5) · ×1
  • Duplicated block (3–5 lines × 5) REDACTED:109 — REDACTED:109-111 | REDACTED:330-332 | REDACTED:394-398 | REDACTED:440-444 | REDACTED:489-493 — all 5 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `REDACTED:399` calls `exec` and `REDACTED:111` 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.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Minor — 9 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate chemml/chem/magpie_python/attributes/generators/composition/APEAttributeGenerator.py:570 — `entries and not isinstance(entries[0], CompositionEntry)` appears character-identically in 13 files — chemml/chem/magpie_python/attributes/generators/composition/APEAttributeGenerator.py, chemml/chem/magpie_python/attributes/generators/composition/ChargeDependentAttributeGenerator.py, chemml/chem/magpie_python/attributes/generators/composition/ElementFractionAttributeGenerator.py, chemml/chem/magpie_python/attributes/generators/composition/ElementPairPropertyAttributeGenerator.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 chemml/chem/magpie_python/attributes/generators/crystal/APRDFAttributeGenerator.py:159 — `entries and not isinstance(entries[0], CrystalStructureEntry)` appears character-identically in 10 files — chemml/chem/magpie_python/attributes/generators/crystal/APRDFAttributeGenerator.py, chemml/chem/magpie_python/attributes/generators/crystal/ChemicalOrderingAttributeGenerator.py, chemml/chem/magpie_python/attributes/generators/crystal/CoordinationNumberAttributeGenerator.py, chemml/chem/magpie_python/attributes/generators/crystal/CoulombMatrixAttributeGenerator.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.
D16 · Bus Factor · Off-boarding risk · ×1
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 14 significant file(s) lose their only recent owner: REDACTED, chemml/chem/molecule.py, REDACTED, chemml/models/graphconvnetwork.py, chemml/chem/magpie_python/vassal/data/Cell.py, chemml/chem/CoulMat.py, chemml/visualization/visualization.py, chemml/models/graphconvlayers_torch.py (+6 more). Pair on, review, or document these before any departure.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
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 REDACTED:6 — No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 2 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 pyproject.toml:23 — `pyproject.toml` 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`.
X4 · Structured logging · Interpolated log message defeats structured logging · ×1
  • Interpolated log message defeats structured logging REDACTED:205 — `info` at line 205 is handed an f-string as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, every occurrence reads as a different message, and the string is built even when the record is filtered out. Pass the values beside a constant message instead: `logger.info("order %s moved to %s", order_id, status)` with the standard library's `logging`, which keeps the message and its arguments apart on the record, or `log.info("order moved", order_id=order_id, status=status)` with structlog.
Minor — 1 finding(s)
D12 · Dependency Hygiene · Dependency hygiene PARTLY measured · ×1
  • Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency — This repository's Python dependencies were read: 23 shipped distribution(s) across 1 manifest(s) (9 development or optional declaration(s) excluded, because a consumer does not install them). Whether any of them is behind its current release is the dependency-CURRENCY question, and no declaration here carries an EXACT pin to ask it about — every one is a floor or a range, which installs the newest release it admits and therefore cannot be behind one. That is a healthy declaration style, NOT a defect and NOT a gap in this analyzer; there is simply no currency question to answer. This is NOT a finding that these dependencies are current or healthy. Lockfiles are deliberately not read (poetry.lock, uv.lock, Pipfile.lock, pdm.lock): the four disagree about dev/optional membership, and misreading one would charge a test-only package a consumer never receives. Known CVEs in the same dependency graph are a separate question, reported under D30.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=0 --max-count=200" --report-format json --report-path /tmp/watchdog-gitleaks-f84d1bc183d44ad6b7a28852a4b4dac5/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=200 --max-count=800" --report-format json --report-path /tmp/watchdog-gitleaks-f84d1bc183d44ad6b7a28852a4b4dac5/history-1.json --exit-code 0 --source .2artifacts/raw/gitleaks-history-1.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --log-opts "--full-history --all --skip=1000 --max-count=43" --report-format json --report-path /tmp/watchdog-gitleaks-f84d1bc183d44ad6b7a28852a4b4dac5/history-2.json --exit-code 0 --source .0artifacts/raw/gitleaks-history-2.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-f84d1bc183d44ad6b7a28852a4b4dac5/tree.json --exit-code 0 --source .1artifacts/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 .44artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).0—
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—
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 Dependenciesnone (dependency manifest found, not scanned for vulnerabilities here)—none (dependency manifest found, not scanned for vulnerabilities here): not applicable — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet).0—

Run 01a1e8ce-b137-79bd-bc90-4b4055bb623a · 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